Liquidations on dYdX Chain

Liquidations on dYdX Chain

Roselynn Chang avatar
Written by Roselynn Chang
Updated over a week ago


As part of the default settings of the v4 open source software (”dYdX Chain”), accounts whose total value falls below their maintenance margin requirement may have their positions automatically closed by the liquidation engine. Positions are closed via protocol-generated liquidation matches where a protocol-generated liquidation order uses a calculated “Fillable Price” as the limit price to match against liquidity resting on the order book. Profits or losses from liquidations are taken on by the insurance fund.

A liquidated subaccount may have its position partially or fully closed. v4 open source software includes a liquidations configuration which — as determined by the applicable governance community — will determine how much of the position is liquidated.

Liquidation Penalty

As part of the default settings of the v4 open source software, when an account is liquidated, up to the entire remaining value of the account may be taken as penalty and transferred to an insurance fund.

The liquidation engine will attempt to leave funds in accounts of positive value where possible after they have paid the Maximum Liquidation Penalty of 1.5%. The 1.5% fee contemplated in the default v4 software will be subject to adjustments by the applicable governance community.

“Fillable Price” for Liquidations

As part of the default settings of dYdX Chain, the “fillable price” (or the limit price of a liquidation order) for a position being liquidated is calculated as follows. For both short and long position:

Fillable Price (Short or Long) = P x (1 - ((SMMR x MMF) x (BA x (1 - Q)))

Where (provided as genesis parameters):

  • “P” is the oracle price for the market

  • “SMMR” is the spread to maintenance margin ratio

  • SMMR = Config.FillablePriceConfig.SpreadToMaintenanceMarginRatioPpm

  • “MMF” is the maintenance margin fraction for the position

  • “BA” is the bankruptcy adjustment

  • BA = Config.FillablePriceConfig.BankruptcyAdjustmentPpm. Is ≥ 1.

  • Q = V / TMMR where V is the total account value, and TMMR is the total maintenance margin requirement

On the other hand, the “Close Price” will be the sub-ticks of whatever maker order(s) the liquidation order matches against.

What price is used to determine liquidations?

As part of the default settings, Oracle Price is used to estimate the value of an account’s positions. If the account’s value falls below the account’s maintenance margin requirement, the account is liquidatable.

Who receives the liquidation fees?

The insurance fund would receive liquidation fees / penalty. Please note that the applicable governance community needs to initially fund the insurance fund from the applicable community treasury.

Disclaimer and Terms

This document may provide information with respect to the default settings of dYdX Trading Inc. (”dYdX”) v4 software, or non-mandatory guidelines and suggestions that may help with using v4 software. dYdX does not deploy or run v4 software for public use, or operate or control any dYdX Chain infrastructure. dYdX is not responsible for any actions taken by other third parties who use v4 software. dYdX services and products are not available to persons or entities who reside in, are located in, are incorporated in, or have registered offices in the United States or Canada, or Restricted Persons (as defined in the dYdX Terms of Use). The content provided herein does not constitute, and should not be considered, or relied upon as, financial advice, legal advice, tax advice, investment advice or advice of any other nature, and you agree that you are responsible to conduct independent research, perform due diligence and engage a professional advisor prior to taking any financial, tax, legal or investment action related to the foregoing content. The information contained herein, and any use of v4 software, are subject to the v4 Terms of Use.

Did this answer your question?