For the complete documentation index, see llms.txt. This page is also available as Markdown.

Oracle & Index Prices

The index price is the external reference price for a market. On Reya it comes from Stork, a low-latency oracle network. It is an input to pricing — not the price your positions are marked at. That is the mark price, which is built around the index but is not equal to it.

RWA index-price sourcing (Gold, Silver, Oil, Mag7) is still being finalised and will be documented here. The crypto-market mechanism below is current.

Stork feeds

Each crypto market is configured with two Stork feeds:

Feed
Example (ETH)
Role

Spot index

ETHUSD

the market's index / peg price

CEX mark

ETHUSDMARK

one of the three inputs to the mark price, and its on-chain bound

Reya validates oracle updates for authenticity and freshness. Stork prices older than 10 seconds are excluded from mark-price and funding calculations until a fresh update arrives.

What the index price is used for

The index price is not the valuation price. It feeds two things:

  1. The mark-price anchor — the mark price is the index plus a bounded, smoothed premium (see Mark Price).

  2. The funding premium — funding is driven by how far the book trades from the index (see Funding).

The index does not bound the mark price on-chain. The CEX mark feed does.

What the CEX mark feed is used for

The CEX mark feed has two roles:

  1. A mark-price input. It is price2, one of the three sub-prices in the median (see Mark Price).

  2. The on-chain bound on the mark price. Each new mark price pushed on-chain is compared with the market's CEX mark feed, converted to USDC with USDCUSD. The push is rejected if the mark deviates from that reference by more than the market's configured tolerance. It is also rejected if the CEX mark or USDCUSD feed is stale.

Fills are not compared with the CEX mark feed or the index directly. A perp fill is checked against the on-chain mark price (see Fill validation). Every accepted mark was within tolerance of the CEX mark feed when it was pushed, so fills are anchored to that feed indirectly.

Reading prices

  • Asset oracle prices — read GET /v2/assetOraclePrices or subscribe to WS /v2/assetOraclePrices. The feed returns asset, oraclePrice, and updatedAt, and deliberately has no AMM-era poolPrice.

  • Perp summary oracle price — read oraclePrice from REST GET /v2/perpMarkets/summary or GET /v2/perpMarket/{symbol}/summary, or the corresponding WS channels. It carries the underlying's Stork spot feed (<BASE>USD, for example ETHUSD), divided by USDCUSD to quote in USDC (rUSD). The API field name stays oraclePrice. Missing spot ticks, ticks older than 60 seconds, or an unavailable cross-rate cause omission, with no CEX-mark fallback. Spot summaries use the same feed family and conversion; wrapped-token markets retain their own collateral feed (for example WBTCUSD rather than BTCUSD).

  • Mark price — read it from the market summary's markPrice field (see Mark Price).

  • Removed legacy prices feed — /v2/prices and /v2/prices/{symbol} are removed. Use asset oracle prices for collateral/index prices, market summary markPrice for perp valuation, and depth/summary fields for book prices.

Staleness

Oracle prices carry a staleness bound. A price that hasn't updated within its allowed window is treated as stale and rejected on-chain rather than used.

For perps this works in two steps. A mark-price push is rejected while the market's CEX mark or USDCUSD feed is stale, so the on-chain mark stops updating. Once the on-chain mark is older than its own staleness window, anything on-chain that needs it reverts. That includes fills and liquidations in that market. It also includes margin checks, such as on withdrawals, for any account with a position in that market. A failed fill comes back as a trade bust.

Last updated