Calculates the value of a given token amount using the worst of the provided oracle price and its TWAP.
The calculated value of the given token amount, scaled by PRICE_PRECISION
PRICE_PRECISION
The amount of tokens to calculate the value for (from getTokenAmount)
getTokenAmount
The number of decimals in the token.
The oracle price data (typically a token/USD oracle).
The Time-Weighted Average Price of the oracle.
Generated using TypeDoc
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