IPriceOracle
Overview
License: MIT
Functions info
MODERATOR_ROLE (0x797669c9)
volatilityCapFixedPercent (0x34bdb935)
minSampleInterval (0x69a7f273)
logMaturingAge (0x89a1e81f)
longTWAPperiod (0x7ccad678)
grantModerator (0x6981c7ae)
revokeModerator (0x36445636)
setPriceProviderAggregator (0x5ff22c42)
Set the price provider aggregator contract address
Parameters:
newPriceProviderAggregator
address
The address of the new price provider aggregator contract
setVolatilityCapFixedPercent (0x7eddca25)
Set the volatility cap fixed percent
Parameters:
_volatilityCapFixedPercent
uint16
The new volatility cap fixed percent
setMinSampleInterval (0x7ec0974b)
Set the minimum sample interval
Parameters:
_minSampleInterval
uint256
The new minimum sample interval
setLogMaturingAge (0xb7fb9223)
Set the log maturing age
Parameters:
_logMaturingAge
uint256
The new log maturing age
setLongTWAPperiod (0x8597bfb5)
Set the long TWAP period
Parameters:
_longTWAPperiod
uint256
The new long TWAP period
updateFinalPrices (0x8bb6b7f9)
Calculates the final TWAP prices of a token.
Parameters:
token
address
The address of the token.
getMostTWAPprice (0xbc124cfd)
Returns the most recent TWAP price of a token.
Parameters:
token
address
The address of the token.
Return values:
priceDecimals
uint8
The decimals of the price.
timestamp
uint64
The last updated timestamp of the price.
collateralPrice
uint256
The collateral price of the token.
capitalPrice
uint256
The capital price of the token.
getEstimatedTWAPprice (0x29f839b2)
Returns the non-TWAP price of a token.
Parameters:
token
address
The address of the token.
Return values:
priceDecimals
uint8
The decimals of the price.
timestamp
uint64
The last updated timestamp of the price.
collateralPrice
uint256
The collateral price of the token.
capitalPrice
uint256
The capital price of the token.
getEvaluation (0x81fd01ea)
returns the most TWAP price in USD evaluation of token by its tokenAmount
Parameters:
token
address
the address of token to evaluate
tokenAmount
uint256
the amount of token to evaluate
Return values:
collateralEvaluation
uint256
the USD evaluation of token by its tokenAmount
in collateral price
capitalEvaluation
uint256
the USD evaluation of token by its tokenAmount
in capital price
getEstimatedEvaluation (0xebb19c1a)
returns the non-TWAP price in USD evaluation of token by its tokenAmount
Parameters:
token
address
the address of token to evaluate
tokenAmount
uint256
the amount of token to evaluate
Return values:
collateralEvaluation
uint256
the USD evaluation of token by its tokenAmount
in collateral price
capitalEvaluation
uint256
the USD evaluation of token by its tokenAmount
in capital price
getReportedPrice (0xdbd57337)
price = priceMantissa / (10 ** priceDecimals)
returns tuple (priceMantissa, priceDecimals)
Parameters:
token
address
the address of token which price is to return
Last updated