Skip to content

FluidUsdOracleL2 ​

Git Source

Inherits:FluidUsdOracle, FluidUsdOracleSequencerL2

Title: FluidUsdOracleL2

L2 variant of FluidUsdOracle with a built-in Chainlink sequencer uptime feed check. Guarded price reads (getPrice, getPriceView, getPriceDetailed, getPriceDetailedView, getPriceRawForMode, getPricesRawForMode) verify that the L2 sequencer is up and that a dynamic grace period has elapsed. The grace period equals the outage duration, capped at _SEQUENCER_MAX_GRACE_PERIOD. Unguarded reads (getPriceDetailedViewRaw) skip the sequencer check; _getPriceImplNoWrite is self-call gated.

Sequencer check happens in _beforeGuardedPriceRead() override. Sequencer logic is in FluidUsdOracleSequencerL2 above (copied 1:1 from fluidOracleL2.sol).

Functions ​

constructor ​

Deploys the L2 USD oracle with the Liquidity contract used to resolve governance and a Chainlink sequencer uptime feed.

solidity
constructor(address liquidity_, address sequencerUptimeFeed_)
    FluidUsdOracle(liquidity_)
    FluidUsdOracleSequencerL2(sequencerUptimeFeed_);

Parameters

NameTypeDescription
liquidity_addressLiquidity proxy address (same as FluidUsdOracle); governance read via LIQUIDITY_GOVERNANCE_SLOT.
sequencerUptimeFeed_addressChainlink L2 sequencer uptime feed (IChainlinkAggregatorV3); must not be zero.

_beforeGuardedPriceRead ​

Gates all guarded price reads behind the sequencer uptime + grace-period check.

solidity
function _beforeGuardedPriceRead() internal view override;