How to Avoid Liquidation on dYdX: A Worked Example

Risk warning. Trading perpetual futures and other leveraged crypto-asset products is high risk. A large share of retail traders lose money, so never trade with money you cannot afford to lose entirely. Disclaimer

Your liquidation price on dYdX isn’t just “roughly where your margin runs out”, it’s a specific formula, and if you’re holding more than one position, a completely unrelated market’s position changes the math on the one you’re actually worried about.

This guide is part of TradeOnDEX’s dYdX how-to series within Perpetual Futures, building on the first-trade and cross-margin guides.

Disclosure: TradeOnDEX may earn a commission from links to dYdX on this page, at no extra cost to you. Full details at the end of this article.

The mechanic: maintenance margin fraction

dYdX uses a Maintenance Margin Fraction (MMF), a fixed percentage per market that sets the minimum collateral required to maintain your position without triggering liquidation. If your total account value falls below your total maintenance margin requirement across all positions, the liquidation engine can close positions automatically.

Worked example 1: a single position

A trader deposits $1,000 and shorts 3 ETH contracts at $3,000 per contract, with a 5% maintenance margin fraction on that market. Working through the liquidation price calculation: p’ = (1000 + 9000) / (0.15 + 3) ≈ $3,174.60. This means if ETH’s price rises to roughly $3,174.60, this short position reaches its liquidation threshold.

Worked example 2: a second, unrelated position changes the math

The same trader also opens a second position: 1,000 STRK contracts at $1.75, with a 10% maintenance margin fraction on that market. That second position’s own margin requirement is: $1,000 \times 1.75 \times 0.10 = $175$. Recalculating the ETH short’s liquidation price accounting for this second position’s margin requirement: p’ = (1000 + 4500 − 175) / 1.575 ≈ $3,380.95.

This means for you, concretely: opening the STRK position moved the ETH position’s liquidation price meaningfully closer (from ~$3,174.60 to ~$3,380.95 in this example, using the account’s shared cross-margin balance), a completely unrelated market’s position directly affects how much room your other positions have before liquidation, if you’re using cross margin.

How to actually avoid liquidation, practically

  1. Deposit more collateral. Increasing your account’s total value directly increases the buffer between your current position and its liquidation price.
  2. Reduce position size. Closing part of a position changes its liquidation price calculation, generally moving it further from the current market price.
  3. Account for every open position’s combined margin requirement, not just the one you’re focused on. As the worked example shows, a second position’s margin requirement changes the first position’s liquidation math under cross margin.
  4. Consider isolated margin for a specific position you want ring-fenced, as covered in the cross vs. isolated margin guide, so that position’s risk doesn’t interact with your other holdings’ margin requirements.

Risk: what the formula doesn’t make obvious at a glance

Under cross margin, every position you hold shares the same collateral pool and affects every other position’s liquidation math. This is the single most under-covered detail in most “how to avoid liquidation” content, a position in a market you’re not actively watching can still move your liquidation price on the position you are watching.

The liquidation engine applies a penalty on top of closing your position. dYdX’s liquidation engine attempts to preserve remaining account value where possible, but a maximum liquidation penalty of 1.5% is applied, liquidation isn’t just “position closed at the trigger price,” there’s a real cost on top.

Maintenance margin fractions differ by market, and can be higher for less liquid assets. A market with a higher MMF requires more collateral to maintain the same position size before liquidation risk increases. Check the specific MMF for your market rather than assuming a uniform rate across all of dYdX’s listed markets.

Adding a new position under cross margin is a decision that affects your entire account’s risk, not just that new position’s own risk. Before opening any additional position, consider its effect on the liquidation price of positions you already hold, using the same logic shown in the worked example above.

The two levers that move your liquidation price

LeverEffect on liquidation price
Deposit more collateralMoves liquidation price further from current market price
Reduce position sizeMoves liquidation price further from current market price
Open an additional position (cross margin)Can move liquidation price on existing positions closer to current market price

See it for yourself

Before opening a second position while using cross margin, run through the same style of calculation shown above using your own numbers, or check a risk calculator, so you know exactly how much closer it moves your existing position’s liquidation price before you commit.

Frequently asked questions

Does opening a new position affect the liquidation price of positions I already have?

Yes, if you’re using cross margin, a new position’s margin requirement is factored into the shared collateral pool, which can move your existing positions’ liquidation price closer to the current market price.

Is there a penalty when a position gets liquidated on dYdX?

Yes, a maximum liquidation penalty of 1.5% applies, on top of the position being closed; the liquidation engine attempts to preserve remaining positive account value where possible.

Is the maintenance margin fraction the same for every market?

No, it’s set per market and can be higher for less liquid assets, meaning liquidation risk profiles differ by market even at the same position size and leverage.

What’s the simplest way to move my liquidation price further away?

Deposit more collateral or reduce your position size, both directly increase the buffer between your position and its liquidation threshold.

Affiliate disclosure

TradeOnDEX may earn a commission if you sign up or trade through a link on this page, at no extra cost to you. dYdX’s own affiliate/referral terms are still being confirmed for this site, so links here are direct and untracked for now. This article is educational and is not financial advice. See our disclaimer for the full risk warning.

Risk warning

Trading crypto assets, and leveraged products based on them such as perpetual futures ("perps"), is high risk. A large share of retail traders lose money on these products. Leverage magnifies gains and losses alike and can push your loss beyond the amount you put in. Positions can be closed automatically (liquidation) before you get a chance to react, and some of the platforms we cover offer no negative balance protection.

Never trade with money you cannot afford to lose entirely. TradeOnDEX gives no investment advice, no personal recommendation, and no guarantee of any outcome. Every decision you make is your own decision and your own responsibility.

Disclaimer