Guides
Aug 2, 2026

DeFi Liquidations Explained: How They Work and How to Avoid Them

How DeFi liquidations actually work: health factors, oracles, liquidation penalties, and the practical habits that keep a leveraged position from being closed out.

DeFi Liquidations Explained: How They Work and How to Avoid Them

Liquidation is the mechanism that keeps decentralized lending solvent, and it is the single most common way people lose money in DeFi without being hacked or scammed. If you borrow against crypto collateral — whether that is a straightforward loan, a leveraged farm, or an NFT-backed position — understanding exactly when and how you get liquidated is not optional knowledge.

This guide covers what triggers a liquidation, what it costs you, why it sometimes happens at prices you never saw on an exchange, and the practical habits that keep positions out of danger.

Why liquidations exist at all

A DeFi loan has no credit check and no legal recourse. If your collateral becomes worth less than your debt and you simply walk away, the lender — which is to say, other depositors — eats the loss. The protocol would become insolvent.

Liquidation is the defence. The protocol continuously checks whether each borrower's collateral still covers their debt with an adequate margin. When it does not, anyone can step in, repay part of the debt, and take collateral at a discount as compensation. The position is forcibly reduced before it can go underwater.

It is worth internalising that this is a feature, not a punishment. Without it, lending pools could not offer competitive rates, because they would be pricing in the possibility of unrecoverable defaults.

The health factor

Almost every lending protocol expresses your safety as a single number, usually called the health factor or health ratio. The naming varies; the logic does not.

The calculation is roughly:

Health factor = (collateral value × liquidation threshold) ÷ debt value

Above 1, you are safe. At or below 1, you are liquidatable. The liquidation threshold is a per-asset percentage set by the protocol — it reflects how much of that collateral's value the protocol is willing to lend against, given how volatile and how liquid the asset is. A blue-chip stablecoin might carry a threshold near 90%. A thin-liquidity altcoin might sit at 50% or lower.

This is distinct from the loan-to-value ratio you get at origination, which is generally set more conservatively. The gap between your opening LTV and the liquidation threshold is your buffer. If you can borrow at 65% LTV and get liquidated at 80%, you have roughly a 19% collateral price drop before trouble — not 35%, which is the mistake people make when reading these numbers. Our guide to crypto loan LTV covers that distinction in more detail.

Oracles: why the price that matters is not the price you see

A protocol cannot look up your collateral's price on a chart. It reads an oracle — an on-chain price feed, typically aggregating multiple sources and publishing updates at intervals or when the price moves past a threshold.

This has two consequences that catch borrowers out.

First, the oracle price can lag or lead the market. During fast moves, the feed may update to a price that existed for only seconds on the venues it samples. Your position is evaluated against that number, not against where the asset settled a minute later.

Second, oracle design is itself a risk. Feeds that draw from thin liquidity can be pushed around, and the history of DeFi includes several large exploits where the vulnerability was not the lending logic but the price input to it. When you evaluate a lending market, the oracle is part of what you are trusting. Protocols using well-established feeds — Pyth, for instance, which JewelSwap uses for its Sui money markets alongside other sources — are making a deliberate and meaningful choice there.

What a liquidation actually costs

When your health factor breaks, a liquidator repays some or all of your debt and receives your collateral at a discount. That discount — the liquidation penalty or bonus, commonly 5% to 15% — is the liquidator's incentive, and it comes out of your position.

Some protocols allow full liquidation; many cap it, closing only enough of the position to restore a safe health factor. Partial liquidation is meaningfully better for the borrower, since it leaves the rest of the position intact.

The real cost is usually larger than the penalty alone. You are forcibly selling at a local low, you pay the penalty on top, and you lose the position at exactly the moment you would most want to keep it. A 10% penalty on a leveraged position can represent a much larger percentage of your actual equity.

Leverage changes the maths sharply

This is where most liquidations actually happen, and the arithmetic is not intuitive.

In a leveraged farming position, you supply collateral, borrow against it, and deploy the borrowed funds. Each additional turn of leverage compresses the price move required to liquidate you. A position at 2x might tolerate a 25% drawdown; the same position at 5x might tolerate under 10%.

Two further effects compound this:

  • Borrow rates are variable. Utilization spikes push borrowing costs up, often precisely when markets are stressed. A position that was profitable at 4% borrow cost may bleed at 30%.
  • Correlated collateral is not diversification. Borrowing against one altcoin to farm another that moves with it means both legs fall together. The position is far more concentrated than it appears.

Liquid staking tokens deserve a specific caution. LST loops look safe because the collateral tracks the borrowed asset closely — until a peg wobbles. The moment an LST trades below its underlying is both when the loop is most at risk and when it is hardest to unwind.

How to avoid being liquidated

Most liquidations are avoidable. A handful of habits do nearly all the work.

  • Size the buffer to the asset's volatility, not to a rule of thumb. A stablecoin pair can run close to its threshold. A volatile token needs room for a move that would look extreme on a chart, because those moves happen.
  • Know your liquidation price as a number, before you open. Not "I have a healthy ratio" but "I get liquidated at $1.87." If you cannot state it, you do not understand the position.
  • Set alerts well above the threshold. Being notified at a health factor of 1.05 is nearly useless — by then you may not have time to react. Alert at 1.4 and again at 1.2.
  • Keep repayment capital ready. Collateral you would need to sell in a panic is not a buffer. Idle stablecoins you can deploy immediately are.
  • Watch the debt side, not only the collateral. Accruing interest raises your debt over time, so a position left untouched slowly drifts toward liquidation even if the collateral price never moves.
  • Deleverage into strength, not weakness. The best time to reduce a position is while it is comfortable. Waiting until it is uncomfortable means unwinding into worse liquidity.
  • Prefer protocols that liquidate partially and that publish their thresholds, penalties, and oracle sources clearly.

Automated position management

The alternative to watching a health factor yourself is using a product that watches it for you. Automated strategies can monitor positions continuously against on-chain price feeds and unwind before the liquidation threshold is reached — taking a small, controlled loss instead of a liquidation penalty.

JewelSwap's leveraged farming and money market products work this way across MultiversX, Sui, and Radix: health ratios are monitored on a schedule, and positions are reduced automatically as they approach danger rather than left to the borrower's attention span.

This does not eliminate the risk. Automation can fail, oracles can move faster than any monitoring interval, and a gap move can jump straight through the safety margin. But for most borrowers, a system that checks every few minutes is a substantial improvement on one that checks whenever they happen to open the app.

The short version

Liquidation happens when your collateral, valued at an oracle price, no longer covers your debt with the required margin. It costs you a penalty of typically 5–15% on top of forced selling at a bad moment. Leverage compresses the price move needed to trigger it, and correlated collateral compresses it further. The defences are unglamorous and effective: know your liquidation price before you open, keep a buffer sized to real volatility, hold repayment capital you can actually deploy, and reduce exposure while it is still comfortable to do so.

About the author.

Co-Founder at JewelSwap & CMO at iDenfy. Viktor brings his successful track record of superb development & project management.