Skip to main content
All CollectionsTradingRisk Management
How are the Initial Margin Ratio (IMR) and Maintenance Margin Ratio (MMR) calculated?
How are the Initial Margin Ratio (IMR) and Maintenance Margin Ratio (MMR) calculated?
Updated over a week ago

The IM and MM will be calculated on symbol level. This means for each symbol, taking into account both the position and open orders, there is an IM and a MM.

IM

= Order-Adjusted Position Size / Leverage

MM

= Order-Adjusted Position Size * MMR

where:

(1) User “Order-Adjusted Position Size” to check the Tier

(2) Check the MMR from the corresponding Tier

If a user initially sets their position at a leverage, GRVT will:

  1. Get the Max Position Size

  2. Fix the IMR (1/leverage)

  3. Apply a tiered model to MMR

Specification

Example 1 (Leverage = 40)

Example 2 (Leverage = 30)

Max Position Size

  1. Identify the smallest maximum leverage, which is greater than or equal to the given leverage

  2. Calculate the following and take the minimum:

    1. the upper bound of the size range of the Max Leverage

    2. Margin Balance / Mark Price * Leverage

  3. Set Max Position Size = Min ( a, b)

  4. Round the Max Position Size down to the nearest minimum trade size (e.g., 0.01 BTC, 0.1 ETH)

  1. x = Margin Balance / Mark price * 40

  2. Max Position size = Min(50 BTC, x)

  1. x = Margin Balance / Mark price * 30

  2. Max Position size = Min(100 BTC, x)

IMR

(including Open Order Initial Margin)

IMR is always 1/ Leverage

IMR = 1/ 40 = 2.5%

IMR = 1/ 30 = 3.333%

MMR

MMR does not depend on leverage. It depends on the total size and applies a tier model based on the size range.

Depending on the total size, the MMR can be either Tier 1 or 2. So at most 1.25%

Depending on the total size, the MMR can be either Tier 1, 2, or 3. So at most 1.75%

Note:

  • Since we have already imposed a Max Position Size, the tiered model of MMR will guarantee that MMR will always be less than the IMR.

  • In the above table, the Margin Balance’s calculation is important.

  • If there are multiple products in the portfolio, the Margin Balance for determining the Max Position Size of a specific perpetual or future will exclude the IMs occupied by other products.

Limiting the Max Position Size

GRVT introduces a variable called “Order-Adjusted Position Size”, which incorporates both existing positions and open orders.

  1. Existing Position Size + Size of all Open Orders with the Same Direction of Position

  2. Existing Position Size - Size of all Open Orders with the Opposite Direction of Position

  3. Take Max ( abs(1), abs(2) )

The following are some examples:

Example 1

Example 2

Example 3

Positon

Long 50 BTC

Long 50 BTC

Long 50 BTC

Opening Orders

Long 10 BTC

Short 20 BTC

Long 10 BTC

Short 200 BTC

Short 20 BTC

Order-Adjusted Position Size

Max(50+10, 50-20) = 60

Max(50+10, Abs(50-200)) = 150

Max(50+0, 50-20) = 50

Users are only allowed to place new orders subject to: “Order-Adjusted Position Size” is less than or equal to Max Position Size.

Did this answer your question?