Skip to main content
Mark price is the fair-value signal that drives unrealized PnL, maintenance margin, liquidation price, and most stop/take-profit triggers. It is derived from a mix of oracle data, on-chain order book state, funding basis, and external venue prices, then combined into a single number that is hard to manipulate and responsive to real market movement. Mark price is recomputed every 3 seconds, synchronously with the oracle price update in the same block, and every block for its EMA component.

Four-price median model

Intention computes four independent candidate prices and takes the median. This filters out any single-source anomaly.
mark_price = median(Price1, Price2, Price3, Price4)

Price 1 — Oracle plus EMA basis

Price1 = oracle_price + EMA_150s(platform_mid − oracle_price)
Uses a 150-second exponential moving average of the basis between Intention’s own book mid and the oracle. This reflects whether the local book is systematically trading above or below the spot index, smoothed to resist manipulation. The EMA formula is:
numerator → numerator × exp(-t / 150s) + sample × t
denominator → denominator × exp(-t / 150s) + t
ema = numerator / denominator
The time delta t uses block timestamps, so a long pause between blocks lets the EMA jump to the new sample quickly — appropriate behavior after a system recovery.

Price 2 — Platform book median

Price2 = median(best_bid, best_ask, last_trade_price)
A single snapshot of the platform’s own market. Taking the median of three inputs filters out spikes from single wild fills or lopsided books.

Price 3 — Oracle with funding basis

Price3 = oracle_price × (1 + last_funding_rate × time_to_next_funding_hours)
Projects the oracle price forward by the expected funding drift. Captures structural premium or discount from the funding mechanism.

Price 4 — Volume-weighted CEX perp median

Price4 = volume_weighted(Binance, OKX, Bybit, Hyperliquid perp mids)
The volume-weighted median of the same contract’s mid price at major external venues. Protects against cases where the internal oracle or book diverges from the rest of the market.

Why four sources

Each source covers a different failure mode:
  • Oracle alone is vulnerable to index manipulation or data lag
  • Platform book alone is vulnerable to internal spoofing
  • Funding basis alone is predictable but slow
  • External CEX mids protect against cross-venue divergence
Taking the median makes the mark price robust to any single source misbehaving. If three of four are healthy, the fourth can be wildly wrong without moving the result.

Failover

If fewer than three external sources are available or any price component cannot be computed, the system degrades gracefully — switching to a three-price median or falling back to internal-only sources — and automatically returns to four-source mode when the data is healthy again. The transition is smooth, without sudden jumps.

What mark price drives

Mark price is used everywhere risk is quantified:
  • Unrealized PnL. The headline P&L shown in the UI, computed against the entry price.
  • Maintenance margin and MMR. Positions are evaluated against mark, not last trade, so a single wild trade cannot liquidate you.
  • Liquidation trigger. For isolated positions, mark price crossing the liquidation price starts the process.
  • Stop and take-profit triggers when users choose mark-price triggering.
  • Funding settlement. The notional value of each position at funding time uses mark price.
  • Order-book price bands. The band that caps how far limit orders can sit from fair value is derived from mark price.

Update cadence and determinism

Mark price updates at the same 3-second cadence as the index price, triggered by index-price refreshes. If the index price goes stale for more than 6 seconds, mark price force-updates from whatever components are still healthy. The EMA component recomputes every block so that the basis signal does not lag block production. Every input, every intermediate, and the final mark price are logged on every update. Any validator or auditor can reconstruct the computation from public data, and the risk team uses these logs to track dispersion across sources and fire alarms on anomalies.

What it is not

Mark price is not the last trade price. Traders sometimes wonder why their unrealized PnL does not match the latest tick on the chart. Mark price intentionally does not follow single-trade spikes — if it did, a 0.01 BTC retail fill could wipe out a billion-dollar book.