Function calcInGivenOut

  • Calculate the expected amount of asset X needed to put in to get a certain amount of asset Y out.

    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

    • tokenAmountOut: BigNumber
    • swapFee: BigNumber

      BigNumber - swap fee

    Returns Decimal

Generated using TypeDoc