Calculate total amount of a Contract including all fees.

  • first we convert fee floating to a BN with up to 4 decimals precision
  • then we reverse the fee with FEE_MULTIPLIER to safely multiply it by depositedAmount to receive a total number and not percentage of depositedAmount
  • Parameters

    • depositedAmount: BN

      deposited raw tokens

    • totalFee: number

      sum of all fees in percentage as floating number, e.g. 0.99% should be supplied as 0.99

    Returns BN

    total tokens amount that Contract will retrieve from the Sender