Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBalancerFees ¶
func GetBalancerFees(transfer worker.EthereumApplicationTransfer, client *ethclient.Client, fluidContractAddress ethCommon.Address, tokenDecimals int) (applications.ApplicationFeeData, error)
GetBalancerFees returns the fee for a balancer token swap, which is either static or dynamic, meaning we have to look up the value to ensure it hasn't changed. Returns the fee amount in USD using the same method as Uniswap - a direct calculation if the input token is the fluid token, or an approximation based on the swap percentage if the output token is the fluid token. This method generalises for Balancer's different pools (stable, weighted, etc.)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.