IPriceOracle

Overview

License: MIT

interface IPriceOracle

Functions info

MODERATOR_ROLE (0x797669c9)

function MODERATOR_ROLE() external view returns (bytes32)

volatilityCapFixedPercent (0x34bdb935)

function volatilityCapFixedPercent()
    external
    view
    returns (address priceProvider)

minSampleInterval (0x69a7f273)

function minSampleInterval(address token) external view returns (bool)

logMaturingAge (0x89a1e81f)

function logMaturingAge(address token) external view returns (bool)

longTWAPperiod (0x7ccad678)

function longTWAPperiod(address token) external view returns (bool)

grantModerator (0x6981c7ae)

function grantModerator(address newModerator) external

revokeModerator (0x36445636)

function revokeModerator(address moderator) external

setPriceProviderAggregator (0x5ff22c42)

function setPriceProviderAggregator(
    address newPriceProviderAggregator
) external

Set the price provider aggregator contract address

Parameters:

setVolatilityCapFixedPercent (0x7eddca25)

function setVolatilityCapFixedPercent(
    uint16 _volatilityCapFixedPercent
) external

Set the volatility cap fixed percent

Parameters:

setMinSampleInterval (0x7ec0974b)

function setMinSampleInterval(uint256 _minSampleInterval) external

Set the minimum sample interval

Parameters:

setLogMaturingAge (0xb7fb9223)

function setLogMaturingAge(uint256 _logMaturingAge) external

Set the log maturing age

Parameters:

setLongTWAPperiod (0x8597bfb5)

function setLongTWAPperiod(uint256 _longTWAPperiod) external

Set the long TWAP period

Parameters:

updateFinalPrices (0x8bb6b7f9)

function updateFinalPrices(address token) external

Calculates the final TWAP prices of a token.

Parameters:

getMostTWAPprice (0xbc124cfd)

function getMostTWAPprice(
    address token
)
    external
    view
    returns (
        uint8 priceDecimals,
        uint64 timestamp,
        uint256 collateralPrice,
        uint256 capitalPrice
    )

Returns the most recent TWAP price of a token.

Parameters:

Return values:

getEstimatedTWAPprice (0x29f839b2)

function getEstimatedTWAPprice(
    address token
)
    external
    view
    returns (
        uint8 priceDecimals,
        uint64 timestamp,
        uint256 collateralPrice,
        uint256 capitalPrice
    )

Returns the non-TWAP price of a token.

Parameters:

Return values:

getEvaluation (0x81fd01ea)

function getEvaluation(
    address token,
    uint256 tokenAmount
)
    external
    view
    returns (uint256 collateralEvaluation, uint256 capitalEvaluation)

returns the most TWAP price in USD evaluation of token by its tokenAmount

Parameters:

Return values:

getEstimatedEvaluation (0xebb19c1a)

function getEstimatedEvaluation(
    address token,
    uint256 tokenAmount
)
    external
    view
    returns (uint256 collateralEvaluation, uint256 capitalEvaluation)

returns the non-TWAP price in USD evaluation of token by its tokenAmount

Parameters:

Return values:

getReportedPrice (0xdbd57337)

function getReportedPrice(
    address token
) external view returns (uint256 priceMantissa, uint8 priceDecimals)

price = priceMantissa / (10 ** priceDecimals)

returns tuple (priceMantissa, priceDecimals)

Parameters:

Last updated