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

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.
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.
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.
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.
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.
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:
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.
Most liquidations are avoidable. A handful of habits do nearly all the work.
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.
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.