CVEX Docs
WebsiteAffiliate DashboardTestnet
  • Website
  • Trading Terminal
  • Introduction
    • CVEX Overview
    • Component Breakdown and Definitions
    • Use Cases and Applications for Futures and Options
  • Background
    • The State of Cryptocurrency Trading and Problems Faced
    • Perpetual Contracts and Their Limitations
    • Options Trading in Crypto Markets
    • Conclusion
  • Protocol
    • Overview
    • Protocol Owner
    • Platforms
    • Price & Risk Oracles
    • Contracts
    • Order Types
    • Positions
    • Range Orders
    • Matching Engine
    • Collateral Token (USDC)
    • Frontends
    • Clearance Bots
    • CVEX Token
    • Fees & Rewards
  • Margin & Liquidations
    • Overview
    • Futures Mark Price
    • Black Scholes Model
    • Implied Volatility Surface
    • Premium Mark Price
    • Options Hedge Ratio
    • Value-at-Risk Model
    • Risk Parameters
    • Initial & Required Margin
    • Liquidation Protocol
    • Default Fund
    • Deleverage Queue
    • Default Prevention
  • Crypto Valley Exchange Platform
    • Overview
      • Case Studies
    • Contracts
    • Margin Model
    • Fees & Rewards
    • Go To Market Strategy
    • Affiliate Marketing
    • Market Makers
    • Brokers & Structured Product Providers
    • Front End & Builder Incentives
    • Price & Risk Oracles
  • Building on CVEX
    • Development Resource
  • Strategy
    • Security measures & Risk Prevention
    • Future Work
    • Legal & Compliance
    • Team and Advisors
    • Conclusion
  • Disclaimer
  • Credits
Powered by GitBook
On this page
  1. Margin & Liquidations

Futures Mark Price

PreviousOverviewNextBlack Scholes Model

Last updated 1 year ago

In traditional futures trading, a position's value is typically marked to the last trading price. However, in cases of market manipulation, illiquidity or abnormal volatility, this last price might not accurately reflect the market value, potentially leading to unnecessary liquidations. This will be particularly true in times where there is less liquidity, such in the early days of a new exchange.

To address this, the CVEX Protocol continuously re-evaluates the contract's fair price, known as the Mark Price. This serves as an anchor to the market's perception of the true value of a contract, independent of immediate order book fluctuations.

The Mark Price is used to assess traders’ positions value for futures and perpetual contracts, which in turn is used to calculate equity and maintenance margin. This approach acts as a stabilising force against market manipulation and safeguards against unwarranted liquidations due to market anomalies.

The Mark Price is calculated from the Index Price of the underlying asset, provided by the Price Oracle, and the Last Price, obtained from the contract's order book. This price is recalculated in sync with the Price Oracle updates, typically ranging from every 1 to 20 minutes. The Last Price is determined as the median value between the lowest ask and the highest bid prices in the CVEX order book, which is then averaged over the period of the Index Price updates:

Afterwards, the protocol computes the contract basis as a moving average of the difference between the Index Price and the Last Price. While the price of a futures contract often differs from the underlying asset price due to factors like time value and market expectations, their movements are typically highly correlated in the short term. Therefore, the spread between these prices remains stable and represents the market's collective cost of carrying underlying assets.

By incorporating a moving average of the basis into the Mark Price calculation, CVEX diminishes the influence of anomalous price spikes. Finally, we calculate the current Mark Price by simply adjusting the current Index Price with the basis:

This approach to Mark Price calculations protects its value against price manipulation, while simultaneously preserving its sensitivity to genuine market trends, as reflected in the Index Price.

LastPrice=1n∑BidPrice+AskPrice2LastPrice=\frac 1 n \sum \frac {BidPrice + AskPrice} 2LastPrice=n1​∑2BidPrice+AskPrice​
Basis=MovingAverage(LastPrice−IndexPrice)Basis = MovingAverage(LastPrice - IndexPrice)Basis=MovingAverage(LastPrice−IndexPrice)
MarkPrice=IndexPrice+BasisMarkPrice = IndexPrice+BasisMarkPrice=IndexPrice+Basis
Drawing