Documentation
    Preparing search index...

    Function tryReverseApplySwapFee

    • Reverse the application of a swap fee to an amount e.g. You received 9900 amount with 10000 fee rate. The fee amount will be 100. So the amount before fee will be 10000.

      Parameters

      • amount: The amount to reverse the fee from
      • fee_rate: The fee rate to reverse denominated in 1e6

      Returns

      • u64: The amount before the fee has been applied

      Parameters

      • amount: bigint
      • fee_rate: number

      Returns bigint