Mark Price
The mark price is Reya's canonical valuation price: margin, unrealised PnL, account exposure, and liquidations are all computed against it — not against the index/oracle price. It is recalculated every second, rather than on every book change.
How the mark price is computed
The mark price is the median of up to three sub-prices:
impactPrice = w_book · (impactBid + impactAsk) / 2 + w_vwap · emaVwap
price1 = index + EMA( clamp( impactPrice − index, ±premiumClamp ), α )
price2 = Stork CEX-mark feed
markPrice = median( available of { impactPrice, price1, price2 } )impactPrice— walk each side of the book untilimpact_notionalof notional is consumed, average the two resulting impact (VWAP) prices, and blend with an EMA-VWAP of recent trades viaw_book/w_vwap. The composite is available only once both book sides can support theimpact_notionalwalk and the EMA-VWAP has been primed by at least one trade; before the first trade, or when one side of the book is too thin,impactPriceis unavailable for that tick.price1— the index anchored by a clamped, EMA-smoothed premium: the book's deviation from index is clamped to ±premiumClampeach tick and smoothed by an EMA, so no single print can yank the mark.price2— Stork's CEX-mark feed.markPrice— the median of whichever sub-prices are available (3 → the middle; 2 → their average; 1 → that one; 0 → the tick is skipped).
Taking the median of three independent sources, together with the per-tick premium clamp and EMA smoothing, is what makes the mark robust: no single venue, a thin local book, or a momentary print can move it far or fast. This is why the mark price legitimately deviates from the index — but only within a bounded, smoothed premium.
Worked-example parameters
impact_notional
$10,000
premiumClamp
50 bps (±0.5% of index, per tick)
w_book / w_vwap
0.5 / 0.5
EMA α
0.1
Recalculation interval
1 s
These values illustrate the calculation below; they are not a live parameter feed or defaults for every market. API 3.6.2 does not expose the impact notional, premium clamp, blending weights or EMA coefficient. Read the current markPrice from GET /v2/perpMarket/{symbol}/summary or the market-summary WebSocket channel; see public configuration and live values. Use that reported value rather than reconstructing the live mark from this example.
Price validity
Each new mark price is checked on-chain when it is pushed. The reference is the market's Stork CEX mark feed, not the index. It is 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. A stale on-chain mark cannot be used for settlement. See Oracle & Index Prices.
Fill validation
At settlement, a perp fill must satisfy the permitted deviation from the mark price, as well as the limit price you signed. A valid fill executes at its matched price. If the mark is stale or the fill falls outside the permitted band, settlement fails and the result is a trade bust.
The fill-price reference is the mark price, not the index. The permitted deviation is configured per market and is not exposed by API 3.6.2. The 0.5% band in the example below is illustrative, not a discoverable live setting. Set limitPx to your acceptable execution price and handle settlement outcomes through the execution-bust feed; a matching-engine fill is not a settlement guarantee.
Worked example
On one tick, for ETH with index = $3,000:
impactPrice (book trading ~40 bps rich)
$3,012
price1 (index + smoothed premium; +$12 is within the ±$15 = ±0.5% clamp)
$3,011
price2 (Stork CEX-mark)
$3,008
markPrice = median($3,012, $3,011, $3,008) = $3,011.
A taker fill at $3,013 with a permitted fill-price deviation of 0.5% (band = $3,011 ± $15.06 → $2,995.9–$3,026.1) is within band and executes at $3,013. A fill at $3,040 is outside the band and busts.
Reading the mark price
The market summary carries markPrice — see the WebSocket Info API Reference.
Last updated