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.
Stork feeds
Each crypto market is configured with two Stork feeds:
Spot index
ETHUSD
the market's index / peg price
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:
The mark-price anchor — the mark price is the index plus a bounded, smoothed premium (see Mark Price).
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:
A mark-price input. It is
price2, one of the three sub-prices in the median (see Mark Price).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 orUSDCUSDfeed 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/assetOraclePricesor subscribe to WS/v2/assetOraclePrices. The feed returnsasset,oraclePrice, andupdatedAt, and deliberately has no AMM-erapoolPrice.Perp summary oracle price — read
oraclePricefrom RESTGET /v2/perpMarkets/summaryorGET /v2/perpMarket/{symbol}/summary, or the corresponding WS channels. It carries the underlying's Stork spot feed (<BASE>USD, for exampleETHUSD), divided byUSDCUSDto quote in USDC (rUSD). The API field name staysoraclePrice. 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 exampleWBTCUSDrather thanBTCUSD).Mark price — read it from the market summary's
markPricefield (see Mark Price).Removed legacy prices feed —
/v2/pricesand/v2/prices/{symbol}are removed. Use asset oracle prices for collateral/index prices, market summarymarkPricefor 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