How Crypto Derivatives Exchanges Prevent Bankruptcy

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


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

High leverage derivatives trading comes with inherent risks; not only for traders, but for the exchange as well. In this article I will cover what these risks are, and what strategies crypto exchanges employ to maintain their solvency.

A Quick Recap

If you haven’t already, the previous article about leverage and liquidation is recommended reading prior to covering this topic. In this article, we will be focusing only on derivatives when it comes to leveraged trading.

Margin & Leverage

Crypto derivatives exchanges will provide leverage as a service to clients. Leverage allows you to control a larger position value while only providing a fraction of the capital which is called margin. The lower the fraction provided the higher the leverage of the position.

A position will have equity which is the amount of capital initially provided (the initial margin) plus any unrealised profit/loss that has arisen from the position gaining or losing value. If that equity goes to zero, that means that a position is bankrupt. Once the price of the asset goes beyond your bankruptcy price (the price at which you are bankrupt), your position will have negative equity.


If a position has negative equity this means that the exchange is now in the position to lose money, since in the crypto world margin calls and trying to recover money through courts (done by traditional brokers) is less common. Exchanges want to avoid this situation, and therefore set an equity level called the maintenance margin at which the position will be closed, or liquidated.

There are several ways of liquidating a position, but one of the most common is a full liquidation where the client’s position is taken over by the exchange when it reaches its liquidation price. The exchange will move the position by closing the client out at their bankruptcy price (leaving them with no position/cash, but with no debt either). They will then attempt to close out this position that they have acquired.

If they manage to close the position profitably, any profit will be added to an insurance fund which is a pool of money that is used by the exchange to cover client losses. If they end up closing the position unprofitably, then the insurance fund will be used to cover this loss.

An Uninsured Loss

You may be wondering: what happens if the insurance fund runs out? The answer to this question depends on what liquidation positions the exchange holds at the time.

If the exchange is not holding any liquidated positions, then the insurance fund is not required for day to day operations. However, if the exchange is holding a liquidated position, then the equity in that position is very important. If we have no insurance fund, that means that we have no funds to support a losing position.

Say the exchange takes on a 1BTC position at a bankruptcy price of \$36,000. The mark price currently is \$38,000, meaning that the exchange has a \$2,000 unrealised profit. The position equity is therefore \$2,000, and the position is solvent.

Now, imagine the price falls to \$36,000. At this point the mark price matches the bankruptcy price of the position. By definition the exchange has no equity left on the position. The exchange also has no money in the insurance fund, and the position that it is holding is now also worthless. They are technically bankrupt, but do not yet have negative equity.

Now say the mark price falls to \$35,000. The exchange now has an unrealised loss of \$1,000 on the position, and no funds to cover the loss. While this might seem like a small amount, bear in mind that the position sizes can be large, and involve millions of contracts / dollars. If the loss keeps increasing, there is a risk that the exchange will be unable to cover it.

A Zero-Sum Nature

When viewed as a system, derivatives exchanges can be viewed as zero-sum. This means that all profits generated are someone else’s losses. In other words, if you make a profit of \$100, some other trader had to make a commensurate loss of \$100.

The reason for this is the way that contracts are constructed on these exchanges. As we covered in the previous article, each derivative contract (whether it be a swap, an option, or a future) is created as a pair. This means that the total number of long contracts must match the number of short contracts on the exchange. The total number of contracts ($\frac{long+short}{2}$) is called the open interest.

Each contract must have two sides

Each contract must have two sides

Contracts are created or destroyed depending on what trades are made, and whether the participants are increasing or reducing their position. In the most simple example, if both participants have no position (they are flat) then if one buys one contract, and the other sells a contract the open interest will increase by one. Likewise, if the participant that went long sells their contract to the participant that went short, the open interest will go down by one.

The following table outlines what happens to the open interest if participants A and B trade with each other:

Position APosition BOpen Interest
IncreasesDecreasesStays Same
DecreasesIncreasesStays Same

When it comes to profits, these too are also zero-sum. I will not go into the full derivation here, but it can be inferred intuitively.

For instance, take two positions: one long, and one short of 1BTC entered at \$40,000. As mentioned positions are marked with a mark price, and this determines what their unrealised PnL is. If the mark price goes up to \$41,000 then the long position has an unrealised profit of \$1,000 and the short position has an unrealised loss of \$1,000. Note that these profits add up to zero. If these participants trade at \$41,000 then these profits will be realised, and they too will sum up to zero.

Visualising Position PnL

We can visualise all of the participants in terms of profit that they have on their positions. Take the following positions (note that I haven’t put down quantity as it is not actually important in this case):

accountsiderealised pnlunrealised pnl

We can represent this position as two bar charts showing both the long and the short positions for the exchange. Remember, we know the quantity is zero-sum between long and short. Each bar represents the PnL on either a long or short position. We also display the realised PnL in the chart at the bottom.

Position PnL distribution in an exchange

Position PnL distribution in an exchange

The “EX” account represents the exchange itself, as if a position is taken over during a liquidation the exchange will take ownership of it. If for instance the mark price moves down, and the long positions start making losses (and the shorts profits), then someone may be left bankrupt.

Socialised Losses

As mentioned earlier, if the exchange ends up with a position that has an unrealised loss greater than its insurance fund, then the exchange is effectively bankrupt. At that point, it needs to find a way to cover this loss. One option is for the exchange to add more money to the insurance fund. In theory this is fine, but obviously it has its limitations and if the loss is too large, then it may not even be possible.

The other option, is to use the fact that all the money in the system is zero-sum and therefore the profit from the loss that the exchange holds is still “in” the system. After all, someone else (or multiple people) must be holding a same sized profit from the exchange’s loss.

As such, the exchange just needs to make sure that whatever loss it holds, can be covered from the profits of some of the clients who were profitable. Traditionally this has been done in a couple of ways, and the collective term for all of these is a socialised loss mechanism. The “socialised” coming from the fact that all the traders have to potentially bear the cost of the exchange not being able to cover a loss.


The only time that physical cash is required when dealing with derivatives contracts is either when you realise profits by trading, or during settlement (or funding for perpetual contracts). A clawback is a mechanism that is used by an exchange to take a portion of the profits from profitable positions to cover the exchange’s own loss.

This mechanism is used by several exchanges such as OKEx, Deribit and Huobi. BitMEX used to also use a clawback system (called Dynamic Profit Equalisation), though now only uses ADL.

How it Works

Say that the exchange takes over a position with a negative equity of \$100,000. The insurance fund is empty, and the exchange manages to trade out the position at the mark price and realise a \$100,000 loss. Due to the zero-sum nature of the exchange, other users have managed to acquire a profit of \$100,000 at the same time. This money however, does not exist!

If these users were to withdraw this money, that would mean that the exchange would now have sent out cash while still holding liabilities to other traders. This would be disasterous as clients might find that the exchange does not actually have money to pay out their profits, or (even worse) their deposits. Instead, the exchange will apply a clawback rate to all profits generated on the contract in question. This means that while the exchange has a monetary “hole” the rate will be applied to all profits. This means that users are only able to withdraw the profits that are not clawed back by the exchange.

The clawback rate can be determined by taking the loss that the exchange has accrued, and dividing it by the total profit on that contract.

$$ r_{clawback} = \frac{\max(0,-pnl_{exchange})}{profit_{total}} $$

So in the example above the exchange has a pnl of -\$100,000. If the total profit on the contract is \$2,000,000 then the clawback rate is $\frac{\$100,000}{\$2,000,000} = 0.05$ or 5%. This means that if another user has a realised profit of \$10,000, they are only able to use or withdraw $(1-0.05) \times \$10,000 = \$9,500$. Once the contract settles (and these are cash settled contracts) then the cash is clawed back and given to the exchange, meaning that they now have 0 profit or loss on the position.

Note that only the profitable users need to have a clawback, and the users with a loss are left as is (the clawback does not apply to them for obvious reasons). In the example above everyone who was profitable got a haircut (another name for a clawback) as the clawback rate was applied evenly across all profitable positions. In the diagram below you can see how profits are capped (red crossed areas) for any profitable positions.

Example of how realised and unrealised profits are capped in order to cover a loss for the exchange. In this case, the \$50 exchange loss is covered by a 50% clawback rate.

Example of how realised and unrealised profits are capped in order to cover a loss for the exchange. In this case, the \$50 exchange loss is covered by a 50% clawback rate.

Notable Examples

On the 31st of July 2018, a long Bitcoin futures position went into liquidation on the OKEx exchange. What was notable about this position was its size, which was around \$400,000,000. The exchange was forced to take over the position, however their insurance fund at the time was unable to cover the loss on the position. An additional injection of 2,500 Bitcoin (approximately 18m USD) was still insufficient to cover the loss.

OKEx was eventually forced to set a 17% clawback rate for the contract. The total losses to traders ended up at 1,200 BTC (approximately 8.8m USD) which was split amongst the profitable traders.

On the 13th of March 2020 the price of Bitcoin fell precipitously causing many liquidations. The Deribit derivatives exchange manually topped up their insurance fund with 500 Bitcoin of their own funds in order to avoid socialised losses.

Automatic Deleveraging (ADL)

The clawback mechanism works by applying a “tax” on all of the profitable positions. This means that all profitable users have to pay for an uninsured loss. One issue with this is that one single highly leveraged trader can cause losses for everyone including traders who had much less leveraged positions. When BitMEX switched from a clawback mechanism to ADL, they noted that clawbacks offer a certain moral hazard given that one trader can cause losses for everyone else.

As an alternative, a system called automatic deleveraging (more commonly known as ADL) was invented. This is also known by other names such as early assignment. The fundamental idea is that instead of assigning a clawback rate to each profitable trader, some of traders themselves would actually be closed out instantly to realise some of their profits and cover the exchange loss immediately. This mechanism is used by several exchanges including BitMEX and ByBit.

How it Works

With a clawback, the exchange waits until all PnL is realised before taking it to cover their loss. This can be confusing for traders, and requires the exchange to keep track of the clawback and take this into account when margining positions. ADL works by immediately closing the exchange’s position if the insurance fund runs out of money.

When the exchange liquidates a position and the insurance fund is unable to cover the unrealised loss, the exchange will initiate the ADL procedure. The exchange needs to find positions with the opposite side to close against. For instance, if the exchange has a long position, it must find short positions to sell to in order to close its own position. Likewise if it has a short position, then it has to find long positions to buy from.

The question then becomes: which positions should be chosen? This depends on the exchange, but general idea is to choose the most highly leveraged and most profitable positions. A commonly used formula is this one:

$$ score_{adl} = \begin{cases} \begin{aligned} \%PnL & \times Leverage_{eff}, & \%PnL > 0 \newline \%PnL & \div Leverage_{eff}, & \%PnL < 0 \end{aligned} \end{cases} $$

where $Leverage_{eff}$ is effective leverage and $\%PnL$ is the unrealised pnl as a percentage of the entry value. For instance, a position with an effective leverage of 20, and a %pnl of 2% would have a score of $20 \times 0.02 = 0.4$.

Consider an exchange with the following positions.

accountsidequantityeff. leveragepnl (%)

The exchange is holding a (liquidated) 100 contract long position, and we assume there is no insurance fund. This means that the exchange has negative equity and is therefore bankrupt. Note that the exchange has no leverage because it does not require initial margin to hold its own position (it is its own money after all).

The exchange’s position is long, therefore we need short positions only. We then calculate their score, and rank them from highest to lowest:

accountsidequantityeff. leveragepnl (%)adl score

The exchange has a position of 100, so we now match off against the short positions in order of their score. This creates the following trades:


The price of the trades (in this case) will be the average entry price of the exchange’s position. That way the exchange is left with 0 realised profit or loss once it closes the position. The final positions of the exchange look like so:


Account C has had it’s position closed, while account D has had it’s position partially closed to 90. Depending on their entry price, these positions will end up realising a smaller profit than they would have otherwise. The exchange’s position is fully closed, and it’s total realised profit is 0. However, it now has no more negative equity as its bankrupt position is gone.

ADL Priority

Most exchanges that carry out ADL will indicate to participants how likely they are to be closed by an ADL. Usually this is done in percentiles, so if your position is in e.g. the top 20% of positions this will be indicated. This way, traders are able to assess their “ADL risk” when holding a position on an exchange.

The ADL indicator on the BitMEX exchange. The higher the ADL priority of your position, the more lights are lit up.

The ADL indicator on the BitMEX exchange. The higher the ADL priority of your position, the more lights are lit up.

One of the benefits of doing ADL in this way is that traders with lower leverage positions (less risky) are less likely to be impacted, giving an incentive for the use of lower leverage when trading.

Notable Examples

On the 2nd of April 2019, an accidental ADL occurred on BitMEX for the XBTU19 and ETHM19 futures after a sharp rise in the Bitcoin price that day. BitMEX later stated that the ADL had occurred in error due to the insurance fund for these contracts not having sufficient capital allocated. All traders who were deleveraged were subsequently compensated.

Issues With Socialised Losses

The obvious downside of socialised losses is that profitable traders will end up with less profit than they originally would have. On the surface this seems not too bad, since they just get less profits (but they still get some). However since this is a derivative contract which is used for hedging, the actual impact can be much worse.

Consider that derivatives e.g. futures are used to fix the price of an asset. For instance, consider a trader that has a 1 Bitcoin cash position which was bought for \$40,000. They want to fix the price of their Bitcoin in USD terms for the next 3 months, so they sell a 1BTC future for the price of \$41,000. The trader knows that in 3 months time they will have a fixed price of \$41,000 irrespective of the current Bitcoin spot price.

A day before the future’s settlement, the price of Bitcoin falls to \$30,000. The Bitcoin held by the client has an unrealised loss of \$10,000. The future is close to settlement, so it’s price is (approximately) \$30,000, and therefore the short position has an unrealised profit of \$11,000. The combination of the cash and future position still has a value of $\$30,000 + \$11,000 = \$41,000$ as before.

Unfortunately, as the price fell to \$30,000, the exchange took on a large unrealised loss which its insurance fund was unable to cover. The exchange was forced to carry out an ADL to close a large liquidated long futures position. As a result of this, the trader’s future’s position was closed out not at \$30,000 but at \$35,000. Their future’s position realised profit ends up being \$6,000. The total position (cash + future) value comes to $\$30,000 + \$6,000 = \$36,000$.

Because of the ADL, the future’s hedge has now been broken. The trader originally counted on receiving \$41,000 at the end of the 3 months, but instead they ended up with \$36,000 and made a net loss vs the \$40,000 they originally paid for the Bitcoin. Given a large enough position size, this can be a serious risk. For this reason, traders doing this kind of trade need to pay close attention to the ADL risk.


Automatic Deleveraging (ADL)
A mechanism where a position held by an exchange whose losses exceed the available insurance fund is closed out against profitable positions on the other side.
A mechanism where if an exchange is bankrupt, any realised and unrealised profits for a contract are capped by a clawback rate to cover the loss.
Clawback Rate
A percentage “tax” that is applied to profits from a contract on which the exchange has an uninsured loss.
Early Assignment
See Automatic Deleveraging.
See Clawback.
Moral Hazard
The risk that when provided a certain level of protection, a participant will act in a more risky or reckless way than if that protection was not there.
Socialised Loss Mechanism
A general name for a mechanism that spreads exchange losses over (usually profitable) participants.
A system where a given value sums to zero within it.

Subscribe to the mailing list: