Trading Core

Insurance Fund

The insurance fund (`dydx1c7ptc87hkd54e3r7zjy92q29xkq7t79w64slrq`) is the first backstop to maintain the solvency of the system when an account has a negative balance. The account will be liquidated, and the insurance fund will take on the loss when it occurs. This insurance fund will be used before any deleveraging occurs.

The current size of the insurance fund can be viewed here.

Deleveraging

In the event that the insurance fund is depleted, positions with the most profit and leverage may be used to offset negative-balance accounts, in order to maintain the stability of the system.

Deleveraging is a feature made available by the perpetual contract, which is used as a last resort to close underwater positions if the insurance fund is depleted. Deleveraging works similarly to “auto-deleveraging” in other high-leverage futures and perpetual markets and is a mechanism that requires profitable traders to contribute part of their profits to offset underwater accounts.

Deleveraging will only be used if the insurance fund is depleted.

Deleveraging is performed by automatically reducing the positions of some traders—prioritizing accounts with a combination of high profit and high leverage—and using their profits to offset underwater accounts.

Deleveraging is chosen over a socialized loss mechanism to reduce the uncertainty faced by traders trading at lower risk levels.

The most highly leveraged offsetting accounts will be deleveraged first.

Deleveraging Example

Assume an initial margin requirement of 10% and a maintenance margin requirement of 7.5%.

Trader A deposits 1000 USDC, then opens a long position of 1 BTC at a price of 2000 USDC. Their account balance is -1000 USDC, +1 BTC. During a period of intense and prolonged volatility, the index price reaches 1080 USDC. Trader A is in a risky position, but not yet liquidatable. The price then rapidly drops further, and before A can be liquidated, the index price reaches 900 USDC, making the nominal value of A’s account -100 USDC.

The insurance fund is already depleted due to recent price swings, so deleveraging kicks in. Trader B, whose current balance is 10000 USDC, -9 BTC, is selected as the counterparty, on the basis of B’s profit and leverage, and the fact that B’s short position can offset A’s long position.

Trader B receives A’s entire balance, leaving A with zero balance, and bringing B’s total balance to 9000 USDC, -8 BTC. Trader B’s nominal loss due to deleveraging is 100 USDC, at an index price of 900 USDC. Trader B’s margin percentage increased (and leverage decreased) as a result of deleveraging, from 23.46% to 25%.

Liquidations Config

When accounts fall below the maintenance margin requirement, the liquidation engine can automatically close their positions at the specified liquidation price. The insurance fund absorbs any profits or losses resulting from these liquidations.

Title

Value

Definition

15000 [0.015%]

When an account is liquidated, up to the entire value of the account may be taken as penalty and transferred to the Insurance Fund. The liquidation engine will attempt to leave funds in accounts of positive value where possible after they have paid the maximum liquidation fee.

Contains the following parameter values:

The minimum (in notional value) and maximum (in parts per million) amount of how much a single position can be liquidated within one block.

‎1000000000

100000 [0.1%]

Contains the following parameter values:

The maximum amount of how much a single subaccount can be liquidated within a single block in notional value.

100000000000

1000000000000

The maximum number of quote quantums (exclusive) that the Insurance Fund can have for deleverages to be enabled.

Contains the following parameter values:

Configuration regarding how the fillable-price spread from the oracle price increases based on the adjusted bankruptcy rating of the subaccount.

1000000 [1%]

1500000 [1.5%]

Last updated