Liquidations & Insurance Fund

Overview

Each market in Lighter has different margin requirement configurations, which essentially define how much leverage an account can have in its positions without getting liquidated. When the value of an account falls below the margin requirements, liquidation occurs. Lighter has three different levels of margin requirements, each triggering different actions by the exchange.

For a specific account, the margin requirements are defined as follows:

Liquidation Waterfall

  1. An account is considered healthy when its account value is greater than all the margin requirements. It can execute any type of exchange operation as long as its position remains healthy after the execution of the transaction.

  2. In the case of partial liquidation, liquidation engine first cancels all of the open orders of the user. If the account value is still below the maintenance margin, liquidation engine orders open positions of the underwater account by a heuristic, then sends IoC limit orders on behalf of the margin called user with corresponding zero price one by one. If the user goes above the maintenance margin requirement after executing a trade, then liquidation engine stops the liquidations. If the user gets filled at a better price than the zero price, liquidation engine takes up to 1% liquidation fee and sends it to the insurance fund.

    One important aspect of the zero price is, when a trade gets executed at the zero price, total account value to maintenance margin ratio stays the same. Thus any trade that happens in partial liquidation phase only increases the account health, since the trade price is at least as good as the zero price. If all of the account positions are closed (i.e. maintenance margin requirement is 0) at the zero price, account value also becomes zero.

  1. If user goes below the close-out margin requirement, insurance fund closes all of the user positions and takes over all the remaining account collateral and sends it to the insurance fund. Not that the insurance fund does not take over the position if total account value of the insurance fund goes below 0, so following must be satisfied for full liquidation:

  2. Auto-deleveraging (ADL)

    When an account has a negative value and the Insurance Fund does not have enough capital to cover the losses of the bankrupt account, the exchange initiates auto-deleveraging (ADL) for the bankrupt account’s positions. A bankrupt account, by definition, has at least one open position. The exchange identifies positions on the opposite side of the bankrupt positions and executes trades between these accounts if their zero prices align. This ensures that ADL does not decrease the health of any account, as the execution price cannot be worse than the zero price of the position. When selecting positions for ADL on the opposite side, the system ranks users based on their leverage and unrealized PnL.

Last updated