Leverage, Liquidation and Insurance Funds

31 minute read
Subscribe to the mailing list, or follow me on twitter!

banner

All the views expressed below are the personal views of the author, and are not financial or investment advice.

2x, 20x, 100x? Leverage has been the continuous backdrop to the crypto derivatives story, and capable of amplifying profits and cratering positions with losses. In this article I will cover the mechanics of margin and leverage, as well as how exchanges manage the inherent risks of providing these features.

What is Margin?

From Investopedia:

…margin is the collateral that an investor has to deposit with their broker or an exchange to cover the credit risk the holder poses for the broker or the exchange. An investor can create credit risk if they borrow cash from the broker to buy financial instruments, borrow financial instruments to sell them short, or enter into a derivative contract.

To trade on margin is to buy/sell short an asset while only putting down part of the full cost of the trade. Such a facility is not always available to everyone, and brokers will usually try and be quite strict with whom they give it to. By allowing someone to use margin to trade, they are essentially giving them access to more capital than they otherwise would have.

Initial Margin

The margin itself is the collateral that is required to enter a position, and in that sense it is quite similar to how a home mortgage works. If you take out a mortgage on a home you want to buy, you will almost always be required to put down a deposit. The amount varies between lenders, but often it will be something like 25% of the cost of the property. The remaining 75% will therefore be the loan that you take from the mortgage provider. This is sometimes expressed as the Loan to Value Ratio or LTV:

$$ LTV = 100 \times \frac{Value_{loan}}{Value_{asset}}$$

Therefore in the example above, for a house (asset) worth \$500,000, and a deposit of \$100,000 then your LTV will be $100 \times \frac{\$500,000 - \$100,000}{\$500,000} = 80\%$. Your margin in this case is \$100,000 which was the deposit.

Initial margin requirement for ETHUSD contract on ByBit

Initial margin requirement for ETHUSD contract on ByBit

In margin trading, the initial margin (IM) is the same as the deposit. It is the initial amount of collateral that you need to put up in order to get access to the higher amount of capital that the counterparty (the broker usually) is providing as a loan. The initial margin requirement (IMR) is the fraction of the position cost that you have to provide, and it is usually quoted as a percentage e.g. 20% in the case above. For a trading example, imagine we want to buy 10BTC worth of contracts of a linear BTCUSD swap priced at \$40,000. The total cost of this trade is $10 \times \$40,000 = \$400,000$.

Let’s say the broker offers you margin, and in this case a trade like this requires an initial margin of 10%. In cash terms the initial margin is calculated as:

$$ IM = IMR \times Cost_{position} $$

So in this case, $10\% \times \$400,000 = \$40,000$. The broker will require us to lock up this margin to open the position. We can represent this visually like so:

A visualisation of initial margin (blue) vs loan (orange) for a total position cost

A visualisation of initial margin (blue) vs loan (orange) for a total position cost

From now on we will be using this style of diagram to represent value and margin in various situations.

Position Marking & Equity

When you trade on margin, you own a position which was paid for by both your initial margin, and the loan that was provided to you. As we covered in a previous article, all positions can be valued using a mark price to get their mark value. This represents the current value of the position according to the market.

As described before, changes in the mark value of your position can result in you acquiring an unrealised profit or an unrealised loss. This represents the theoretical profit or loss that you would get if you closed your position at market value. From the perspective of the lender, the mark value is quite important as it represents how much your position can be closed for (and how much money they could get back). Remember, these guys lent you money, and they want to make sure they can be paid back. The measure that is really important here is your position’s equity, which is defined as:

$$ Equity = Margin + UnrealisedPnL $$

Consider the following scenario. You buy 10 Bitcoin at a price of \$40,000, and your initial margin requirement is 50%. Your initial margin is therefore $50\% \times 10 \times \$40,000 = \$200,000$, and this is also your current margin since this is the only amount of margin that you have put up. Consider the following scenarios. The diagrams used show your equity as a function of the price of Bitcoin assuming you bought in at \$40,000.

Bitcoin stays at \$40,000
You have no unrealised profit or loss on the position (\$0), so your equity is $\$200,000 + \$0 = \$200,000$.
Bitcoin price goes up to \$42,000
You have an unrealised profit of $10 \times (\$42,000 - \$40,000) = \$20,000$, so your equity is $\$200,000 + \$20,000 = \$220,000$.
Bitcoin price goes down to \$37,000
You have an unrealised loss of $10 \times (\$37,000 - \$40,000) = -\$30,000$, so your equity is $\$200,000 - \$30,000 = \$170,000$.

What is Leverage

When discussing margin trading, the word leverage represents a multiplier of the cost of the asset purchased, vs the size of the initial deposit. Leverage is normally represented as {leverage}x.

Initial Leverage

Initial leverage is the leverage that you have when you enter the position, and is the reciprocal of the initial margin requirement:

$$ Leverage_{initial} = \frac{1}{IMR}$$

For instance, if you do a trade on margin, and your initial margin is 50%, then your leverage is $\frac{1}{0.5} = 2$, so 2x leverage. If your initial margin requirement is 10%, then your leverage is $\frac{1}{0.1} = 10$, so 10x leverage. On most crypto platforms, users can choose what leverage they want for their position depending on their trading preferences. Currently, this type of leverage can go up to 125x on some exchanges.

A leverage slider on BitMEX which can be used by users to select the leverage they want.

A leverage slider on BitMEX which can be used by users to select the leverage they want.

When you see the words leverage offered or similar it is usually referring to the initial leverage that the platform provides.

Effective Leverage

In the previous section we discussed how as the mark price of the asset goes up or down, your equity in the position will also change. If your equity increased, and you closed your position you would end up with a profit. Therefore, the equity of the position represents real cash that could (theoretically) be retrieved by closing the position. Since you now have more margin your leverage has changed, and this is called effective leverage. It is defined as follows:

$$ Leverage_{effective} = \frac{Value_{position}}{Equity} $$

This means that as your position gains profit, your effective leverage actually decreases because you are gaining equity, and the loan that you were originally provided becomes a smaller fraction of the total value. If you start taking on losses, your effective leverage starts to increase because the amount of equity you have left in the position starts to move towards 0. The chart below shows how effective leverage changes with price at different leverage levels.

The effective leverage at different initial leverages as the mark price changes.

The effective leverage at different initial leverages as the mark price changes.

What this implies is that as you gain profits on your position, you become less leveraged than you were. Traders whose effective leverage falls below that of what they started with may consider closing their position to realise their profit. This way they can then open the same position again, but with the leverage reset back to the initial leverage.

For example, say you have a long BTCUSD position with a cost basis of \$40,000, an initial leverage of 10x and a mark value of \$46,000. Your initial margin is \$4,000 and your unrealised profit is \$6,000, so your equity in this position is $\$4,000 + \$6,000 = \$10,000$. Your effective leverage is also $\frac{\$46,000}{\$10,000} = 4.6$ so 4.6x. Your effective leverage is now much lower than initially, and you want to release some of your equity to bring the leverage back to 10x.

You sell the position, realising the \$6,000 profit in cash as well as the original \$4,000 in margin. You then buy the position again at a cost basis of \$46,000. The initial leverage offered is still 10x, so now your initial margin and your equity is $10\% \times \$46,000 = \$4,600$. You have therefore managed to extract $\$10,000 - \$4,600 = \$5,400$ in cash from this position by resetting the leverage. These funds could be used for example to open a new leveraged position.

Leveraged Return on Investment

A common misconception with leverage is that it is your profits that are multiplied. For instance, say you buy 1 Bitcoin at \$40,000 using 10x leverage. When the price goes up to \$41,000 and you sell, it is often erroneously assumed that your profit will be $10 \times \$1,000 = \$10,000$ because you have 10x leverage. In actuality, your profit is still \$1,000, the thing that is multiplied however is your return on investment or ROI.

In the case above, the amount of “investment” was your initial margin, which at 10x would have been \$4,000. The percentage return on this investment would be $\frac{\$1,000}{\$4,000} = 25\%$. Consider if you did the same trade at 1x (no leverage). You would have paid \$40,000 as your investment, and your return would be $\frac{\$1,000}{\$40,000} = 2.5\%$. Therefore, in terms of returns on your investment, 10x leverage has given you a 10x return (25% vs 2.5%).

Leverage in Different Markets

Leverage works in different ways depending on the market in question. One of the biggest differences is between spot exchanges and derivatives exchanges.

Spot Market

In the spot market, leverage has to come in the form of actual cash. When you buy e.g. BTC/USD on the spot market, you need to provide US Dollars to the counterparty in the trade. Therefore, if you want to trade on margin, you need to actually borrow physical USD. This is not free, because any loan of physical cash requires you to pay interest while you hold the loan which increases the cost. In addition, to provide the loan the exchange needs to have that cash lying around to lend.

For this reason, the amount of leverage in the spot markets is usually quite low. FTX for instance only offers up to 10x leverage on spot trades, and at the time of writing the cost of borrowing USD is about ~5% annualised.

Derivatives Market

In the derivatives market you are buying and selling contracts, which are not withdrawable and therefore must stay on the exchange. As a side effect, it also means that only the payouts and the margin need to be in physical cash. Because of this, the amount of leverage possible on derivatives exchanges is much higher, and can go up to 125x on some platforms. This high leverage does mean however that liquidations need to be very well managed to not leave the exchange underwater.

It is important to note that with derivatives, the leverage you are taking out is not a loan. No physical cash is is being provided for the leveraged part of the trade. Instead, it should be viewed as increased exposure to an asset, with an initial deposit built in.

In this article I will refer to the non-margined part of the position as a “loan” but this is just for simplicity since the mechanics and mathematics work the same way. In reality it is only a loan if it is done on the spot market with physical cash.

Bankruptcy

In the previous sections we discussed how equity can be increased or decreased depending on unrealised profit or loss. What happens however, if your unrealised loss becomes so great that you are left with 0 equity remaining?

This is called going bankrupt because now the money you have put up as margin has all been eaten up by unrealised losses. Note, that even though you are bankrupt on paper, until your position is closed that loss is still unrealised. From the brokers/lenders perspective however, they will view it as you having lost all of your own money in a position. If the price keeps moving in an unfavourable direction, then the losses will start eating into the money the broker loaned you!

The diagram below shows the equity breakdown for a long 10 Bitcoin position at 2x leverage entered at \$40,000. The current BTCUSD price crashes to \$16,000 meaning that the unrealised loss on the position is now more than the initial margin provided (\$200,000).

Once the equity of a position is all gone, the losses start to eat into the loan amount.

Once the equity of a position is all gone, the losses start to eat into the loan amount.

What becomes clear is there is a Bitcoin price at which all of your equity goes to zero. This is called the bankruptcy price. We can derive it by understanding that your equity is zero when your initial margin plus your unrealised loss is equal to zero. Therefore rearranging these formulas:

$$ IM \pm Quantity \times (BankruptcyPrice - EntryPrice) = 0 $$ $$ … $$ $$ BankruptcyPrice = EntryPrice \times \frac{Leverage \pm 1}{Leverage} $$ $$ or $$ $$ BankruptcyPrice = EntryPrice \times 1 \pm IMR $$

The $\pm 1$ depends on which side your position is on. For a long position this is negative, for a short position it will be positive. Using the example above with the 2x long position entered at \$40,000, we can calculate the bankruptcy price as $\$40,000 \times \frac{2 - 1}{2} = \$20,000$. For a 10x short position entered at \$40,000 the bankruptcy price is $\$40,000 \times \frac{10 + 1}{10} = \$44,000$. This is the point at which you lose all of your equity, and begin to eat into the loan amount.

Brokers and exchanges want to avoid your position having negative equity (eating into the loan amount) at all costs, since at that point they are in a position to lose money. If the losses are high enough, the exchange or broker can even become insolvent! Brokers and exchanges have different methods that they employ to try and prevent this situation from happening.

Maintenance Margin

The broker knows that once the mark price reaches the bankruptcy price for your position, you have no more equity left. They also know that if the price moves beyond this price they are now losing money. One strategy that is used, is to set an arbitrary equity level which you must maintain in order to hold the position.

This is called the maintenance margin requirement (MMR) and is usually quoted as a percentage much like the initial margin requirement. For instance, assume that the broker enforces a 5% maintenance margin requirement. You open a 10 Bitcoin long position with an entry price of \$40,000 with 5x leverage (20% initial margin requirement). This is what your equity breakdown looks like:

Equity breakdown with 5% maintenance margin. Note that the maintenance margin is not a separate amount, it still counts towards equity. It is just a predefined level.

Equity breakdown with 5% maintenance margin. Note that the maintenance margin is not a separate amount, it still counts towards equity. It is just a predefined level.

In markets (and especially the crypto markets) the mark price can move extremely rapidly. The goal of the maintenance margin is to set a level below which the broker will take some sort of action. The higher that level, the more buffer/time the broker has before the price will reach the bankruptcy price.

An example of a fast move on FTX. Here Bitcoin fell from \$48,100 to \$46,800 (a -2.7% move) in around 10 minutes. This is actually considered a fairly small move all things considered.

An example of a fast move on FTX. Here Bitcoin fell from \$48,100 to \$46,800 (a -2.7% move) in around 10 minutes. This is actually considered a fairly small move all things considered.

What action the broker takes depends on a variety of things such as the market, and who the broker is. In traditional markets, breaching your maintenance margin will typically result in a margin call. This is a notification (traditionally a phone call) from your broker telling you that you have e.g. 24 hours to deposit more margin to the position, or the broker will close the position for you. Assuming you have the money, you will deposit sufficient cash into the position so that your equity in the position is above the maintenance margin level. If you are unable to do so, then the broker will take matters into their own hands and close your position for you.

Risk Limits

Certain brokers may require more maintenance margin depending on the size of your position. The rationale for this is that the larger your position, the more risk there is for the broker because getting out of a large position may result in more slippage and therefore more losses. The maintenance margin requirement will sometimes be calculated based on a formula. Many exchanges use a base risk limit and a risk step in order to calculate the required maintenance margin. For instance:

$$ MMR = BaseMaintMargin + MaintMarginStep \times \frac{Value_{position} - BaseRiskLimit}{RiskStep} $$

Assume the base risk limit is 200BTC, the risk step is 100BTC and the base maintenance margin and maintenance margin step are both 0.5%. A 500BTC position will have a maintenance margin requirement of $0.5\% + 0.5\% \times \frac{500 - 200}{100} = 2\%$.

An example risk limit table from ByBit

An example risk limit table from ByBit

Naturally, the initial margin also has to scale with this system as it should not be possible for the maintenance margin requirement to be greater than the initial margin requirement. Typically the initial margin requirement will follow a similar formula.

Liquidation

Let’s say that your position equity falls below the maintenance margin. You get a margin call, but cannot cover the extra margin required to bring your equity up to the maintenance margin level. What happens now?

The broker generally does not want to hang on to your (losing) position. Holding this position represents a real risk to them, because if the price keeps moving unfavourably they will start accumulating losses. In theory, it is your position, but it is their loan that paid for it. Legally you are on the hook for the money, but the broker will need to get the money from you. If you won’t pay up, brokers will try to sue you to get the money just like any other business. However, this can be a drawn out process that needs to go through the courts and can be costly.

The famous @BitmexRekt twitter bot that used to post large liquidations that occurred on the BitMEX exchange during large price moves.

The famous @BitmexRekt twitter bot that used to post large liquidations that occurred on the BitMEX exchange during large price moves.

In crypto this becomes even more complicated because due to the nature of crypto, clients could be anonymous. With the advent of Know Your Client (KYC) rules this is now changing, however the existing risk management practices still reflect past realities and most crypto exchanges do not go after clients for margin trading losses. Instead, they will liquidate (close out) a client once their equity goes below the maintenance margin. Getting liquidated is also commonly called getting rekt in the crypto slang.

Liquidation Price

The liquidation price represents the price at which your equity remaining is equal to the maintenance margin. Just like the bankruptcy price, it can be calculated by rearranging the equity calculation.

$$ (IM - MM) + UnrealisedPnL = 0 $$ $$ … $$ $$ LiquidationPrice = EntryPrice \times (1 \pm (IMR - MMR))$$

The $\pm 1$ depends on which side your position is on. For a long position this is negative, for a short position it will be positive. For example with a 10x long position entered at \$40,000 with a maintenance margin requirement of 5%, we can calculate the liquidation price as $\$40,000 \times (1 - (0.1 - 0.05)) = \$38,000$.

There is a special case with 1x leverage, because while the formula indicates that the liquidation price will be non-zero, it is in fact zero. This arises due to the fact that at 1x you are not actually taking on a loan (you are fully margined), even though we are calculating it as such.

Liquidation Price vs Leverage

The below table shows the liquidation and bankruptcy prices for a 1BTC long position which has an entry price and mark price of \$40,000. We assume that the maintenance margin requirement is 0.5%.

LeverageBankruptcy PriceLiquidation Price
1x\$0\$0
2x\$20,000\$20,200
10x\$36,000\$36,200
20x\$38,000\$38,200
50x\$39,200\$39,400
100x\$39,600\$39,800

Notice that the effect of adding more leverage is to bring your bankruptcy and liquidation price closer to your entry price.

At 1x (no leverage) you cannot be liquidated since you did not take out any loan, so all of the losses are yours to take. At 100x however all the price needs to do is move down \$200 and you will be liquidated. The choice of leverage depends therefore on your conviction in the direction of a price move, and your ability to gauge price volatility (how much up and down an asset moves on average).

This article from BitMEX goes into user behaviour when it comes to leverage usage, and suggests that at the time the study was carried out (2019) a majority of positions were leveraged somewhere below 30x.

Open Order Margining

When placing a resting order, the exchange will require you to put up any initial margin ahead of time. That means that if you place an order for 1BTC at a limit price of \$40,000 at 5x leverage, you will need to lock up \$8,000 of margin to keep that order active. This is because if the order fills, the exchange needs to make sure that you still have the money required to support that position (otherwise you might be instantly bankrupt).

Open Premium

In addition to the initial margin, there is another factor that needs to be taken into consideration. Say you have an open buy order for 1BTC at 10x leverage at a limit price of \$40,000 and with a 1% maintenance margin. Your \$4,000 of initial margin is locked in, and your liquidation price will be \$36,400. However, what if the mark price right now is \$36,300? If someone trades against you, you will end up with a position which will be instantly liquidated!

Equity diagram showing how open premium covers a potential instant unrealised loss. Note that the diagram is zoomed in.

Equity diagram showing how open premium covers a potential instant unrealised loss. Note that the diagram is zoomed in.

In order to prevent this, exchanges will lock up additional margin in the form of open premium. If the mark price is currently beyond the liquidation price of your (theoretical) position, then the open premium will cover this. In our case, we are \$100 below the liquidation price, so we need at least \$100 of open premium to prevent our instant liquidation. In reality, most exchanges will add a little bit more in order to prevent you being liquidated a few seconds later (eg 0.5%). In that case, our open premium would be \$300.

Margining Inverse Products

Margining for inverse products is a little more complicated than for the linear products we have been discussing so far. The reason for this is that for an inverse contract (such as the XBTUSD inverse perpetual swap), both the underlying and margin currency are the same (Bitcoin). The value of these contracts at a specific mark price is:

$$ Value = -\frac{Quantity}{Price}$$

Let’s say we have a long 10,000 contract position with an entry price of \$40,000 and no leverage (1x). Our cost basis is $-\frac{10,000}{\$40,000} = -0.25$, so -0.25BTC.

Let’s say the Bitcoin price halves, and is now \$20,000. Our position value is now $-\frac{10,000}{\$20,000} = -0.5$. Our unrealised PnL is $-0.5 - -0.25 = -0.25$, so we have lost 0.25BTC. Note that our initial cost basis was 0.25BTC, so we appear to have lost our entire margin!

This is actually an interesting property of inverse contracts, and arises because our underlying is also our margin currency. As the value of the underlying (Bitcoin) drops in value, our margin ALSO drops in value at the same time. This compounding effect means that it is possible to go bankrupt on a long inverse position, even if you have no leverage (1x)!

Liquidation Procedure

Once the decision has been made to liquidate a position, the exchange/broker will kick off its liquidation procedure. Different exchanges do this in different ways, and we will outline some of the most common ones:

Open Order Cancellation

One of the first steps that is carried out is to cancel any open orders that the client may have active. As mentioned earlier open orders have initial margin and open premium assigned to them. If the orders can be canceled, then it is possible for some margin to be freed up to cover the losses.

Risk Limit Reduction / Partial Liquidation

In a prior section we discussed how some exchanges require a higher maintenance margin requirement for larger positions. If such a position is liquidated, then it stands to reason that if that position was smaller it might still be solvent because it would require less maintenance margin. For instance, let’s say that we have a 500BTC position which we entered at \$40,000 with 10x leverage. The base risk limit is 200BTC, the risk step is 100BTC and the base maintenance margin is 0.5%. As seen previously with this setup our maintenance margin requirement is 2%.

Equity diagram BEFORE partial liquidation. The loss exceeds the maintenance margin, and the position is in liquidation.

Equity diagram BEFORE partial liquidation. The loss exceeds the maintenance margin, and the position is in liquidation.

Our bankruptcy price will be \$36,000 and our liquidation price (with 2% maintenance margin) will be \$36,800. Let’s say the Bitcoin price falls to \$36,500. This is under our liquidation price, so our position is marked for liquidation by the exchange. We still have some equity left, and we are not bankrupt, so the exchange can try and partially close us out. The exchange places an order (typically FillOrKill) for an amount of contracts that will reduce our position size so that our maintenance margin requirement is reduced.

Equity diagram AFTER partial liquidation. The loss is the same, but it is now above the maintenance margin meaning the position is not in liquidation anymore.

Equity diagram AFTER partial liquidation. The loss is the same, but it is now above the maintenance margin meaning the position is not in liquidation anymore.

In this case, the exchange placed an order to sell 200BTC in the market. Assuming it fills, our position size is now $500 - 200 = 300$. Using the risk limit formula, we can now see that the maintenance margin required for a 300BTC position is $0.5\% + 0.5\% \times \frac{300 - 200}{100} = 1\%$. With a maintenance margin requirement of 1%, our new liquidation price becomes \$36,400. The mark price is currently above this (\$36,500) so our position stops being liquidated.

If the order were unable to be filled, the exchange would proceed to fully liquidate this position. This partial liquidation or risk limit reduction mechanism is used by several exchanges such as BitMEX and OKEx.

Full Liquidation

A full liquidation is where the entire position is closed when it is liquidated. This can be done in a number of ways, but usually the exchange will take over your position. This means that the exchange will act as a counterparty and trade against you at the bankruptcy price. If you have a 1BTC long position with a bankruptcy price of \$36,000 then the exchange will force you to sell your position at \$36,000 while simultaneously buying it at the same price. The net result of this is that the exchange ends up holding a 1BTC long position with an entry price of \$36,000.

If the mark price at the time was e.g. \$38,000 (your liquidation price) then the position right now has an unrealised profit of \$2,000 because the exchange entered the position at \$36,000. A key part of this to understand is that under this system you lose your entire maintenance margin, you do not get any of it back unlike the partial liquidation. This \$2,000 profit represents what was left of your equity on the position, and it is kept by the exchange (more on this practice later). This method is used by numerous exchanges such as Huobi, Kraken, and BitMEX.

Note that so far we have not actually closed the actual position, but simply moved it. The actual closing of the position is done by something called a liquidation engine. This is a piece of software that manages any positions that need to be liquidated or closed out. Each exchange will do this in their own way, though you can read about some of them online such as this post by FTX.

Backstop Liquidity / Position Assignment

Another mechanism used is a backstop liquidity provider program. This is a program where various participants (usually large funds and market makers) agree to (at any moment) take on positions that have been liquidated and are near bankruptcy. Each backstop liquidity provider will commit to a certain amount of volume which they are then obligated to take on.

Why would they do this? Because as in the full liquidation example, they will always receive a position that still has (some) equity left. This is essentially free money if (and only if) they are able to close out or hedge the position at a profitable price. An upside of using backstop liquidity providers is that these players are plugged into many exchanges, and can quickly hedge any exposure on another exchange. For instance if they take on a 100BTC position on exchange A, they can quickly sell 100BTC on exchange B at (hopefully) a higher price. If they fail to do this, then the liquidity provider can end up with a loss.

This mechanism allows liquidity from other platforms to be used to help close out liquidated positions, and it reduces risk for the exchange. Another name for this system is position assignment, and it is used by a couple of exchanges such as Kraken and FTX.

Insurance Funds

As mentioned previously, when the exchange takes over a position, it is taking on the risk of that position. The exchange also always takes over the position at the position’s bankruptcy price. This means that the client who was liquidated ends up with no position, and no cash! This might seem unfair, but bear in mind what we said previously about traditional brokers.

If you lose more money than you have equity in the traditional market, brokers will go after you in the courts to settle that debt. In the crypto world however, any losses you have are all absolved since you are always closed out at your bankruptcy price. Statistically speaking, that means that sometimes the exchange will end up with a position that it can close profitably (keep some of your equity), and sometimes it will end up with a position that loses money (negative equity) because it had to close it below the bankruptcy price. The larger the maintenance margin, the more probable it is that the takeover will be profitable.

The below diagram shows what the profit loss breakdown looks like assuming the price only goes downwards once the position is liquidated. The area between the bankruptcy price and liquidation price is a buffer before the exchange starts losing money.

Assuming a position is marked at \$38,000 but was taken over at \$36,000 the exchange has \$2,000 of leeway to close the position before they make a loss.

Assuming a position is marked at \$38,000 but was taken over at \$36,000 the exchange has \$2,000 of leeway to close the position before they make a loss.

From here, there are two outcomes:

Position is Liquidated Profitably

If the position is closed out over the bankruptcy price, then the position will end up with a realised profit. This cash is put inside an insurance fund which is a fund that holds any money that is made from liquidations. For every profitable liquidation, the insurance fund grows. This can be seen as a fund of forfeited maintenance margins from liquidated positions.

Position is Liquidated Unprofitably

If the position is closed out beyond the bankruptcy price, then the position will end up with a realised loss. In order to cover this loss, the exchange uses the aforementioned insurance fund. For every unprofitable liquidation, the insurance fund will decrease as it covers the losses.

Reasons for Insurance Funds

The reason that the remaining equity from liquidated positions is put into the insurance fund instead of being returned to users is to provide bankruptcy insurance to all the traders on the platform. While a trader will lose their remaining equity on a liquidated position, they also can rest safe in the knowledge that they will never be on the hook for any more than their initial margin.

Such a mechanism is very much necessary in a market such as crypto. A combination of high volatility, rapid price moves and high leverage means that the counterparty risk is very high for exchanges. Insurance funds allow them to continue providing these services while still guaranteeing that no-one will lose more money than they put in, and that profitable traders are paid out.

Exchange Bankruptcy

There is one more thing to consider: what happens if the insurance fund runs out? In this case, the exchange is actually bankrupt if it is holding an unprofitable position, and cannot cover it with the money left in the insurance fund. At that point, the exchange has one or two moves left in order to remain solvent. However, we will cover clawbacks and automatic deleveraging in a future article.

Margin Management

Margin management is how an exchange manages a client’s margin. In general a client will have two relevant things on an exchange:

  1. Liquid cash that has not been locked up in positions.
  2. One or more positions that have cash locked up.

Below are several common ways that margin can be allocated:

Isolated Margin

Say a client has \$100,000 in cash on an exchange. They enter into a long 1BTC/USD position that has been leveraged 10x and has an entry price of \$40,000. The initial margin assigned to this position is \$4,000, which is cash that is locked up. They now have \$96,000 cash and the 1BTC leveraged long position.

Under isolated margin, that \$4,000 that is assigned to the position is the only cash that will be used as margin for the position. If the price falls and the position is liquidated, only that \$4,000 is at risk (not the rest of the cash on the account). If a client wants to top up the position in order to prevent it being liquidated, they will need to transfer this margin manually into the position.

For instance, say that the price falls to \$38,000. The position now has \$2,000 of equity remaining, and the client is worried that they may be liquidated. They decide to top up the position by transferring an additional \$2,000 to the position. Their effective leverage is now back to 10x ($\frac{\$40,000}{$4,000} = 10$), however their return on investment multiplier will be $\frac{\$40,000}{$6,000} \approx 6.66$.

Isolated margin is useful for traders if they have what they believe to be a high risk position. If the position incurs losses, the cash in the account will still be safe. However, it does mean that they need to pay closer attention to the position since the exchange will not automatically top it up if it starts to lose money.

Cross Margin

Again, we have a client with \$100,000 in cash. They enter into two positions:

SymbolQuantityLeverageEntry PriceInitial Margin
BTC/USD1010x\$40,000\$40,000
ETH/USD1004x\$2,000\$50,000

The client now has \$10,000 in cash, and the two positions. If we use cross margin all the cash that we have available on the exchange can be used for any position. For instance, if the BTC/USD position starts losing money, the \$10,000 in cash will be automatically allocated by the exchange to the position to keep it solvent.

The exchange will always keep at least the initial margin assigned to the position. However, if some margin is topped up (due to losses) and that position’s price recovers, the exchange may “de-allocate” some margin back into the cash pool so that it can be used for other positions.

Cross margin is a common margin system that is used on most exchanges because it is simple to use, and doesn’t result in surprise liquidations when there is still money in the account. However, one must be careful because if one of the positions starts losing heavily then all the cash and positions are at risk. That one position can use up all the free cash, at which point there will be none left for other positions if they lose money. In other words, cross margin can put your entire account at risk.

Portfolio Margin

Note that for the margining systems we have described, the unrealised profit from one position can not be used as margin for another position, only cash. Under portfolio margining this becomes possible. For instance, say a client has a long BTC futures position and also a short BTC futures position. These two instruments share the same underlying (Bitcoin) meaning the two futures moves will be correlated.

Because the client has both a long and short position profits on one should mean losses on the other. In this way they net each other out, and the equity in the positions can account for these two positions in combination, instead of having to assign individual cash margin for each. This is more efficient from a cash perspective, but can also increase the complexity of the margining system.

In the crypto world adoption of portfolio margining is spotty, with certain exchanges offering it in a limited way, and others not offering it at all.

Glossary

Backstop Liquidity Provider
An exchange participant that agrees to take on liquidated positions on behalf of an exchange.
Backstop Liquidity Provider Program
A program run by an exchange that allows liquidity providers to sign up and accept liquidated positions.
Bankrupt
To have no equity remaining in a position.
Bankruptcy Price
The price at which you are bankrupt.
Base Risk Limit
Part of the risk limit calculation. The base amount of value your position can have before extra maintenance margin is required.
Counterparty Risk
The risk that someone you are trading or doing business with will become insolvent.
Cross Margin
A margin management mechanism where all the cash on your account is available for positions to use.
Effective Leverage
The actual leverage of your position when taking into account unrealised profit/loss.
Equity
The amount of money your position is worth in terms of initial margin and unrealised profit.
Full Liquidation
When the exchange takes over a position, and liquidates it completely on the market leaving the owner with no cash or position.
Fully Margined
Paying the full cost for a position.
Hedge
To remove the risk of a price movement from a position. E.g. by buying an option, or selling the underlying, etc.
Initial Margin (IM)
The initial amount of margin required to open a position.
Initial Margin Requirement (IMR)
The fraction of the position cost required to open it.
Insurance Fund
A fund that is used by exchanges to cover potential losses with leveraged positions.
Isolated Margin
A margin management method where an individual position has a set amount of margin assigned to it, and this is the only amount at risk.
Know Your Client (KYC)
A system whereby exchanges must verify who a client actually is before they allow them to trade.
Leverage
A multiplier that represents the size of a margin loan provided for a position. E.g. 5x means an 80% loan was provided for the position.
Liquidation
To close out a position whose equity has fallen below the maintenance margin requirement.
Liquidation Engine
A piece of software used by exchanges to manage and close out their liquidated positions.
Liquidation Price
The price at which a position’s equity falls below the maintenance margin requirement, and the position is considered in liquidation.
Loan To Value Ratio (LTV)
The fraction of the position’s value that is made up by a loan.
Lock Up
To put money aside for a position’s margin.
Maintenance Margin Requirement (MMR)
The fraction of the position’s cost under which a position’s equity may not be allowed to fall under and still be solvent.
Margin
Money locked up in a position and used as collateral for a loan.
Margin Call
In the traditional finance world, a call from a broker to a client telling them that their position’s equity has fallen below the required maintenance margin and that they must top it up or be liquidated.
Negative Equity
When the unrealised loss on a position exceeds the position’s assigned margin. At this point the loan provider/exchange is now losing money.
Open Order
An order that is active in the order book on an exchange.
Open Premium
Additional margin that is assigned to open orders to prevent (if they were filled) their immediate liquidation.
Partial Liquidation
A liquidation mechanism where a position’s size is reduced in order for its maintenance margin requirement to be reduced, and prevent its full liquidation.
Portfolio Margining
A margining method where unrealised profit from related positions can be used to offset margin requirements.
Position Assignment
See Backstop Liquidity Provider.
Rekt
A slang term for being liquidated.
Return On Investment (ROI)
The percentage return on an initial cash investment.
Risk Limit Reduction Mechanism
See Partial Liquidation.
Risk Step
Part of the risk limit formula. For every risk step’s worth of value above the base risk limit, an additional maintenance margin step’s worth of maintenance margin are added.
Take Over
When an exchange takes a liquidated position by trading for it at its bankruptcy price.

Subscribe to the mailing list: