Contract Mark Price
In perpetual contract trading, the Mark Price is a core concept you must understand. It not only affects the Unrealized PnL displayed in your account, but also directly determines when your position will be subject to forced liquidation. This article explains what the Mark Price is, what role it plays, and how it is calculated.
Section 1: What Is the Mark Price?
The Mark Price is the fair price reference used in the perpetual contract system to calculate Unrealized PnL, trigger forced liquidation, and determine the maintenance margin ratio. It is not simply the latest market trade price. Instead, it is a robust price derived from the Index Price, funding rate, mid-price basis, and latest trade price through mechanisms such as median calculation, observation-period fallback, and clamping.
The Mark Price is a fair reference price calculated by the system for each perpetual contract, used to:
- Calculate the Unrealized PnL of your position
- Determine whether forced liquidation is triggered
- Calculate the maintenance margin ratio
It is not equal to the latest market trade price. If the trade price were used directly to calculate PnL and liquidation, it would be easy for prices to be manipulated by a small number of large orders or by shallow order book depth — a single abnormal trade could incorrectly trigger forced liquidation on other users' normal positions.
The Mark Price therefore aggregates multiple price sources using a robust calculation methodology, with three objectives:
- Prevent market manipulation (avoiding incorrect liquidations caused by abnormal trades or thin order books)
- Smooth price volatility (filtering short-term price spikes to provide a stable risk management benchmark)
- Reflect funding costs (incorporating the funding rate to reflect the time value of long and short positions)
There are also two key points to remember::
1.The Mark Price is used to measure Unrealized PnL, but does not affect your actual profit or loss. Realized PnL only occurs when you close your position or when it is forcibly liquidated.
2.Forced liquidation only occurs when the Mark Price reaches your liquidation price. Even if the latest trade price fluctuates dramatically, your position remains safe as long as the Mark Price has not reached the liquidation threshold.
Section 2: How Is the Mark Price Calculated?
The Mark Price is composed of three core price components. The system selects a calculation path based on its current state, then applies a reasonableness clamp to ensure the price always falls within an acceptable range.
Mark Price Calculation:
Under normal conditions, the system takes the median of three price sources. If market anomalies occur (observation period), only the mid-price basis fair value is used. If even the normal calculation cannot be completed (fallback mode), the system reverts to the last cached price or the Index Price. In all cases, the final result is clamped within a range above and below the Index Price to prevent the Mark Price from deviating too far from the spot price.
The three core price components used to calculate the Mark Price are:
1. Funding Rate Adjusted Price
Funding Rate Adjusted Price = Index Price × (1 + Funding Rate × Hours Until Next Settlement / Funding Rate Collection Period)
Purpose: Converts the funding rate into a price offset so the Mark Price converges smoothly within the settlement cycle, preventing large price jumps near settlement.
2. Latest Trade Price
Purpose:
- Reflects actual market trade conditions
- Used to calculate the basis between perpetuals and spot
- Participates in the median calculation
3. Mid-Price Basis Fair Value
Purpose:This component is derived from the moving average of the basis between the order book mid-price and the Index Price over a time window, filtering out instantaneous order book fluctuations.
Formulas:
Order Book Mid-Price:
Mid-Price = ( Best Bid + Best Ask) / 2 |
Basis:
Basis = Mid-Price − Index Price |
Moving Average of Basis:
Moving Average(Basis) = (Basis₁ + Basis₂ + … + Basisₙ) / N |
N: number of valid sample points within the time window (Basis Moving Average Window, in seconds)
Basisᵢ: basis at each sampling moment
Mid-Price Basis Fair Value = Index Price + Moving Average(Basis) |
Section 3: Final Mark Price
Final Mark Price = clamp(Raw Mark Price, Index Price×(1−Deviation Coefficient), Index Price×(1+Deviation Coefficient))
Raw Mark Price = one of the following, selected based on system state:
- Normal path: Median(Funding Rate Adjusted Price, Latest Trade Price, Mid-Price Basis Fair Value)
- Observation period path: Mid-Price Basis Fair Value
- Fallback path: Last Cached Price or Index Price
Deviation Coefficient = 0.5% (not fixed)
Section 4: Summary
The Mark Price is the fair price reference used in the perpetual contract system to calculate Unrealized PnL, trigger forced liquidation, and maintain the margin ratio. It aggregates the Index Price, funding rate, order book basis, and latest trade price, computed through mechanisms including median calculation, observation-period fallback, and clamping, with the goal of providing a robust price reference that is resistant to manipulation.
Always remember: the Mark Price — not the latest trade price — is what determines whether your position is subject to forced liquidation. Before and during trading, we recommend monitoring the distance between your position's Mark Price and liquidation price, and managing your leverage responsibly to reduce unnecessary liquidation risk.