Apply a swap fee to an amount e.g. You send 10000 amount with 10000 fee rate. The fee amount will be 100. So the amount after fee will be 9900.
amount
fee_rate
u64
Apply a swap fee to an amount e.g. You send 10000 amount with 10000 fee rate. The fee amount will be 100. So the amount after fee will be 9900.
Parameters
amount
: The amount to apply the fee tofee_rate
: The fee rate to apply denominated in 1e6Returns
u64
: The amount after the fee has been applied