IPriceProviderAggregator

Overview

License: MIT

interface IPriceProviderAggregator

Functions info

setTokenAndPriceProvider (0xf913ab66)

function setTokenAndPriceProvider(
    address token,
    address priceProvider,
    uint8 priceDecimals
) external

Sets price provider to token and its corresponding price provider.

Parameters:

changeActive (0x3651084e)

function changeActive(
    address priceProvider,
    address token,
    bool active
) external

Allows the moderator to change the active status of a price provider for a specific token.

Parameters:

updateMultiFinalPrices (0x1e5f85e6)

function updateMultiFinalPrices(address[] memory token) external

Calculates and update multiple the final TWAP prices of a token.

Parameters:

updatePrices (0x0aa9adbc)

function updatePrices(
    bytes32[] memory priceIds,
    bytes[] calldata updateData
) external payable

Perform a price update if the price is no longer valid.

Parameters:

getTokensUpdateFinalPrices (0xef290120)

function getTokensUpdateFinalPrices(
    address projectToken,
    address actualLendingToken,
    bool isBorrow
) external view returns (address[] memory tokens)

This function is called when performing operations using token prices, to determine which tokens will need to update their final price.

Parameters:

Return values:

tokenPriceProvider (0xa33540f1)

function tokenPriceProvider(
    address token
) external view returns (address priceProvider)

Returns priceProvider address.

Parameters:

getPrice (0x41976e09)

function getPrice(
    address token
)
    external
    view
    returns (
        uint8 priceDecimals,
        uint32 timestamp,
        uint256 collateralPrice,
        uint256 capitalPrice
    )

Returns the most recent 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:

Last updated