Skip to main content

PriceFeed

Git Source ↗

Inherits: IBalancerRateProvider, IChainlinkAggregator, IChainlinkV3Aggregator

Price feed for osToken (e.g osETH price in ETH).

State Variables​

version​

The version number of the aggregator

uint256 public constant override version = 0

osTokenVaultController​

address public immutable osTokenVaultController

Functions​

description​

The description of the aggregator

function description() external view returns (string memory);

Returns

NameTypeDescription
<none>stringThe description string

getRate​

Returns the price of a unit of osToken (e.g price of osETH in ETH)

function getRate() public view override returns (uint256);

Returns

NameTypeDescription
<none>uint256The price of a unit of osToken (with 18 decimals)

latestAnswer​

Returns the price of a unit of osToken (e.g price of osETH in ETH)

function latestAnswer() public view override returns (int256);

Returns

NameTypeDescription
<none>int256The price of a unit of osToken (with 18 decimals)

latestTimestamp​

The last updated at block timestamp

function latestTimestamp() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The timestamp of the last update

decimals​

The number of decimals the price is formatted with

function decimals() public pure returns (uint8);

latestRoundData​

Get the data from the latest round

function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

Returns

NameTypeDescription
roundIduint80The round ID
answerint256The current price
startedAtuint256The timestamp of when the round started
updatedAtuint256The timestamp of when the round was updated
answeredInRounduint80(Deprecated) Previously used when answers could take multiple rounds to be computed

Errors​

NotImplemented​

error NotImplemented();