Trader Liquidation

A position is partially liquidated when the Margin Rate drops below the corresponding perpetual contract maintenance margin rate (specified separately for each contract).


Anyone can be a liquidator and request the AMM to liquidate a given trader. The AMM then either rejects the request if the trader margin is above the initial margin, or proceeds. The liquidation amount is determined so that the trader is brought back to the initial margin, if possible. Hence, this can result in a partial or a full liquidation of the position.

AMM Settlement

Similar to a trader, each perpetual has a margin account. The profit and loss for each perpetual are exchanged between the margin account and the liquidity pool. The AMM margin of each perpetual in a given liquidity pool is re-balanced with AMM/trader interactions (deposit, trade, withdrawal), so that the AMM margin resets to the initial margin level. For example, if the initial margin rate is 20%, and the position value decreased so that the margin balance stands at 15%, the funds are taken from the liquidity pool to re-establish a margin of 20%.

Certain events, as defined below, call for the liquidation of one or all perpetuals in the liquidity pool, which we term perpetual settlement. In case of perpetual settlement, all traders are closed out in the given perpetual. Traders with no outstanding position keep their posted collateral and are not affected. The liquidation price corresponds to the ’mark price’ which is an exponentially weighted moving average of the perpetual mid-price. After the pool liquidation, the liquidity pool is functional with the non-liquidated perpetuals in the pool. If there are not enough funds to settle all traders, the funds are distributed proportionally, that is, each trader receives their margin balance (at the mark price) scaled by the ratio of total capital over total trader margin. Where we define total capital as the sum of: (1) margin of the perpetual being liquidated, (2) the participation fund, (3) the default fund.

Perpetuals settlements are subject to the following rules illustrated in the Figure below. Trader gains are paid by the margin account of the perpetual. If the margin is not enough, the participation fund are used to pay the trader. If the margin balance of the AMM is negative, the perpetual is settled. If the default fund runs out of funds, all perpetuals of the liquidity pool are settled If a price oracle used for the given perpetual is terminated, the perpetual is settled.

Last updated