neofinance
How perp exchanges derive the mark price
Liquidations and unrealised PnL on perpetual futures run off the mark price, not the last trade. Each graph below rebuilds one venue’s mark live in your browser from its public feeds, step by step, and checks the result against the number the venue publishes.
Loading graph…
The rule on Binance
Mark = median( Price 1, Price 2, Contract Price )
Price 1 = Index × (1 + last funding rate × time to next funding / funding period)
Price 2 = Index + MAn( (bid₁ + ask₁)/2 − Index ), one sample per second
Contract = last traded price on the perpetual n is 30 samples (30 seconds) for crypto perps and 60 for TradFi perps. Taking the median means no single input — one spiky trade, say — can set the mark on its own.
Live marks, side by side
| Binance | OKX | Hyperliquid | |
|---|---|---|---|
| BTC | |||
| NVDA |
BTC on Hyperliquid and xyz:NVDA are quoted in USDC; the rest in USDT. Tap a cell to open its graph.
Three venues, three philosophies
| Binance | OKX | Hyperliquid | |
|---|---|---|---|
| Shape | median of 3: funding-adjusted index, index + basis MA, last trade | index + basis MA (no median) | median of 3: oracle + basis EMA, book median, other venues’ perps (BTC) or oracle (NVDA) |
| Smoothing | simple MA, 30 s crypto / 60 s TradFi | not published; fits a ~10 s EMA | 150 s time-weighted EMA |
| Last trade used? | yes, as one median input | no | yes, inside median(bid, ask, last) |
| BTC reference | weighted avg of 8 spot venues | weighted avg of 5 spot venues (USD pairs converted) | weighted median of 7 spot venues, by validators |
| NVDA reference | dxFeed, Kaiko, Pyth Pro ÷ USDT/USD, + own perp | Pyth, Kaiko, Ondo + Binance’s and Bybit’s indexes, Hyperliquid’s oracle, own perp | trade.xyz relayer: external price 24/5, book-driven EWMA when closed |
| NVDA off-hours | EWMA modes by session; weekends from own book | leans on own contract + other venues; held within 10% of vendor stock price | oracle drifts toward impact prices, τ = 30 min; mark within ±10% discovery bound |
| Update cadence | 1 s | sub-second pushes | ~3 s |
Right now: US overnight session (read from the New York clock; exchange holidays not applied). Some venues also feed each other: OKX’s NVDA index includes Binance’s index and Hyperliquid’s oracle, and Hyperliquid’s BTC mark includes Binance’s and OKX’s perp prices. Venue fallbacks for missing data (Binance’s “last price protected”, Hyperliquid’s 30 s book EMA when an input is missing) are described but not modelled.