Function calcOutGivenIn

  • Calculate the expected amount of asset X gotten out when swaping an asset Y into a pool.

    Returns

    Decimal

    Parameters

    • tokenBalanceIn: BigNumber

      BigNumber - amount of 'in' asset in the pool

    • tokenWeightIn: BigNumber

      BigNumber - weight of 'in' asset on the pool

    • tokenBalanceOut: BigNumber

      BigNumber - amount of 'out' asset in the pool

    • tokenWeightOut: BigNumber

      BigNumber - weight of 'out' asset on the pool

    • tokenAmountIn: BigNumber

      BigNumber - amount in for the swap

    • swapFee: BigNumber

      BigNumber - swap fee

    Returns Decimal

Generated using TypeDoc