Maintenance Margin is essential for sustaining a position in trading. This article will delve into the calculation process specifically for the USDC Perpetual & Futures contract. Please note that the USDC Perpetual & Futures contract is only available on the Unified Trading Account.
What is the Maintenance Margin?
Maintenance Margin is the minimum amount of margin a trader must maintain in their position or account to continue holding a position. When unrealized losses cause the position margin in a position or account to fall below the required maintenance margin level, liquidation will be triggered.
As traders hold larger contract values (position value + order value), the maintenance margin required will also increase by a fixed percentage as the contract value rises to a specific level. Each trading pair has its maintenance margin base rate, which adjusts according to changes in the risk limit tiers.
For example, when you open a BTC-PERP position with a position value of 100,000 USDC or below, the maintenance margin rate (MMR) required for the position is 0.4% of the position value. If the position value increases to 1,000,000 USDC, the MMR required will also increase to 0.5% of the position value.
For more details regarding risk limits, please refer to our guide here.
Calculation of Maintenance Margin Rate (MMR)
The Maintenance Margin Rate (MMR) for each position is determined using a tier-based calculation according to the margin level of the position value. Any excess beyond a particular tier is subject to the calculation based on the MMR of the new tier.
Illustration
The table below shows the margin parameters of XYZ-PERP contracts.
Tier |
Risk Limit (USDC) |
Maintenance Margin Rate Required |
1 |
0 - 1,000 |
2% |
2 |
>1,000 - 2,000 |
2.5% |
3 |
>2,000 - 3,000 |
3% |
4 |
>3,000 - 4,000 |
3.5% |
5 |
>4,000 - 5,000 |
4% |
Assuming a trader enters a long position of 100 contracts with 10x leverage at 35 USDC, the contract’s position value would be 3,500 USDC.
Position Value = Contract quantity x Average Entry Price
= 100 x 35 = 3,500 USDC
Initial Margin = Position Value / Leverage
= 35 x 100 / 10 = 350 USDC
Maintenance Margin = Position Value x MMR
= (1,000 x 2%) + (1,000 x 2.5%) + (1,000 x 3%) + (500 x 3.5%)
= 92.5 USDC
This means that the position can withstand a maximum unrealized loss (calculated using Mark Price) of 257.5 USDC (350 USDC - 92.5 USDC) before liquidation takes place.
Note:
— The average entry price for USDC contracts is the weighted average entry price of your position during the current settlement cycle, which will be affected by the increases in position sizes. At the end of each settlement cycle, the mark price becomes the new average entry price. For more details, please refer to 8-Hour Session Settlement Mechanism.
Formula
Now that you understand how the maintenance margin is calculated, as seen in the illustration above, the calculation can be quite tedious when dealing with large position values. Therefore, for the sake of simplicity, we can use the following formula to calculate the position maintenance margin.
Position Value = Contract Size x Average Entry Price
Maintenance Margin (MM) = (Position Value x MMR) - Maintenance Margin Deduction
whereas,
MM Deduction on Tier n = Risk Limit on Tier n-1 x (Difference between MMR on Tier n and Tier n-1) + MM Deduction on Tier n-1
The MMR required for each risk limit tier and the Maintenance Margin Deduction amount can be easily found on the Margin Parameters page.
Examples
The table below shows the Margin Parameters for BTC-PERP.
Tier |
Risk Limits |
Max. Leverage |
Maintenance Margin Rate |
Maintenance Margin Deduction |
1 |
0 - 100,000 |
25 |
2% |
0 |
2 |
>100,000 - 200,000 |
20 |
2.5% |
100,000 x (0.5%) + 0 = 500 |
3 |
>200,000 - 300,000 |
16.67 |
3% |
200,000 x (0.5%) + 500 = 1,500 |
4 |
>300,000 - 400,000 |
14.29 |
3.5% |
300,000 x (0.5%) + 1,500 = 3,000 |
5 |
>400,000 - 500,000 |
12.5 |
4% |
400,000 x (0.5%) + 3,000 = 5,000 |
*The above table is merely an illustration and does not represent actual margin parameters. Please always refer to this page for the most updated margin parameters.
Example 1
Trader A uses 10x leverage and opens a short position of 100 ETH at a price of USDC 4,000.
Position Value = 100 x 4,000 = 400,000 USDC (Tier 4)
Initial Margin = 400,000 / 10 = 40,000 USDC
Maintenance Margin = 400,000 x 3.5% - 3,000 = 11,000 USDC
This means the position can withstand a maximum unrealized loss of 29,000 USDC (40,000 USDC - 11,000 USDC ) before liquidation is triggered.
Assuming the settlement cycle at 8AM UTC, the Mark price is at USDC 4,200. The average entry price for the position is updated to USDC 4,200.
The new maintenance margin required now will be recalculated according to the current average entry price.
New Maintenance Margin = 4,200 x 100 x 3.5% - 3,000 = 11,700 USDC
Example 2
Trader B utilizes 10x leverage and opens the ETH-PERP long position of 50 ETH at USDC 4,000, while simultaneously having a buy limit order for 50 ETH at USDC 3,000.
Position Value = 50 ETH x 4,000 = 200,000 USDC (Tier 2)
Position Maintenance Margin = 200,000 x 2.5% - 500 = 4,500 USDC
Order Maintenance Margin = 50 ETH x 3,000 x 3.5% = 5,250 USDC
Total Maintenance Margin Required = 4,500 + 5,250 = 9,750 USDC
As a result, we can see that when an order is not filled, the order maintenance margin is calculated based on the corresponding MMR of the tier determined by the (position value + order value) instead of the tiered-based calculation. The MMR required for the tier of 200,000 USDC position value + 150,000 USDC order value is 3.5%.
Assuming the buy order is now filled. The total maintenance margin required has now become:
Average Entry Price = [(50 x 4,000) + (50 x 3,000)] / 100 = 3,500 USDC
Position Value = 100 ETH x 3,500 = 350,000 USDC (Tier 4)
Initial Margin = 350,000 / 10 = 35,000 USDC
Maintenance Margin = 350,000 x 3.5% - 3,000 = 9,250 USDC
After the order is filled, the overall maintenance margin required is reduced to 9,250 USDC. This means the position can withstand a maximum unrealized loss of 25,750 USDC (35,000 USDC - 9,250 USDC) before the liquidation is triggered.
Maintenance Margin Display on Position Tab
The maintenance margin (MM) required by the position can be found in the position tab.
You may notice that the MM displayed on the position tab will be higher due to the reason that it includes the estimated fee to close the position.
The estimated fee to close for long and short positions is calculated slightly differently as follows:
Estimated Fee to Close (Long Position) = Position Value × (1 − 1 / Leverage ) × Taker Fee Rate
Estimated Fee to Close (Short Position) = Position Value × (1 + 1 / Leverage) × Taker Fee Rate
Example
Revisiting Example 1, Trader A holds a short position of 100 ETH contract at a price of USDC 4,000 with 10x leverage.
Maintenance Margin (MM) = 11,000 USDC
Estimated Fee to Close Position = 100 × 4,000 × (1 + 1/10) × 0.055% = 242 USDC
In this case, the total maintenance margin displayed on the position tab will be 11,242 USDC (11,000 USDC + 242 USDC).
Assuming the settlement cycle at 8AM UTC, the Mark price is at USDC 4,200. The average entry price for the position will be updated to USDC 4,200.
New Maintenance Margin required = 11,700 USDC
New Estimated Fee to Close = 100 × 4,200 × (1 + 1/10) × 0.055% = 254.1
The Maintenance Margin displayed on the position tab will be updated to 11,954.1 USDC (11,700 USDC+ 254.1 USDC).
Conclusion
Understanding the calculation process for both position and order maintenance margins is essential for traders to manage their risk effectively on Bybit. By comprehending how these margins are calculated, traders can make informed decisions to reduce liquidation risk and optimize their trading strategies.