This article will review the loss mitigation mechanisms commonly found on exchanges that offer trading with leverage. More specifically, we will examine the roles of insurance funds and auto-deleveraging as counter-measures to capital drawdowns on trading platforms. Basic familiarity with perpetual swaps and leveraged trading is recommended before proceeding.
The insurance fund provides a capital buffer to keep the exchange solvent and fair. Capitalizing the insurance fund is a shared cost for all traders who experience liquidations. In return, traders have the peace of mind knowing that they will always receive the profits they deserve.
Risks of Leverage
The maximum possible loss on any trade in the spot markets is 100% when the spot asset’s price goes to zero. However, with leverage, the loss can be greater than 100% of the starting capital. That is because borrowed money increases the position size beyond what would be possible in the spot market, magnifying profits and losses. Perpetual swaps are the most popular instruments for trading cryptocurrencies with leverage, and we will focus on them in this article.
Whenever the posted collateral does not meet the minimum requirement to keep the position open, the liquidation engine will proceed to liquidate the position. Such liquidations of leveraged perpetual swap positions carry risks of exchange-wide capital drawdowns. These risks increase with volatility in the underlying spot markets when price slippage tends to be higher than usual. A rapid price movement will often leave some accounts underwater. For example, a losing long trade may be liquidated (forcibly market closed) below the bankruptcy price. Since every trade has a counterparty (if I buy, someone sells), not enough capital will be left on the exchange for the counterparty to withdraw their profits. Even though exchanges try hard to minimize the frequency and impact of such inefficient liquidations, these events still happen.
Derivatives trading platforms often provide limited downside, which means they don’t go after traders for negative balances. Instead, they use two strategies to protect the system’s solvency. The first line of protection is the insurance fund — a pool of capital designated to immediately compensate any liquidation that recoups less money than it should. On Firefly, the settlement is in the USDC stablecoin, so the insurance fund is capitalized with USDC. The insurance fund is a public good that protects the traders and does not belong to anybody. In the extreme case when the insurance fund runs dry, auto-deleveraging protects traders as a last resort. These two mechanisms ensure that winning traders receive the profits they deserve and that the exchange stays capitalized and solvent.
To analyze the capital flows in and out of the insurance fund, let’s look at two possible scenarios. Before that, four prices relevant to every leveraged trade need to be defined. We wrote about leverage in more detail in this article, but to recap, leverage is the ratio of notional position value to the value of the posted collateral. Let’s now dissect the four relevant prices using a perpetual swap contracts trade as an example:
- Entry price: the average price per contract at which the perpetual swap position is opened.
- Bankruptcy price: the price per contract at which the loss on the trade is equal to the collateral value.
Bankruptcy price = Entry price x Leverage/(Leverage+1)
- Liquidation price: The price per contract at which the liquidation occurs. It is slightly higher than the bankruptcy price for a long position and lower than the bankruptcy price for a short position.
- Closing price: the average price per contract at which the trade is closed.
The four prices are shown below, using a long trade as an example.
The four relevant prices illustrated for a long trade.
There are two possible scenarios in which the insurance fund either grows or shrinks. They depend on closing, liquidation, and bankruptcy prices. To make these scenarios intuitive, let’s consider an example liquidation (forced market close) of a leveraged long perpetual swap trade. After hitting the liquidation price, the liquidation engine flags the losing long position for market closing.
By the way, the same logic applies to scenarios involving short contracts, with some simple differences, e.g., the bankruptcy price is higher than the liquidation price for shorts.
Scenario I: Contracts liquidated before bankruptcy
The market close is executed, with the closing price above the
bankruptcy price. For each contract liquidated that way, the
closing price — bankruptcy price flows to the
exchange’s insurance fund. For shorts, the relevant difference
bankruptcy price — closing price .
Scenario II: Insurance fund covers for an inefficient liquidation
Due to significant price slippage, the losing long is closed at
below the bankruptcy price. Since the trader’s account value
fell into negative territory, the insurance fund covers the
capital lost in the liquidation process, i.e.
bankruptcy price — closing price, for every
contract liquidated. Thus, the insurance fund guarantees that
the exchange stays solvent and that enough capital is there for
everyone to withdraw. For liquidated shorts, the relevant
difference would be
closing price — bankruptcy price .
The difference between the liquidation and bankruptcy prices is not to scale in the graphics above. The liquidation price is typically much closer to the bankruptcy price than depicted.
Suppose a position cannot be closed at the liquidation price, and the insurance fund is insufficient to cover the loss from this position. In that case, the auto-deleveraging (ADL) mechanism kicks in. As an open trade reaches the bankruptcy price, the system will automatically deleverage the positions on the opposite side. For example, suppose the price of Bitcoin drops 20% instantly. In that case, a trader with a leveraged short position on BTC/USD could automatically get their position trimmed and a part of the profits cashed out to pose a “lesser burden” to the longs who are losing money.
For ADL purposes, accounts are organized into a queue according to their profit and leverage levels. The most profitable, high-leverage traders are placed at the front to reduce the counterparty risk by first dealing with the riskiest traders.
To recap, the insurance fund is a crucial component of any exchange that allows for leveraged trading. It is the first line of protection against exchange-wide capital drawdowns that result from inefficient liquidations.
Insurance Fund Mining
The liquidation penalties defined in “Scenario I” replenish the insurance fund organically during the exchange operations. However, some capital is necessary to ensure a smooth trading experience right from launch. To bootstrap initial capital for the insurance fund, Firefly will organize the insurance fund mining program. Through the program, users who help bootstrap the insurance fund will earn token rewards.
Firefly will kick off the insurance fund mining program soon! You will be able to read about it in-depth in a follow-up article!
Firefly is a decentralized exchange for derivative products built on Edgeware, a Polkadot Smart Contract Chain. The exchange is designed to function as a public utility, owned and controlled by the community of token holders. Modular, extensible smart contracts enable continuous upgrades and additions to the protocol. These contracts are open source, developer friendly, and built to leverage the performance and security of Substrate.
Firefly will launch an insurance fund and offer perpetual swap trading in Q2 2021, both with early participation rewards. Traders will benefit from a seamless trading experience, familiar to that of centralized exchanges, no gas fees and low trading fees. The protocol for trading options will go live later in the year. The number of features and assets on Firefly will grow over time. Soon, we will be able to rapidly launch new trading pairs and allow traders to gain the exposure they want, whenever they want. This is just the beginning — we hope you join us in creating the future of finance.
If you are interested in trading perpetuals, options, or other derivatives then please join the growing community on Telegram and follow us on Twitter!