Liquidations & Insurance Fund

Learn about Vertex's liquidation model and how the insurance fund works.
Liquidations on an exchange refer to the automated process of closing leveraged trading positions when a trader's account balance, or "margin," gets too low to cover potential losses.
Just as a car running low on fuel would need to stop to avoid stalling, liquidations prevent traders from going into debt by ensuring their losses don't exceed their initial investment.
Liquidation mechanisms vary for each exchange, which sets unique and publicly available maintenance weights that are used to determine the risk profile of a given market. Some exchanges might have tighter liquidation thresholds, meaning your position could get liquidated more quickly if the market moves against you. Others might offer more leniency, giving you a bit more room before liquidation kicks in.
Liquidations safeguard an exchange's solvency by settling accounts between traders, maintaining fairness, and preventing potential disruptions that could arise from underfunded positions amid volatility.
You can find Vertex’s market specifications, including maintenance weights, in the “Perpetual and Spot Market Specifications” section.
Efficiently structured liquidation processes on Vertex are supplemented by risk management tooling for users, including portfolio and position health indicators on the front-end along with trigger orders.

Liquidations on Vertex happen at the mark oracle price, derived from a third-party oracle (Stork), which you can learn more about in the “Pricing (Oracles)” section.
Liquidations protect the protocol and users from the risk of systemic bankruptcy. When an account's maintenance health falls below 0, it enters liquidation. The assets and perpetual positions of the subaccount will be closed in the following order:
  1. 1.
    Orders are canceled.
  2. 2.
    LPs are decomposed.
  3. 3.
    Assets are liquidated (Spot Balances/Long Spreads/Perps).
  4. 4.
    Liabilities are liquidated (Borrows/Short Spreads).
Any user can purchase assets from the liquidating account at a discount or pay off its liabilities at a markup until the underwater account's Initial Health rises above 0.
If, at any point during the liquidation process, the Initial Health of the account exceeds 0, liquidation will cease.
Conceptual view of the liquidation flow on Vertex.

Liquidation Price

When liquidators attempt to liquidate a subaccount, they specify the product and the amount they want to liquidate. The liquidation price for assets is set halfway between the oracle price and the price determined by the maintenance weight.
The net price at which the product is liquidated is calculated as follows:
  • Long: oracle_price * (maintenance_asset_weight + 4) / 5
  • Short: oracle_price * (maintenance_liability_weight + 4) / 5
The gross profit of liquidators equals:
  • Long: oracle_price * (1 - maintenance_asset_weight) / 5
  • Short: oracle_price * (maintenance_liability_weight - 1) / 5
However, the Vertex protocol receives 25% of the profit that liquidators generate, and these fees are deposited into the insurance fund to protect protocol health moving forward. Thus, the net profit of liquidators equals:
  • Long: oracle_price * ((1 - maintenance_asset_weight) / 5 )* 0.75
  • Short: oracle_price * ((maintenance_liability_weight - 1) / 5 )* 0.75

Liquidation

Liquidators can specify any product and amount, but the total can be rounded down such that the optimal amount of liquidations occur to bring the liquidatee’s Initial Health back to 0. This minimizes the impact of liquidations on users as much as possible.
Liquidating a specific product can result in two outcomes:
  1. 1.
    Liquidatee receiving USDC for positive spot balances and their positive PNL perps.
  2. 2.
    Liquidatee spending USDC to pay back negative spot balances and negative PNL perps.
For Outcome 2, Vertex cannot allow the liquidatee's USDC balance to be spent below 0. Otherwise, losses that need to be socialized can be incorrectly assigned to USDC holders. If all liquidation options are Outcome 2, then the account is insolvent.
At this point, the account's positions would have been exited at a loss, and there is now bad debt in the system.
This triggers Vertex's last lines of defense:
  1. 1.
    USDC from the insurance fund is pulled into the insolvent account and used to pay liquidators to take on the underwater positions.
  2. 2.
    If the insurance fund is empty, then the losses from the underwater positions are socialized.

Insurance Fund

To maintain the creditworthiness of the platform, a segregated pool of USDC will be available to fund shortfalls in the event that an account goes into bankruptcy – the Insurance Fund. Initially, this will be seeded with funding from the core team but will then be topped up with a percentage of revenue from liquidations.
If accounts are insolvent, the insurance fund steps in to pay off losses to avoid socialization.

Socialized Losses

In the first instance, bankrupt accounts will be paid from the insurance fund.
However, if the insurance fund is depleted, the system will attempt to socialize against other perpetual accounts in that market. If the account has already been settled, its losses will be socialized against all USDC holders.
In Summary:
  • Step 1: Insurance Fund
  • Step 2: Perp Socialization
  • Step 3: USDC Depositor Socialization