How to Avoid Liquidation on GMX: A Step-by-Step 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

GMX’s liquidation math has a detail most guides skip: price impact isn’t treated symmetrically in the liquidation check, and your buffer erodes over time even if the price never moves against you.

This guide is part of TradeOnDEX’s GMX how-to series within Perpetual Futures, and pairs with the equivalent Hyperliquid liquidation-avoidance walkthrough for a cross-platform view.

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

The formula behind your liquidation risk

GMX calculates your remaining collateral value as: Current Collateral Value + PnL + Price Impact − Total Closing Fees (position closing fees, accrued borrowing fees, funding fees, and liquidation fees, minus any referral discounts). When this falls below the required maintenance threshold, liquidation triggers.

The price impact detail that catches people off guard

For the liquidation check specifically, negative price impact counts against you (capped by a protocol parameter), but positive price impact is zeroed out for that same check. This means for you, concretely: price impact can only ever hurt your liquidation risk calculation, never help it, even though your actual realized P&L when you eventually close the position does reflect both directions of price impact.

A concrete example

Say you open a $5,000 ETH long at 10x leverage, putting up $500 in collateral. Over the following days, even with ETH’s price flat, borrowing fees and funding fees accrue continuously against your position, your remaining collateral value (per the formula above) shrinks a little every day, moving you closer to liquidation without any adverse price move at all. If ETH then also drops moderately, the negative price impact from that move (counted fully in the liquidation check) compounds with the already-eroded fee buffer faster than a trader who only watched the raw price would expect.

How to actively manage your liquidation risk

  1. Check your liquidation price regularly, not just at entry. Since it moves closer over time purely from accruing fees, a position you opened with a comfortable buffer can have a meaningfully smaller one a week later with no price movement at all.
  2. Add collateral proactively using the Edit button on your position if your buffer is shrinking, rather than waiting until it’s critically close.
  3. Use lower leverage for positions you intend to hold longer. Since fees accrue continuously, a long-held high-leverage position is more exposed to fee-driven erosion than a short-held one.
  4. Set a stop-loss with real distance from your calculated liquidation price, accounting for the fact that negative price impact is already baked unfavorably into the liquidation check.

Risk: what this specific mechanic means for your risk management

Fee accrual is a liquidation risk factor independent of price direction. This is genuinely easy to overlook: a flat or even slightly favorable price move doesn’t guarantee your liquidation buffer is stable, because borrow and funding fees erode your effective collateral continuously while a position stays open.

The asymmetric treatment of price impact in the liquidation check is a deliberately conservative design, not an oversight. Since positive price impact doesn’t help your liquidation buffer while negative price impact does hurt it, GMX’s liquidation math is structured to err on the side of triggering liquidation earlier in adverse conditions rather than later, understand this as protective of protocol solvency, at the cost of a slightly tighter margin for traders than a naive read of “price impact” might suggest.

GMX’s liquidation mechanics have been the subject of active governance discussion. As with fee structures elsewhere in this series, treat the specific mechanics described here as current but not necessarily permanent. Check community governance channels for proposed changes before relying on precise figures for critical risk decisions.

A long holding period at high leverage compounds risk in a way that isn’t obvious from the entry price alone. The combination of continuous fee accrual and asymmetric price-impact treatment means “I have a comfortable buffer today” can understate how quickly that buffer narrows over a multi-day or multi-week hold.

Practical liquidation-buffer checklist

ActionWhy it helps
Check liquidation price periodically, not just at entryBuffer shrinks over time from fee accrual alone
Add collateral via Edit before the buffer gets criticalRestores buffer proactively rather than reactively
Use lower leverage for longer holdsReduces the compounding effect of ongoing fee accrual
Leave real distance between stop-loss and liquidation priceAccounts for negative price impact being fully counted against you

See it for yourself

Open a small test position and check its liquidation price daily for a few days, even without adding to it, to see how much the fee-accrual effect alone moves that threshold. You can review live position data at gmx.io.

Frequently asked questions

Can my liquidation price get worse even if the market price doesn’t move?

Yes, accruing borrowing and funding fees erode your effective collateral continuously, moving your liquidation price closer over time regardless of price direction.

Does positive price impact help protect me from liquidation?

No, for the specific liquidation check, positive price impact is zeroed out, while negative price impact counts fully against you.

How can I improve a shrinking liquidation buffer?

Add collateral to the position using the Edit button, or reduce your position size, rather than waiting for the buffer to become critical.

Is holding a position longer riskier from a liquidation standpoint, all else equal?

Yes, continuous fee accrual means a longer hold at the same leverage erodes your buffer more than a shorter one, independent of price movement.

Affiliate disclosure

TradeOnDEX may earn a commission if you trade through a link on this page, at no extra cost to you. GMX’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 or a guarantee against liquidation. 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