PriceFeedWrapper

Returns the price of an asset that doesnโ€™t have a direct feed from Chainlink.

Written as a generic implementation it can be used, for example, to retrieve the price of wstETH. Queries stETH / ETH feed and multiplies it by the exchange rate between stETH / wstETH before returning the price that itโ€™s then used by the Auditor.

Public State Variables

baseUnit

function baseUnit() external view returns (uint256)

Base units that are sent to the conversion function to get the asset rate.

conversionSelector

function conversionSelector() external view returns (bytes4)

Function selector of the wrapper contract where the asset rate is fetched from.

decimals

function decimals() external view returns (uint8)

Number of decimals that the answer of this price feed has.

mainPriceFeed

function mainPriceFeed() external view returns (contract IPriceFeed)

Main price feed where the price is fetched from.

wrapper

function wrapper() external view returns (address)

Address of the wrapper contract where the asset rate is fetched from.

View Methods

latestAnswer

function latestAnswer() external view returns (int256)

Returns the price feed's latest value considering the wrapped asset's rate.

Returns

TypeDescription

int256

latest asset price.

Last updated