Skip to main content

AuraWETHPriceFeed

AuraWETHPriceFeed

PriceFeedPaused

event PriceFeedPaused()

PriceFeedUnpaused

event PriceFeedUnpaused()

ToleranceChanged

event ToleranceChanged(uint256 oldTolerance, uint256 newTolerance)

PriceFeedPausedError

error PriceFeedPausedError()

PriceFeedUnpausedError

error PriceFeedUnpausedError()

InvalidToleranceBps

error InvalidToleranceBps()

HighPriceVolatility

error HighPriceVolatility(uint256 deviation)

paused

bool paused

tolerance

uint256 tolerance

decimals

uint8 decimals

description

string description

version

uint256 version

auraOracleWeightedPool

contract IOracleWeightedPool auraOracleWeightedPool

constructor

constructor(address _auraOracleWeightedPool, address _governor) public

price

function price() external view returns (int256)

Queries the OracleWeightedPool for TWAP of two intervals (1h data from 5m ago and the recent 5m data) and ensures that the price hasn't deviated too much and returns the most recent TWAP price.

Return Values

NameTypeDescription
[0]int256price The price scaled to 18 decimals

_price

function _price() internal view returns (int256)

pause

function pause() external

Pauses the price feed. Callable by Strategist as well.

unpause

function unpause() external

Unpauses the price feed. Only Governor can call it

setTolerance

function setTolerance(uint256 _tolerance) external

Set the max amount of tolerance acceptable between two different price points.

Parameters

NameTypeDescription
_toleranceuint256New tolerance value

latestRoundData

function latestRoundData() external view returns (uint80, int256 answer, uint256, uint256 updatedAt, uint80)

This function exists to make the contract compatible with AggregatorV3Interface (which OETHOracleRouter uses to get the price).

The answer returned by this is same as what price() would return.

It doesn't return any data about rounds (since those doesn't exist).

getRoundData

function getRoundData(uint80) external pure returns (uint80, int256, uint256, uint256, uint80)

This function exists to make the contract compatible with AggregatorV3Interface.

Always reverts since there're no round data in this contract.