Skip to main content

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

Mark Price=Index Price+Premium Index\text{Mark Price} = \text{Index Price} + \text{Premium Index}

Where:

ComponentDescription
Index PriceVolume-Weighted Average Price (VWAP) of recent spot market trades
Premium IndexClamped 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:

Index Price (VWAP)=i=1n(Pi×Vi)i=1nVi\text{Index Price (VWAP)} = \frac{\sum_{i=1}^{n} (P_i \times V_i)}{\sum_{i=1}^{n} V_i}

Where:

  • (P_i) = Price of trade (i)
  • (V_i) = Volume of trade (i)
  • (n) = Number of recent trades (default: 50)

Example

TradePrice (sCNH)Volume (GMYD)Value (sCNH)
11.941,0001,940
21.952,0003,900
31.93500965
41.941,5002,910

Calculation:

Total Value=1,940+3,900+965+2,910=9,715 sCNH\text{Total Value} = 1{,}940 + 3{,}900 + 965 + 2{,}910 = 9{,}715 \text{ sCNH} Total Volume=1,000+2,000+500+1,500=5,000 GMYD\text{Total Volume} = 1{,}000 + 2{,}000 + 500 + 1{,}500 = 5{,}000 \text{ GMYD} Index Price (VWAP)=9,7155,000=1.943 sCNH\text{Index Price (VWAP)} = \frac{9{,}715}{5{,}000} = 1.943 \text{ sCNH}

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

Premium Index Rate=Futures Last PriceIndex PriceIndex Price\text{Premium Index Rate} = \frac{\text{Futures Last Price} - \text{Index Price}}{\text{Index Price}}

Step 2: Clamp the Rate

Clamped Rate=clamp(Premium Index Rate,0.05%,+0.05%)\text{Clamped Rate} = \text{clamp}(\text{Premium Index Rate}, -0.05\%, +0.05\%)

Step 3: Convert to Absolute Value

Premium Index=Index Price×Clamped Rate\text{Premium Index} = \text{Index Price} \times \text{Clamped Rate}

Clamp Function

Premium Index RateClamped Rate
> +0.05%+0.05%
< -0.05%-0.05%
Between -0.05% and +0.05%Unchanged

Example

ParameterValue
Futures Last Price1.96 sCNH
Index Price1.943 sCNH

Calculation:

Premium Index Rate=1.961.9431.943=0.0171.943=0.00875=0.875%\text{Premium Index Rate} = \frac{1.96 - 1.943}{1.943} = \frac{0.017}{1.943} = 0.00875 = 0.875\%

Since 0.875% > 0.05%, apply clamp:

Clamped Rate=0.05%\text{Clamped Rate} = 0.05\% Premium Index=1.943×0.0005=0.00097 sCNH\text{Premium Index} = 1.943 \times 0.0005 = 0.00097 \text{ sCNH}

Complete Mark Price Calculation Example

Scenario: Futures Trading at Premium

ParameterValue
Spot VWAP (Index Price)1.943 sCNH
Futures Last Price1.96 sCNH

Step 1: Calculate Index Price

Index Price=1.943 sCNH (VWAP of 50 recent spot trades)\text{Index Price} = 1.943 \text{ sCNH (VWAP of 50 recent spot trades)}

Step 2: Calculate Premium Index Rate

Premium Index Rate=1.961.9431.943=0.875%\text{Premium Index Rate} = \frac{1.96 - 1.943}{1.943} = 0.875\%

Step 3: Clamp Premium Index Rate

Clamped Rate=clamp(0.875%,0.05%,+0.05%)=0.05%\text{Clamped Rate} = \text{clamp}(0.875\%, -0.05\%, +0.05\%) = 0.05\%

Step 4: Calculate Premium Index

Premium Index=1.943×0.0005=0.00097 sCNH\text{Premium Index} = 1.943 \times 0.0005 = 0.00097 \text{ sCNH}

Step 5: Calculate Mark Price

Mark Price=1.943+0.00097=1.94397 sCNH\text{Mark Price} = 1.943 + 0.00097 = 1.94397 \text{ sCNH}

Scenario: Futures Trading at Discount

ParameterValue
Spot VWAP (Index Price)1.943 sCNH
Futures Last Price1.90 sCNH

Calculation:

Premium Index Rate=1.901.9431.943=2.21%\text{Premium Index Rate} = \frac{1.90 - 1.943}{1.943} = -2.21\% Clamped Rate=clamp(2.21%,0.05%,+0.05%)=0.05%\text{Clamped Rate} = \text{clamp}(-2.21\%, -0.05\%, +0.05\%) = -0.05\% Premium Index=1.943×(0.0005)=0.00097 sCNH\text{Premium Index} = 1.943 \times (-0.0005) = -0.00097 \text{ sCNH} Mark Price=1.943+(0.00097)=1.94203 sCNH\text{Mark Price} = 1.943 + (-0.00097) = 1.94203 \text{ sCNH}

Mark Price Safety Mechanism

To prevent erroneous price updates from affecting the system, a safety check is applied:

Change Rate=New Mark PriceOld Mark PriceOld Mark Price\text{Change Rate} = \frac{\text{New Mark Price} - \text{Old Mark Price}}{\text{Old Mark Price}}
ConditionAction
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 TypeUsageSource
Mark PriceUnrealized PnL calculation, Liquidation triggersIndex Price + Premium Index
Last PriceTrading, Order executionMost recent trade in futures market

Why Use Mark Price for Liquidation?

ScenarioLast PriceMark PriceLiquidation Risk
Market manipulation (pump)2.50 sCNH1.95 sCNHShorts protected from false liquidation
Market manipulation (dump)1.50 sCNH1.93 sCNHLongs protected from false liquidation
Normal market1.95 sCNH1.94 sCNHFair liquidation based on true market value

Summary

ComponentFormula / Description
Index PriceVWAP = Σ(Price × Volume) / Σ(Volume)
Premium Index Rate(Futures Last Price − Index Price) / Index Price
Clamped Rateclamp(Premium Index Rate, −0.05%, +0.05%)
Premium IndexIndex Price × Clamped Rate
Mark PriceIndex Price + Premium Index
Safety LimitReject 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