Documentation
SocialsStatisticsLaunch App
  • Welcome to Mars Protocol
  • Getting Started
    • How to set up a Wallet
    • Connect your wallet
    • Using a Credit Account
  • Credit Accounts
  • Perpetual Futures (Perps)
    • Perps Vault (Counterparty Vault)
    • Funding Rate Mechanism
    • Price Impact
    • Open Interest Caps
    • Vault Solvency Protection
    • Health Factor
    • Liquidations
  • Spot & Margin Trading
  • Lending & Borrowing
  • Leveraged Yield Farming
  • High Leverage Strategies
  • Managed Vaults
    • Creating a Vault
      • How to Resume Vault Creation After Failed Transaction
    • Managing a Vault
    • Depositing into Vault
  • Risk Methodology
    • Asset Listing
    • Protocol Risk Framework
    • Perps Risk Framework
      • Maximum Leverage & LTVs
      • SkewScale
      • Open Interest Caps
      • Maximum Funding Velocity
      • Mitigating Risks of Static Parameters
    • Deposit Caps Risk Framework
  • Governance
    • MARS Token
  • Smart Contracts
    • Address Provider
    • Account NFT
    • Credit Manager
    • Health
    • Incentives
    • Oracle
    • Params
    • Red Bank
    • Rewards Collector
    • Swapper
    • Zapper
    • Perps
  • Brand kit
    • The Mars Brand
  • Legal
    • Mars FUD Bible
    • Terms of Service
    • Privacy Policy
    • Cookie Policy
Powered by GitBook
On this page
  • Calculation
  • Max Leverage
  • Max Leverage Caps
  • Max LTV
  • Liquidation LTV
  • Input Data
  • Key Parameters
  • Key Assumptions
  • Special Cases
Edit on GitHub
Export as PDF
  1. Risk Methodology
  2. Perps Risk Framework

Maximum Leverage & LTVs

This section details how maximum leverage and LTVs are calculated using extreme-loss methodology to ensure adequate margin coverage against potential losses.

Parameter Calibration Rationale

Initial margin should adequately cover potential extreme losses for a perp position within a defined risk horizon (liquidation horizon). This provides a suitable buffer against significant potential price fluctuations between the liquidation and bankruptcy levels in the probabilistic sense ensuring coverage in most historical scenarios.

Calculation

To set initial margin requirements and maximum leverage for each market we use the well-known extreme-loss approach widely used in traditional finance. The fundamental principle of this approach is:

%InitialMargin≥%ExtremePotentialLosses\% InitialMargin \geq \% ExtremePotentialLosses%InitialMargin≥%ExtremePotentialLosses

The extreme potential loss in the position value is primarily represented by the unrealized price PnL on the leveraged perp position, which is calculated as follows:

UPnL=q⋅(p−p0)=q⋅p0⋅rUPnL = q \cdot (p - p_{0}) = q \cdot p_{0} \cdot rUPnL=q⋅(p−p0​)=q⋅p0​⋅r

where qqq is the position size (positive for longs and negative for shorts), p0p_{0}p0​ is the entry price of the underlying asset, p=(1+r)⋅p0p = (1 + r) \cdot p_{0}p=(1+r)⋅p0​ is the market price at the current time, and rrr is the percentage price change over the risk horizon hhh.

Note. Here we do not account for other potential risk factors like funding fees or the price impact, though these could influence unrealized PnL. The conservative 12-hour window is intended to capture significant price fluctuations, which should also encompass the effects of volatility in other risk factors.

To determine potential extreme losses from unfavorable price movements, the CVaR risk metric is used with a risk horizon hhh. The horizon represents the period during which a position should be liquidated. Even if the position isn't immediately liquidated when the margin reaches the liquidation level, a buffer remains. This buffer ensures that extreme price changes during this period are unlikely to result in bankruptcy. We conservatively set the risk horizon to 12 hours to account for potential chain halts that could interrupt liquidations. Note that liquidations typically occur much faster (especially for USDC-margined accounts).

The extreme potential price movements are determined as follows:

for longs: RL=CVaRr(1%,h)R_{L} = CVaR_{r}(1\%, h)RL​=CVaRr​(1%,h)

for shorts: RS=CVaRr(99%,h)R_{S} = CVaR_{r}(99\%, h)RS​=CVaRr​(99%,h)

Assuming equal leverage for long and short positions, the maximum is taken for a conservative approach:

R=max⁡(∣RL∣,∣RS∣)R = \max(|R_{L}|, |R_{S}|)R=max(∣RL​∣,∣RS​∣)

We calculate the CVaR metric for each market using a historical simulation approach based on 1 year of historical data of 12-hour simple overlapping price returns.

The % initial margin in then determined as follows:

%InitialMargin=R\% InitialMargin = R%InitialMargin=R

Maintenance margin is calculated similarly, but using less conservative CVaR levels (5% and 95%):

%MaintenanceMargin=Rm\% MaintenanceMargin = R_{m}%MaintenanceMargin=Rm​

Max Leverage

Maximum Leverage is calculated as the reciprocal of the initial margin:

MaxLeverageModel=1%InitialMargin=11−MaxLTVMaxLeverageModel = \frac{1}{\% InitialMargin} = \frac{1}{1 - MaxLTV}MaxLeverageModel=%InitialMargin1​=1−MaxLTV1​

Max Leverage Caps

Quality Category
MaxLeverageCap

Very Good

10

Good

7

Medium

5

Bad

3

The final maximum leverage is then determined as follows:

MaxL=min⁡(MaxLeverageModel,MaxLeverageCap)MaxL = \min(MaxLeverageModel, MaxLeverageCap)MaxL=min(MaxLeverageModel,MaxLeverageCap)

The risk parameters for a single perp position used in the Health Factor (HF) calculation are determined as follows:

Max LTV

MaxLTV=round((1−1MaxL)⋅100,0)MaxLTV = \text{round}((1 - \frac{1}{MaxL}) \cdot 100, 0)MaxLTV=round((1−MaxL1​)⋅100,0)

Liquidation LTV

LiqLTV=MaxLTV+SMLiqLTV = MaxLTV + SMLiqLTV=MaxLTV+SM

where SMSMSM is a margin of safety determned as follows:

modelSM=round((InitialMargin−MaintenanceMargin)⋅100,0)modelSM = \text{round}((InitialMargin - MaintenanceMargin) \cdot 100, 0)modelSM=round((InitialMargin−MaintenanceMargin)⋅100,0)
SM=clamp(modelSM,SMmax⁡,SMmin⁡)SM = \text{clamp}(modelSM, SM_{\max}, SM_{\min})SM=clamp(modelSM,SMmax​,SMmin​)

Input Data

Data Item
Description
Source
Period/Frequency
Processing

Historical oracle price of the underlying asset

Coingecko

1h over the past 365 days

-

Key Parameters

  • Risk horizon: h=12hh = 12hh=12h

  • Confidence level: for initial margin α=1\alpha = 1%α=1, for maintenance margin α=3\alpha = 3%α=3

  • Safety Margin Bounds: SMmin⁡=2SM_{\min} = 2SMmin​=2, SMmax⁡=5SM_{\max} = 5SMmax​=5

Key Assumptions

  • Funding rates and price impact are ignored.

  • The 12h risk horizon is assumed.

Special Cases

For brand-new assets and assets with limited data history (less than 30 days), the maximum leverage is set to the maximum leverage cap for the "bad" quality category:

MaxL=3MaxL = 3MaxL=3

The following risk parameters are finally used:

MaxLTV=66MaxLTV = 66%MaxLTV=66

LiqLTV=70LiqLTV = 70%LiqLTV=70

Last updated 4 days ago

For each asset, we first apply our main to determine its quality category depending on the volatility and liquidity. The following maximum leverage caps are then applied based on the asset quality:

ppp
Mars Risk Framework