balancer

package
v0.0.0-...-2ac5be2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL