pairTradingFeePPM()

CarbonController.sol
    function pairTradingFeePPM(Token token0, Token token1) external view returns (uint32);

This function returns the fee settings for a specific pair, represented in PPM (parts per million). It is recommended to identify the trading fee for the required pair to ensure the fee considerations are correctly represented to the user.

Function Arguments

NameTypeDescription

token0

Token

The first token address.

token1

Token

The second token address.

There is no importance for the order of tokens as you will receive the fee for the pool containing these tokens.

Returns

Fee percentage in PPM

For example a PPM of 1000 represents a 0.1% trading fee:

1000 / 1,000,000 = 0.001 = 0.1%

If the pair has a customFee, the response would represent this value. Otherwise, the return would represent the default fee on the system.

Example

pairTradingFeePPM(
 0x514910771AF9Ca656af840dff83E8264EcF986CA, //token0
 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE //token1
)

// Returns:
//   FeePPM; //1000 which represents 0.1%
// }

Last updated