Coinlocally Docs
Perpetual Contracts
Perpetual Contracts
  • Introduction
  • Overview
    • Funding Rate
    • Mark Price
    • Index Price
    • Ladder Balancing Mechanism
    • Insurance Fund
    • Auto-Deleveraging (ADL)
  • USDT Margined Perpetual Contract
    • Introduction
    • Leverage and Position Limit
    • Ladder Maintenance Margin Rate
    • Margin and Profit/Loss Calculations
  • Coin Margined Perpetual Contracts
    • Currency Standard Perpetual Contract
    • Leverage and Position Limit
    • Ladder Maintenance Margin Rate
    • Margin and Profit/Loss Calculations
  • Functions
    • Perpetual Contract User Guide
    • One-way and Two-way Positions
    • Conditional Order
    • Take Profit, Stop Loss TP/SL
    • Take Profit Stop Loss Order
    • Contract Grid
    • Futures Copy
      • How to Carry Out a Transaction
      • Profit Sharing
      • How to Copy Trade
      • Futures Copy Trading Rules
Powered by GitBook
On this page
  • Overview
  • Marked Price Formula
  • Components Breakdown
  • Summary
  1. Overview

Mark Price

PreviousFunding RateNextIndex Price

Last updated 1 month ago

Overview

To improve the stability of the contract market and reduce unnecessary forced liquidations during periods of high volatility, the system uses a marked price rather than the last traded price. The marked price is used to:

  • Calculate a user's unrealized profit and loss (PnL)

  • Trigger forced position reductions (liquidations) when necessary

Marked Price Formula

Marked Price=Median(Platest, Preasonable, Pma)\text{Marked Price} = \text{Median} \left( P_{\text{latest}},\ P_{\text{reasonable}},\ P_{\text{ma}} \right)Marked Price=Median(Platest​, Preasonable​, Pma​)

Where:

  • Platest: Latest transaction-related price

  • Preasonable: Reasonable theoretical price

  • Pma: Moving average adjusted price

Components Breakdown

1. Latest Price Platest

This is the median of three values:

Where:

  • Pbuy1: Best bid (Buy 1)

  • Psell1​: Best ask (Sell 1)

  • Ptrade​: Last transaction price

2. Reasonable Price Preasonable

Calculated as:

Where:

  • Pindex: Spot market index price

  • Fprev​: Funding rate of the previous period

  • tremain​: Time remaining until the next funding fee settlement

  • T: Funding fee settlement interval (e.g., 480 minutes for 8-hour cycles)

3. Moving Average Price Pma​

Where:

  • MA5(Δ): 5-minute moving average of the spread

  • Spread Δ(n) is defined as:

And:

  • Pexchange(n): Exchange’s median price at time nnn

  • Pindex: Index price at time nnn

Summary

The marked price integrates:

  • Short-term trading dynamics

  • Fair value via funding-adjusted index pricing

  • Smoothing through moving averages

This hybrid pricing mechanism enhances risk control and protects users from unfair liquidations during momentary price spikes or dips.

Platest=Median(Pbuy1, Psell1, Ptrade)P_{\text{latest}} = \text{Median} \left( P_{\text{buy1}},\ P_{\text{sell1}},\ P_{\text{trade}} \right)Platest​=Median(Pbuy1​, Psell1​, Ptrade​)
Preasonable=Pindex×(1+Fprev×tremainT)P_{\text{reasonable}} = P_{\text{index}} \times \left( 1 + F_{\text{prev}} \times \frac{t_{\text{remain}}}{T} \right)Preasonable​=Pindex​×(1+Fprev​×Ttremain​​)
Pma=Pindex+MA5(Δ)P_{\text{ma}} = P_{\text{index}} + \text{MA}_5(\Delta)Pma​=Pindex​+MA5​(Δ)
Δ(n)=Pexchange(n)−Pindex(n)\Delta(n) = P_{\text{exchange}}(n) - P_{\text{index}}(n)Δ(n)=Pexchange​(n)−Pindex​(n)