Sub topic 7
Mark Price Versus Last Price and Why Liquidations Use It
Assume you understand long and short positions, margin, leverage, and the basic idea of a perpetual futures contract. This chapter focuses on how an exchange decides the price used to measure unrealized profit and loss and trigger liquidation.
Last price: the most recent trade
The last price is the price at which the latest trade occurred on an exchange. It changes whenever a buyer and seller match an order.
For example, suppose these trades occur:
| Trade | Price |
|---|---|
| Earlier trade | $100.00 |
| Next trade | $100.20 |
| Last trade | $99.80 |
The last price is now $99.80. It tells you what the most recent matched order paid, but it may not represent the broader market.
A thin order book can produce an unusually high or low last price. A trader might place a large market order, consume several orders, and briefly move the last traded price. If liquidation depended only on that price, a short-lived transaction could trigger forced closing.
Mark price: a market-based reference
The mark price is an exchange-calculated estimate of a fair current price. Exchanges usually derive it from an index price, which combines spot prices from several markets, and sometimes add a controlled basis or funding adjustment.
The exact formula differs by exchange. The purpose is consistent: reduce the effect of a single abnormal trade on account health.
The exchange compares your position's unrealized profit or loss with the mark price. For a long position, a lower mark price means a larger unrealized loss. For a short position, a higher mark price means a larger unrealized loss.
def unrealized_pnl(entry, mark, quantity, side):
"""Calculate linear-contract unrealized P&L using the mark price."""
if side == "long":
return (mark - entry) * quantity
if side == "short":
return (entry - mark) * quantity
raise ValueError("side must be 'long' or 'short'")
print(unrealized_pnl(100, 98, 2, "long")) # -4
print(unrealized_pnl(100, 98, 2, "short")) # 4The displayed chart may show the last price, while the liquidation indicator uses the mark price. This can make a position appear safe or unsafe depending on which number you are watching.
Why liquidation uses the mark price
Liquidation is a risk-control process. The exchange closes a position when the account no longer has enough equity to cover the maintenance margin requirement.
Using the last price would create two problems:
- A temporary bad trade could liquidate a healthy position.
- Traders could manipulate a thin market to trigger other accounts.
A mark price does not remove risk. It creates a wider and harder-to-manipulate reference by using multiple market prices and smoothing abnormal moves.
Practical checks
When managing a leveraged position:
- Use the mark price to estimate liquidation risk.
- Use the last price to understand recent trades and possible execution levels.
- Read the exchange's index, mark-price, margin, and liquidation formulas.
- Leave a buffer instead of treating the displayed liquidation price as exact.
- Account for fees, funding, price gaps, and changes in maintenance-margin tiers.
Exercise
A long position has an entry price of $100. The last price falls briefly to $94, but the mark price is $97. Which price normally determines whether the position reaches its liquidation threshold?
Show answer
The mark price, $97, normally determines the liquidation check. The last price still matters for recent trading and execution, but it usually does not trigger liquidation by itself.