Function getStrictTokenValue

  • Calculates the value of a given token amount using the worst of the provided oracle price and its TWAP.

    Returns

    The calculated value of the given token amount, scaled by PRICE_PRECISION

    Parameters

    • tokenAmount: BN

      The amount of tokens to calculate the value for (from getTokenAmount)

    • spotDecimals: number

      The number of decimals in the token.

    • strictOraclePrice: StrictOraclePrice

      Contains oracle price and 5min twap.

    Returns BN

Generated using TypeDoc