Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Oracle

The oracle supplies the prices and funding rates that drive valuation, liquidation, and funding settlement. Prices are fed on-chain as governance transactions, so every node sees identical values in the same block — there is no off-chain price source that nodes must independently trust.

What the oracle publishes

Each oracle update targets one instrument and carries:

FieldMeaning
Instrumentthe market this update applies to
Mark priceused for valuation, unrealized PnL, and liquidation
Oracle priceaggregated external reference price for the underlying
Funding ratepublished in percent — divide by 100 for the decimal rate used in settlement (so 0.01 means 0.01%)
Timestampsource timestamp of the price (milliseconds)
Buy / sell price boundsoptional max and min order prices per side; orders outside them are rejected by the matching engine
Open-interest limitoptional cap on the instrument's open interest

Price bounds and the open-interest limit are optional: when an update omits them, the instrument keeps trading without that constraint.

Mark price vs. oracle price

  • Mark price is used for position valuation, unrealized PnL, and liquidation triggers. It is smoothed to resist short-term wicks, so a momentary spike on one venue does not cause unwarranted liquidations.
  • Oracle price is the aggregated external reference for the underlying asset and anchors the perpetual's funding rate.

Who can feed prices

Oracle updates are governance operations and execute first within each block during deterministic execution, so all subsequent matching, clearing, and risk logic in that block uses the freshly published prices.

Who may publish an update is resolved in priority order — a higher level that is configured takes precedence:

  1. a price feeder pinned on the instrument, if set;
  2. the channel's authorized oracle feeders, if the instrument belongs to a channel;
  3. otherwise, platform-level authorized signers.

Every node that accepts the block sees the same prices.