How Liquidations Work and How to Avoid Them
A liquidation forcibly closes your leveraged position or sells your collateral when its value falls below the required threshold. Here is how the trigger is calculated in perps and in DeFi lending, and the buffers that keep you out of it.
Dive Deeper with AI
Click → prompt copied → paste in AI chat
A liquidation forcibly closes your position, or sells your collateral, the moment its value drops below a required maintenance margin or collateral threshold. It exists to protect the lender or exchange from your losses, not you. In leveraged trading it fires at your liquidation price. In DeFi lending it fires when your loan crosses the liquidation threshold, and a third party repays your debt in exchange for a bonus carved out of your collateral.
That is the short answer. The rest of this page is the math behind the trigger, and the buffers that keep you on the right side of it.
Why liquidations exist
When you trade with leverage or borrow against collateral, someone is fronting value you have not fully covered. The exchange lends you buying power; the lending protocol lends you assets against your deposit. If the market moves against you far enough, your position can become worth less than what you owe.
Liquidation is the automatic circuit breaker that closes you out before that happens, so the counterparty is made whole. The system does not wait for you to lose your own money and then some. It acts the instant your equity drops below the minimum it requires to keep the position open.
Maintenance margin and the liquidation price
In leveraged trading you post initial margin to open a position. As the price moves against you, your equity shrinks. The maintenance margin is the minimum equity the exchange will tolerate before it closes the position. Cross it and you are liquidated.
Higher leverage means a smaller price move wipes out your margin. At 2x leverage a long is liquidated only after roughly a 50% drop. At 20x, a move of around 5% against you is enough. The liquidation price is simply the price at which your remaining equity equals the maintenance margin. Every exchange shows it for open positions, and it shifts as you add margin or as funding accrues.
For a deeper look at how leveraged futures are priced and funded, see perpetuals explained.
Health factor and LTV in DeFi lending
DeFi lending uses different language for the same idea. When you deposit collateral and borrow against it, the protocol tracks your loan-to-value (LTV) — debt divided by collateral value — or a health factor, which is collateral value times its liquidation threshold, divided by debt.
A health factor above 1 is safe. When it reaches 1, your LTV has hit the liquidation threshold and your position is open to liquidation. At that point a liquidator — anyone running a bot — repays part or all of your debt and takes your collateral at a discount. That discount is the liquidation penalty, often 5% to 15%, and it is the incentive that makes liquidators show up instantly.
Collateral value here is set by an oracle, not the exchange order book. If the oracle marks your collateral down, your health factor falls even if you never touched the position. See lending protocols and oracles for how these feeds are built.
Two systems, one outcome
| Leveraged perp | DeFi loan | |
|---|---|---|
| Trigger | Price hits liquidation price (equity below maintenance margin) | Health factor reaches 1 (LTV hits liquidation threshold) |
| What gets sold | Your open position is force-closed at market | Your deposited collateral is sold to a liquidator |
| Penalty | Liquidation fee plus slippage on the forced close | Liquidation bonus taken by the liquidator, typically 5–15% |
| Priced by | Exchange mark price | Oracle price feed |
The mechanics differ, but the lesson is the same: the further your position sits from the trigger, the more room a sudden move gives you before it becomes someone else's profit.
Cascading liquidations
Liquidations are not always isolated. In a sharp move, forced selling from one liquidation pushes the price further in the same direction, which drops the next position below its threshold, which triggers more forced selling. This feedback loop is a liquidation cascade, and it is why crashes accelerate.
During a cascade, liquidity thins out exactly when liquidations need to sell. Forced closes fill at worse prices, penalties widen, and positions that looked safe at a comfortable buffer get taken out within minutes. Correlated collateral makes it worse: if the asset you borrowed against and the asset you are exposed to fall together, your buffer evaporates on both sides at once.
How to avoid liquidation
- Keep a real buffer. Do not run at the maximum LTV or minimum margin the platform allows. Aim for a health factor comfortably above 1 — many treat 1.5 to 2 as a working floor — or margin well beyond the maintenance level.
- Use lower leverage. Cutting leverage moves your liquidation price further away and buys you time to react. Most liquidations happen to positions running 10x and higher.
- Add collateral early, not late. Topping up when your health factor is 1.05 is a race you can lose to a single candle. Do it when things are calm.
- Avoid correlated collateral. Borrowing a volatile asset against another volatile asset that moves in tandem removes your safety margin exactly when you need it.
- Watch the oracle, not just the chart. In DeFi your trigger is the oracle price, which can lag or jump on updates. Know which feed your protocol uses.
- Set alerts. Most platforms and third-party tools can warn you before the threshold, giving you a chance to act.
The honest limits
No buffer is absolute. In a fast market the price can gap straight through your liquidation level before you can add margin or close manually — there is no guarantee you get a chance to react. Oracle updates in DeFi can arrive in discrete steps, so a single update can flip a healthy position into a liquidatable one with no intermediate warning.
Platforms also differ on partial versus full liquidation. Some close only enough of your position to restore the minimum margin or health factor; others close the whole thing. Read the specific rules of the venue you use, because assuming the gentler behavior when the harsher one applies is how people lose more than they expect.
FAQ
What triggers a liquidation? Your equity or collateral falling below the required minimum. In leveraged trading that is the price reaching your liquidation price, where equity equals the maintenance margin. In DeFi lending it is your health factor reaching 1, meaning your loan-to-value has hit the liquidation threshold.
What is a health factor? A number DeFi lending protocols use to express how close you are to liquidation. It is your collateral value multiplied by its liquidation threshold, divided by your debt. Above 1 is safe; at 1 you are open to liquidation. The higher it is, the more the price can move against you before you are at risk.
Can I get liquidated while I sleep? Yes. Liquidations are automatic and run around the clock — no one asks your permission or waits for you to log in. A move overnight can cross your threshold and close you out before you wake. This is why buffers and alerts matter more than intending to watch the market.
How do I avoid liquidation? Keep a meaningful buffer above the trigger, use lower leverage, add collateral while conditions are calm rather than in a crash, avoid collateral that moves in step with your exposure, and set alerts ahead of the threshold. You cannot eliminate the risk, but you can keep the trigger far from where the price is likely to reach.
Liquidations are the enforcement side of leverage. The next thing worth understanding is where the price that triggers them comes from — read how oracles feed on-chain prices, and how a bad feed can liquidate a position that was never actually underwater.
Read also
Perpetual Futures Explained for Beginners
A perpetual future is a leveraged bet on a crypto's price with no expiry. Here is how margin, leverage, funding, and liquidation actually work — and why most retail traders lose.
Lending Protocols: Be the Bank, Get Rekt Like One
Deposit crypto, earn interest. Simple, right? Until liquidations hit and you realize you were the liquidity all along.
Funding Rates: The Hidden Cost of Perpetuals
A funding rate is a periodic payment exchanged directly between longs and shorts to keep a perpetual's price near spot. Here is how it works, why it exists, and how it quietly erodes leveraged returns.