The mark price and funding rate are closely interconnected. We recommend thoroughly reading this document to fully understand the mechanics of perpetual contract trading.

Importance of Mark Price

Unrealized profit and loss (PnL) is a primary cause of forced liquidations. With perpetual contracts offering a maximum leverage of 200x, accurately calculating unrealized PnL is critical to avoiding unnecessary liquidations. The mark price, derived from the price index, serves as the foundation for calculating unrealized PnL and reflects the contract’s intrinsic value.

Price Index Calculation

The price index is a weighted average of prices from major spot markets, based on their trading volumes. Referenced exchanges include: Bitfinex, Binance, Huobi, OKEx, Bittrex, HitBTC.

To ensure price index stability, we implement the following safeguards:

  1. Single Price Source Deviation: If an exchange’s latest price deviates by more than 5% from the median price of all sources, its price weight is set to zero.

  2. Multiple Price Source Deviation: If more than one exchange’s price deviates by over 5% from the median, the median price replaces the weighted average as the price index.

  3. Exchange Connectivity Issues: If an exchange’s data source updates within the last 10 seconds, we use the latest data for the price index. If no update occurs, the exchange’s weight is set to zero.

💡The price index represents a fair spot price, used to calculate the mark price and, subsequently, unrealized PnL. Note that actual PnL is determined by the market price at the time of position closure.

Mark Price Calculation

The mark price is updated every 8 hours, in sync with funding rate settlements. The calculation is as follows:

  1. Basis = Funding rate × (Time to next funding rate settlement (hours) ÷ 8)
  2. Mark Price = Price index + Moving average (1-minute basis) 

💡 
The 1-minute basis is the average of [(Bid 1 price + Ask 1 price) ÷ 2 - Price index] over the past minute, calculated every second (60 data points).

Example:

Funding Rate

0.04%

TIme to Next Settlement

5小時

Price Index

12,000

Calculation:

  1. Basis = 0.04% × (5 ÷ 8) = 0.025%
  2. Mark Price = 12,000 × (1 + 0.025%) = 12,003

💡Compared to the volatile futures price, the mark price provides a stable reflection of the contract’s intrinsic value, helping to prevent unnecessary liquidations and market manipulation.

Unrealized Profit and Loss Calculation

In USD terms, unrealized PnL is calculated as follows:

  1. Long Position Unrealized PnL = Position size × (Latest market price - Average entry price)
  2. Short Position Unrealized PnL = Position size × (Average entry price - Latest market price)

Hence,

Margin Balance = Initial margin + Realized PnL + Unrealized PnL

💡Withdrawals are possible as long as the margin balance exceeds (initial margin + borrowed amount).

For more details, please refer to「How to Calculate Profit and Losses & PnL%?

⚠️In case of discrepancies in translations, the English version shall prevail.

LBank Community


Take Action Now
Register an account and get up to a $6,000 welcome bonus!
Invite others to join and earn a 30% commission!

Contact Us
For issues, contact us at service@lbank.com. We offer quality customer service to address your queries promptly.

Disclaimer
Digital asset trading carries high risks, with price volatility that may lead to loss of principal. Users are solely responsible for investment decisions; LBank is not liable for losses. Understand product risks and invest only in familiar areas; consider seeking advice from a professional financial advisor. LBank’s content is not financial advice, and we reserve the right to modify this disclaimer at any time.