Documentation ¶
Index ¶
- Constants
- func GetFixedRateSwapFees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, ...) (applications.ApplicationFeeData, error)
- func GetMooniswapV1Fees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, ...) (applications.ApplicationFeeData, error)
- func GetOneInchLPFees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, ...) (applications.ApplicationFeeData, error)
Constants ¶
const FeeDecimals = 18
FeeDecimals is the hardcoded denominator used by 1inchLP to derive fees
Variables ¶
This section is empty.
Functions ¶
func GetFixedRateSwapFees ¶
func GetFixedRateSwapFees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, fluidTokenContract ethCommon.Address, tokenDecimals int) (applications.ApplicationFeeData, error)
GetFixedRateSwapFees calculates fees from Swapping TokenA and TokenB performed by FixedRateSwap Because TokenA and TokenB are required to have the same decimals, the fee is the value that balances x TokenA + y TokenB + fee = const
func GetMooniswapV1Fees ¶
func GetMooniswapV1Fees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, fluidTokenContract ethCommon.Address, tokenDecimals int) (applications.ApplicationFeeData, error)
GetMooniswapFees returns Mooniswap's fee of 0.3% of the amount swapped. If the token swapped from was the fluid token, get the exact amount, otherwise approximate the cost based on the received amount of the fluid token
func GetOneInchLPFees ¶
func GetOneInchLPFees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, fluidTokenContract ethCommon.Address, tokenDecimals int) (applications.ApplicationFeeData, error)
GetOneInchLPFees implements 1InchLPv1.0/1.1 fee structure. Fees are split into static fees and slippage fees, controlled by 1Inch governance
Types ¶
This section is empty.