🌊Liquidations

When the margin supports a trading position that falls below its maintenance margin requirement, that position is subject to liquidation.

Liquidation in Oyster AMM is performed primarily via the taking-over approach, where the liquidator takes over the target trading position along with the remaining margins and tops up the margin to meet the initial margin requirement. Effectively, the remaining margin of the trading position to be taken over is a potential profit for the liquidatorβ€”that is if the liquidator can adequately manage the risk.

In addition, Oyster AMM also allows a liquidation mechanism where trading positions failing the maintenance margin requirement are forced to trade against the Oyster AMM directly to close the position. In this approach, the trading fee is also charged, including the dynamic penalty fee detailed in Security section. If the position has margin balanced remaining after the forced close, these margins would go to the insurance fund of this pair.

Both approaches support partial liquidation, where the initiator specifies the amount of position to be taken over or forcibly closed. In this way, a big bankrupted position can be taken over by multiple liquidators to improve the stability of the overall design.

In both approaches, there is chance that the target position is bankrupted. In that case, insurance fund of this pair is firstly used to fill the gap if possible. If the insurance fund is not enough to cover the loss, the loss is socialized to all opposite positions, that is the profiting positions are taxed to cover the loss. Social loss per LONG/SHORT is tracked by longSocialLossIndex and shortSocialLossIndex.

Last updated