*How does the liquidation process work on Interdax? *

The flowchart below illustrates the liquidation process on Interdax:

The available balance for a sub-account when trading perpetual contracts is calculated as:

= market balance - (initial margin + maintenance margin)

To ensure the available balance remains above zero, the first action taken by the risk system is to cancel open orders such that initial margin = 0.

Positions are then liquidated by the risk system if the market balance decreases below the maintenance margin requirement (i.e., the available balance is still heading to zero).

Let’s look at a few scenarios to illustrate how the liquidation process works. Consider the example where a trader wants to enter a long position of 100,000 BTC-PERP contracts with an entry price of $9,158.3. Assume the sub-account’s available balance is 1 BTC.

## Submitting an Order

As long as the account’s available balance is above zero, orders can be submitted, funds can be transferred to other sub-accounts or withdrawn.

To submit an order of 100,000 BTC-PERP contracts with an entry price of $9,158.3, the account must meet the initial margin requirement. For BTC-PERP, Interdax requires an initial margin of 1% plus a position margin multiplier of 0.00000001%. Therefore, the initial margin for this position is 1.001%.

In terms of BTC, the initial margin is the value of the position multiplied by 0.01001:

= (100,000/9158.3)*0.01001 = 10.919*0.01001 = **0.1093 BTC**

To submit this order and keep it open, there must be **at least 0.1093 BTC in the trading account**. If the available balance approaches zero, then the order is cancelled.

Once the order is submitted, the amount of initial margin is highlighted as grey under ‘Margin’ in the bottom left panel:

Until the order is filled and the position is opened, the available balance becomes 1 - 0.1024 = 0.8907 BTC. If there's not enough BTC to cover the initial margin requirement, the open order will be cancelled.

(*Note: The balances of other sub-accounts and accounts denominated in other cryptocurrencies are unaffected*).

You can also check if there is enough BTC to cover the initial margin requirements in the Balances menu for each sub-account:

## Open Position, No Open Orders

Now suppose that the order has been filled at $9,158.3. The position of 100,000 BTC-PERP contracts is active and there are no other open orders. The available balance should be enough to cover the maintenance margin, otherwise the position will be liquidated.

For BTC-PERP, the minimum maintenance margin is 0.5% plus a position margin multiplier of 0.00000001%. Therefore, the maintenance margin for a position of 100,000 BTC-PERP contracts is 0.5001%.

The maintenance margin in terms of BTC is calculated as the position value multiplied by 0.005001.

= (100,000/9158.3)*0.005001 = 10.919*0.005001 = **0.0546 BTC**

This means that **at least 0.0546 BTC is required in the account**, otherwise the position will be liquidated.

The available balance in this case is the market balance minus the maintenance margin. Used margin is shown in red under ‘Margin’ in the bottom left panel:

If the price moves in your favour, then the market balance increases and results in greater available balance. If the price moves against you, the market balance falls. This results in the available balance falling as well. The price at which your available balance approaches to zero is shown on the interface as the liquidation price.

The Positions panel displays both the liquidation price and maintenance margin requirement for each position:

You can check the maintenance margin requirements in the Balances menu for each sub-account:

The liquidation price is the estimated price at which your account balance is no longer enough to meet the maintenance margin, and at which point your position is liquidated.

(*Note: The balances of other sub-accounts and accounts denominated in other cryptocurrencies are unaffected*).

## Open Position and Open Orders

Now suppose you have an open position of 100,000 BTC-PERP contracts and you submit a new order at the same price of $9,185.3. There must be enough in your account for the initial margin to keep the order open and to cover the maintenance margin for the open position.

If the available balance begins to fall below the margin requirements (which you can check using the Balances menu), your open orders will be cancelled first and no new orders can be submitted. If your available balance is still heading to zero, then your position is liquidated.

For example, to place an order for 50,000 BTC-PERP, the account balance must be enough to meet both:

- the initial margin required to submit the 50,000 BTC-PERP order, and
- the maintenance margin to keep the 100,000 BTC-PERP position open.

Under ‘Margin’ in the bottom left panel, initial margin is shown as grey and maintenance margin is in red:

Margin requirements are also shown in the Balances menu for each sub-account:

Initial margin in this case is (0.01 + (0.0000000001*150,000)), since 150,000 contracts is the maximum achievable position, which equals to 0.010015 or 1.0015%

The initial margin requirement to submit the new order is 1.0015% of the position value. With a position value of 5.1151 BTC (50,000/9158.3), the initial margin is **0.05123 BTC** (= 5.1151*0.010015).

The maintenance margin for the open position is **0.05116 BTC**, so the margin requirements sum to approximately **0.10239 BTC**.

The available balance in this case is the market balance - (initial margin + maintenance margin).

If the available balance falls below 0.10239 BTC, open orders will be cancelled as there will no longer be enough funds available to meet the initial margin. The available balance then increases by the amount of the initial margin. If you have multiple open orders, the orders submitted most recently will be cancelled first if available balance is heading to zero.

Once the market balance is set to move below the value of the maintenance margin (0.05116 BTC), the open position of 100,000 BTC-PERP contracts will be liquidated.

(*Note: The balances of other sub-accounts and accounts denominated in other cryptocurrencies are unaffected*).