Oracles

Read v24 normalized prices, calendar states, and oracle identity.

Oracle model

v24 uses a normalized priceWad at a 1e18 scale. Verify the asset, quote unit, collateral policy, source identity, and configuration for the selected market; an arbitrary feed with the same numeric price is not interchangeable. Price reads also carry timestamps, confidence, status, and digests.

OraclePolicyV24 validates source availability, price bounds, confidence, age, calendar state, and sequencer state. A successful source update does not guarantee an executable pool action.

Supported adapters

  • ChainlinkFeedOracleV24 reads the bound Chainlink feed and validates its normalized sample through the v24 policy.
  • PythPullOracleV24 reads the bound cached Pyth sample. A supported paid-update path refreshes it; view reads do not update it.
  • DexTwapOracleV24 binds an approved TWAP source, runtime identity, asset/collateral pair, observation window, and liquidity constraints. It is not the legacy unrestricted spot-reserve adapter. Its sample represents the rolling observation window, not a provider heartbeat.

Read the actual policy's age, confidence, and price limits. Do not import old v22 default staleness values into a v24 integration.

Calendar and sequencer states

A valid read can be Live, ScheduledClosed, ClosureFrozen, or ReopenGrace. Stale, unavailable, out-of-bounds, overly uncertain, or sequencer-blocked results do not become executable prices merely because they contain a number.

New price exposure and LP additions require Live status. Valid closure or reopen-grace reads can support allowed risk-reducing actions, subject to their remaining checks. A configured closure age limit is not unlimited permission to trade against an old price.

Sequencer downtime and restart grace can block dependent actions. Trading calendars can include sessions, holidays, shortened sessions, and timezone transitions. Check the selected deployment's binding and schedule.

Oracle changes

Pool oracle rotation uses proposeOracleChangeV24 and acceptOracleChangeV24. The current v24 rotation delay is 24 hours. Proposal and acceptance validate the registered candidate, current state, and both sources; the candidate must remain within the 2% deviation bound from the current source.

Rotation is not an escape from an unreadable old source. EmergencyPause and non-normal accounting block it; ReduceOnly does not by itself block a valid rotation. Changed configuration or expired proposals require refreshed authorization and guards.

On this page