The calculation of Mark Price is intricately linked to the Funding Rate and vice versa. It is highly recommended to read both sections to get a complete picture of how the system works.
As Unrealized PNL is the primary driver of liquidations, it is important to ensure that the Unrealized PnL calculation is accurate to avoid unnecessary liquidations. The underlying contract for the Perpetual Contract is the ‘true’ value of the Contract, and an average of the prices on the major markets constitutes the “Price Index” which is the primary component of Mark Price.
The Price Index is a bucket of prices from the major Spot market exchanges, weighted by their relative volume. The Price Index for USDⓈ-M futures contracts derived prices from Huobi, Bittrex, HitBTC, Gate.io, Bitmax, Poloniex, FTX, MXC.
Check out the Price Index references for each USDⓈ-M Futures Contract.
There are additional protections to avoid poor market performance during outages of Spot exchanges or during connectivity problems:
- Single price source deviation: When the latest price of a certain exchange deviates more than 5% from the median price of all price sources, the exchange weight will be set to zero for weighting purposes.
- Multi price source deviation: If more than 1 exchange shows greater than 5% deviation, the median price of all price sources will be used as the index value instead of the weighted average.
- Exchange connectivity problem: If we can’t access the data feed for an exchange and this exchange has trades updated in the last 10 seconds, we can take price data from the last result and use it for index calculation. If one exchange has no updates for 10 seconds, the weight of this exchange will be zero when calculating the weighted average.
- Last Price Protected: When it is unable to obtain a stable and reliable source of reference data for "Price Index" and "Mark Price", for those contracts that have a single source of Price Index, the Price Index will not be updated. We will use a mechanism called “Last Price Protected" to update the Mark Price until it is back to normal. The “Last Price Protected” is a mechanism that the matching system temporarily switches to the latest transaction price of the contract itself within a certain limit as reference for Mark Price, to calculate unrealized profit and loss and liquidation call level, in order to avoid unnecessary liquidation.
Now that we’ve computed the Price Index, which can be considered as the “Spot Price”, we can move forward in calculating the Mark Price which is used for all Unrealized PnL calculations. Note that Realized PnL is still based on the actual executed market prices.
Mark price formula for perpetual futures contracts is as follows:
Mark price = Median* (Price 1, Price 2, Contract Price)
Price 1 = Price Index * (1 + Last Funding Rate * (Time Until Funding /8))
Price 2 = Price Index + Moving Average (30-minute Basis)*
*Moving Average (30-minute Basis) = Moving Average ((Bid1+Ask1)/2- Price Index), which measures every minute in a 30-minute interval
*Median: If Price 1 < Price 2 < Contract Price, then take Price 2 as Mark price.
Please note that due to extreme market conditions or deviations in price sources, which may lead to mark price deviate from the spot price, Binance will take additional protective measures, i.e. Mark price = Price 2 in this scenario.
Mark Price is a better estimate of the ‘true’ value of the contract, compared to Perpetual Futures prices which can be more volatile in the short term. We use this price to prevent unnecessary liquidations for traders and to discourage any market manipulations by poor actors.
- BTCUSD Index = Σ [(BTCUSD of Bitstamp) x Weightage 1) + (BTC-USD of Coinbase Pro x Weightage 2) + (XBT/USD of Kraken x Weightage 3) + (USD-BTC of Bittrex x Weightage 4) + ( BTCBUSD of Binance x Weightage 5)] / Total Weightage
- Cross Rate: For some underlying assets with no direct quotes, we should use synthetic price, calculating cross-exchange rate as the synthetic index, e.g. calculating LINK/USD with LINK/BTC and BTC/USD
- Binance reserves the right to update the Price Index references from time to time without prior notice.