Function getTokenValue

  • Calculates the value of a given token amount in relation to an oracle price data

    Returns

    The value of the token based on the oracle, scaled by PRICE_PRECISION

    Parameters

    • tokenAmount: BN

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

    • spotDecimals: number

      The number of decimal places of the token.

    • oraclePriceData: OraclePriceData

      The oracle price data (typically a token/USD oracle).

    Returns BN

Generated using TypeDoc