Mark price
What is Mark Price?
In order to improve the stability of the contract market and reduce unnecessary forced liquidation when the market is abnormally volatile, we use the Mark Price to calculate the user's unrealized profit and loss and trigger forced liquidation.
The Mark Price is designed to:
- Prevent market manipulation from triggering unfair liquidations
- Provide a fair reference price that reflects the true market value
- Protect traders from sudden price spikes or flash crashes
Mark Price Algorithm
Where:
| Component | Description |
|---|---|
| Index Price | Volume-Weighted Average Price (VWAP) of recent spot market trades |
| Premium Index | Clamped price difference between futures and spot market |
Index Price Calculation
The Index Price is calculated using VWAP (Volume-Weighted Average Price) from recent spot market trades:
Where:
- (P_i) = Price of trade (i)
- (V_i) = Volume of trade (i)
- (n) = Number of recent trades (default: 50)
Example
| Trade | Price (sCNH) | Volume (GMYD) | Value (sCNH) |
|---|---|---|---|
| 1 | 1.94 | 1,000 | 1,940 |
| 2 | 1.95 | 2,000 | 3,900 |
| 3 | 1.93 | 500 | 965 |
| 4 | 1.94 | 1,500 | 2,910 |
Calculation:
Premium Index Calculation
The Premium Index measures and limits the deviation between the futures contract price and the spot (index) price:
Formula
Step 1: Calculate Premium Index Rate
Step 2: Clamp the Rate
Step 3: Convert to Absolute Value
Clamp Function
| Premium Index Rate | Clamped Rate |
|---|---|
| > +0.05% | +0.05% |
| < -0.05% | -0.05% |
| Between -0.05% and +0.05% | Unchanged |
Example
| Parameter | Value |
|---|---|
| Futures Last Price | 1.96 sCNH |
| Index Price | 1.943 sCNH |
Calculation:
Since 0.875% > 0.05%, apply clamp:
Complete Mark Price Calculation Example
Scenario: Futures Trading at Premium
| Parameter | Value |
|---|---|
| Spot VWAP (Index Price) | 1.943 sCNH |
| Futures Last Price | 1.96 sCNH |
Step 1: Calculate Index Price
Step 2: Calculate Premium Index Rate
Step 3: Clamp Premium Index Rate
Step 4: Calculate Premium Index
Step 5: Calculate Mark Price
Scenario: Futures Trading at Discount
| Parameter | Value |
|---|---|
| Spot VWAP (Index Price) | 1.943 sCNH |
| Futures Last Price | 1.90 sCNH |
Calculation:
Mark Price Safety Mechanism
To prevent erroneous price updates from affecting the system, a safety check is applied:
| Condition | Action |
|---|---|
| Change Rate ≤ 10% | Update accepted |
| Change Rate > 10% | Update rejected |
This protects against:
- Erroneous external price data
- Flash crashes in the spot market
- API errors or malformed data
Mark Price vs Last Price
| Price Type | Usage | Source |
|---|---|---|
| Mark Price | Unrealized PnL calculation, Liquidation triggers | Index Price + Premium Index |
| Last Price | Trading, Order execution | Most recent trade in futures market |
Why Use Mark Price for Liquidation?
| Scenario | Last Price | Mark Price | Liquidation Risk |
|---|---|---|---|
| Market manipulation (pump) | 2.50 sCNH | 1.95 sCNH | Shorts protected from false liquidation |
| Market manipulation (dump) | 1.50 sCNH | 1.93 sCNH | Longs protected from false liquidation |
| Normal market | 1.95 sCNH | 1.94 sCNH | Fair liquidation based on true market value |
Summary
| Component | Formula / Description |
|---|---|
| Index Price | VWAP = Σ(Price × Volume) / Σ(Volume) |
| Premium Index Rate | (Futures Last Price − Index Price) / Index Price |
| Clamped Rate | clamp(Premium Index Rate, −0.05%, +0.05%) |
| Premium Index | Index Price × Clamped Rate |
| Mark Price | Index Price + Premium Index |
| Safety Limit | Reject updates with > 10% change |
Key Points
- Index Price is based on VWAP of spot market trades (50 recent trades)
- Premium Index is clamped to ±0.05% to prevent extreme deviations
- Mark Price is used for unrealized PnL and liquidation calculations
- Safety mechanism rejects updates exceeding 10% change
- The system protects traders from market manipulation and flash crashes