Why oracles matter

Price markets use oracle prices to open positions, close positions, compute health, and check liquidation. The oracle is the source of truth for the market price used by the contract. The app display can lag, fail, or differ from the price that lands in your transaction.

What the oracle price means

Each market uses a single oracle price — the tracked asset valued in the market’s collateral token, normalized to a common 1e18 scale. There is no separate “mark price” and “index price”: the same oracle price is used to open, value (mark), close, compute health, check liquidation, and settle. When that price moves, everything moves with it.

Supported oracle patterns

Deployments may use Chainlink, Pyth, or onchain TWAP-style sources depending on the market. Some Pyth-backed actions require a price update in the same transaction and an ETH fee to pay for that update. If the price update data is missing or stale, the transaction can fail. Some markets can also use adapter contracts that normalize different price sources for the pool. The configured adapter matters more than the brand of oracle shown in the app, because the adapter defines validation and freshness checks. Chainlink-style feeds can fail when the answer is zero or negative, when the reported round is stale (older than the latest round), when the price is older than the market’s staleness window, or when it falls outside the market’s configured price bounds. Pyth markets use a pull-update flow, so the app or router refreshes the feed before opening, closing, or liquidating. Even after a fresh update, a Pyth read can still be rejected if the feed’s confidence interval is too wide relative to the price (each market sets a maximum confidence). A too-wide confidence reverts the transaction, so a successful price update does not guarantee a successful trade. DEX-backed markets can read onchain spot or TWAP adapters. TWAP windows can reduce short-term manipulation risk, but they still depend on pool liquidity, window length, and adapter configuration.

Stale or invalid prices

Oracle contracts can reject stale, zero, negative, or unreasonable prices. By default a price older than 10 minutes is treated as stale, and a price above an upper sanity bound is rejected (both are tunable per market). When a price is rejected, opening, closing, and liquidation are all unavailable until the oracle is updated — in a stressed market you may be temporarily unable to close. DEX adapters do not apply a time-based staleness check the way Chainlink and Pyth do — they read the current onchain pool state. A TWAP window (at least 30 minutes) resists short-term manipulation, but it is not a freshness guarantee, and a live read is still risky if the underlying pool is thin or manipulated.

Oracle changes

Oracle changes are timelocked, and there are two separate flows, each a 24-hour propose-then-accept process:
  • Swapping a market’s oracle is controlled by a risk role on the pool, with a 24-hour delay before the new oracle can be accepted. A new oracle must match the market and collateral configuration.
  • Changing an oracle’s underlying data source (for example the upstream feed) is controlled by the oracle’s owner, with its own 24-hour delay.
No one can set an arbitrary price directly; a source can only be swapped through these timelocked flows.

User checklist

  • Confirm the market name and oracle source.
  • Check whether the app is asking you to pay a Pyth update fee.
  • Avoid signing if the displayed price looks stale or inconsistent.
  • Recheck position health after large oracle moves.