• 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 to
    • fee_rate: The fee rate to apply denominated in 1e6

    Returns

    • u64: The amount after the fee has been applied

    Parameters

    • amount: bigint
    • fee_rate: number

    Returns bigint