FluidOracleL2

Base contract that any Fluid Oracle L2 must implement

_SEQUENCER_ORACLE

contract IChainlinkAggregatorV3 _SEQUENCER_ORACLE

Chainlink L2 Sequencer Uptime feed to detect sequencer outages

_SEQUENCER_MAX_GRACE_PERIOD

uint256 _SEQUENCER_MAX_GRACE_PERIOD

max time period until oracle assumes normal behavior after a sequencer outage.

constructor

constructor(address sequencerUptimeFeed_) internal

sets the L2 sequencer uptime Chainlink feed

sequencerL2Data

function sequencerL2Data() public view returns (address sequencerUptimeFeed_, uint256 maxGracePeriod_, bool isSequencerUp_, uint256 lastUptimeStartedAt_, uint256 gracePeriod_, bool gracePeriodPassed_, uint256 lastOutageStartedAt_, bool isSequencerUpAndValid_)

returns all sequencer uptime feed related data

_ensureSequencerUpAndValid

function _ensureSequencerUpAndValid() internal view

ensures that the sequencer is up and grace period has passed

getExchangeRate

function getExchangeRate() external view virtual returns (uint256 exchangeRate_)

Deprecated. Use getExchangeRateOperate() and getExchangeRateLiquidate() instead. Only implemented for backwards compatibility.

getExchangeRateOperate

function getExchangeRateOperate() external view virtual returns (uint256 exchangeRate_)

Get the exchangeRate_ between the underlying asset and the peg asset in 1e27 for operates

getExchangeRateLiquidate

function getExchangeRateLiquidate() external view virtual returns (uint256 exchangeRate_)

Get the exchangeRate_ between the underlying asset and the peg asset in 1e27 for liquidations