Mark vs. Oracle Price
A perpetual has more than one "price." Knowing which one drives what protects you from surprises around liquidation and funding.
The three prices
| Price | What it is | What it drives |
|---|---|---|
| Last | the most recent trade on TxFlow | display, your fills |
| Mark | a smoothed fair price | position valuation, unrealized PnL, liquidation |
| Oracle | aggregated price of the underlying on external markets | the funding anchor |
Why liquidation uses mark, not last
On thin liquidity, a single aggressive order can spike the last price for an instant. If liquidation used the last price, that wick could liquidate healthy positions unfairly. The mark price is deliberately smoothed, so a momentary spike doesn't trigger liquidations — your position is valued against a price that reflects the broader market, not one print.
How the oracle price ties in
Funding pulls the contract back toward the oracle price:
- contract trading above the oracle price → positive funding → longs pay → discourages longs → price drifts back down
- contract trading below the oracle price → negative funding → shorts pay → drifts back up
So the oracle price keeps the perpetual honest to the underlying over time, while the mark keeps valuation and liquidation fair in the moment.
Where they come from
Both are published on-chain by validators each block, identical for every trader — there's no per-user price. Read live values (markPx, oraclePx, lastPrice) from activeAssetCtx, available both as an Info API query and as a WebSocket channel. For the protocol-level detail, see the Oracle page.