Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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

PriceWhat it isWhat it drives
Lastthe most recent trade on TxFlowdisplay, your fills
Marka smoothed fair priceposition valuation, unrealized PnL, liquidation
Oracleaggregated price of the underlying on external marketsthe 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.