Four-price median model
Intention computes four independent candidate prices and takes the median. This filters out any single-source anomaly.Price 1 — Oracle plus EMA basis
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
Price 3 — Oracle with funding basis
Price 4 — Volume-weighted CEX perp median
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
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.