All articles
Web3 FoundationsJuly 14, 202612 min read

DeFi Liquidations Explained: Health Factors, Bounty Bots, and Cascades

How DeFi liquidations actually work: the health factor on every loan, the bounty that makes strangers close failing positions in seconds, and why one red hour of forced selling feeds on itself.

By Carlos (Bloqarl)

TL;DR

  • A DeFi liquidation is a margin call with no phone call. When your collateral no longer safely covers your debt, the protocol lets a stranger close your loan immediately, without asking you.
  • Every loan carries a health factor: what the collateral is worth right now, measured against what the loan requires it to cover. Above the line, the loan is nobody's business. Below it, the loan becomes seizable.
  • Nobody at Aave or any other lending protocol closes failing loans. Strangers running bots do it, racing each other for a bounty the protocol posts on every failing position.
  • Who is paying? The borrower. The bounty comes out of their collateral, at a discount, on the worst day of their month.
  • Liquidation cascades are not the machine breaking. They are the machine working under stress: forced selling pushes the price down, which trips the next tier of loans.

What is a liquidation in DeFi?

A DeFi liquidation is the forced closing of a loan whose collateral no longer safely covers its debt: the protocol lets anyone repay that debt and take the borrower's collateral at a discount, instantly and with no warning.

In traditional finance, this moment has a human in it. Your broker calls you: your position is underwater, add funds by noon or we close it. A phone call, a deadline, maybe a negotiation.

DeFi lending has no phone. A protocol like Aave is a set of smart contracts. It knows no phone number, employs no loan officers, and cannot wait for noon. When your loan crosses the line at 3am, the machine does not wake you up. It marks your loan as seizable and lets the rest of the world act on it. By breakfast, the loan is closed, the collateral has a new owner, and there is nobody to argue with.

That sounds harsh, and it is. It is also the reason DeFi lending works at all. This article walks through the whole machine: the ratio watching every loan, the bounty that makes strangers do the closing, and what happens when a falling market pushes thousands of loans over the line in one hour.

Why do DeFi loans need liquidations at all?

Start with who is exposed. In how DeFi lending works, we described a lending protocol as a pawnshop: you lock volatile collateral, you borrow against it, and the collateral must always be worth more than the debt. The lenders on the other side of that pawnshop are protected by exactly one thing: the collateral cushion.

Now let the collateral fall. The debt does not shrink when ETH drops. Only the cushion does. If nobody closes the loan before the collateral is worth less than the debt, the loss lands on the lenders, and a lending market whose lenders eat losses does not stay one for long.

So someone must close failing loans, quickly, every time, at any hour. The question the whole design turns on: who is on duty?

What is a health factor, exactly?

Function first, name second. Every loan on the books is a ratio: what the collateral is worth right now, against what the loan requires it to cover. While that ratio sits above one, the loan is nobody's business. The moment it slips below the line, the loan becomes seizable.

The name protocols give this ratio is the health factor. It is worth being precise about what it is not. It is not a credit score. No human reads it, no committee reviews it, and it carries no memory of how responsible you have been. It is recomputed every time the price moves, on every loan in the market, all night, forever.

Picture one loan card. You posted ETH worth 100 and borrowed 70 USDC. The ratio is comfortable, with wide margin above the line. Then ETH slides and your collateral is worth 82. You did nothing. The debt held still at 70, the collateral thinned, and the health factor sank toward the line on its own.

Three things can move a health factor, and only two of them are yours:

  1. The market moves the collateral price. This is the only lever that acts on its own, and it works while you sleep. It never announces which way it will pull.
  2. You repay part of the debt. The bottom of the ratio gets lighter, so the same collateral covers it with room to spare. This is the classic rescue: send stablecoins, shrink the loan, walk the card away from the line.
  3. You add more collateral. The top of the ratio grows while the debt stays put. Same loan, thicker cushion.

A borrower holds two levers. The market holds the third. Everything that follows in this article comes from that imbalance.

Who actually liquidates a failing loan at 3am?

Suppose your loan crosses the line in the middle of the night. Who closes it?

Not Aave employees working shifts; there are no employees inside the machine, because a protocol is code, not a company desk. And not you, the borrower, forced to act. The borrower is exactly who cannot be relied on: asleep, out of funds, or gone. A machine that waits for the borrower dies with the borrower.

The answer is stranger and more elegant: anyone. The protocol posts a standing offer on every failing loan, and whoever gets there first may take it.

Here is the offer. Anyone may repay the failing loan's debt and take collateral worth more than they paid. The documentation calls that gap a liquidation bonus; plain English calls it a bounty. That bounty is why liquidation bots exist: programs that watch every loan in the market all night, recompute health factors on every price tick, and race to be first the instant a loan becomes seizable. It is also why failing loans close in seconds rather than hours.

The design does not ask anyone to care about the protocol. It makes closing bad loans profitable and lets self-interest do the guarding.

Who pays the liquidation bounty?

This is the question this whole series keeps asking, because every yield and every fee in DeFi is paid by someone specific, and you should always be able to name them.

Here the answer is blunt: the borrower pays. The discounted collateral the liquidator takes comes out of the borrower's side of the loan, on the worst day of their month. The market already moved against them, and the bounty is subtracted from what remains of their collateral on top of that.

Be precise about what the bounty is and is not. It is not a fine or a punishment. It is a wage: the pay of an all-night guard the protocol never has to hire. The rules were public before the borrower ever opened the loan: below the line, seizable, discount to whoever closes it. Everyone who borrows against volatile collateral signs up for exactly that trade.

Are liquidation bots parasites or infrastructure?

It is easy to hate the stranger who took your collateral at 3am. Be honest about the roles anyway.

Fast liquidation is what makes the pool's lenders whole. Every closed loan is a loss that did not land on depositors, and lenders who trust the machine accept lower rates, which makes borrowing cheaper for everyone. A lending market that hesitates to close bad loans bleeds its lenders and dies.

So the bounty hunter is infrastructure wearing a villain's face. Nothing noble, nothing sinister: a role the machine needs filled, filled by whoever races fastest. The same stranger is the borrower's worst morning and the reason the lending desk was open at all. If the bots disappeared tomorrow, the first casualty would not be borrowers. It would be the lenders, and then the whole market.

What is a liquidation cascade?

Now run the machine under stress, because this is where liquidations stop being one borrower's bad night and become everyone's red hour.

A hard price drop pushes a whole tier of loans below the line at once. Not one card, thousands, because thousands of borrowers held the same collateral with similar margins. Bounty hunters close them, loan by loan, exactly as designed. But closing a loan means selling the seized collateral to lock in the bounty, and under stress that means heavy selling into a market already falling.

That selling pushes the price lower, which trips the next tier of loans, the ones whose margins were slightly thicker. Those get closed and sold too. The loop feeds itself, tier by tier, until the thin loans run out:

  1. Price falls.
  2. Loans cross the line, thinnest margins first, and they cross together.
  3. Bounties get claimed, bot by bot, each closure protecting a lender.
  4. Seized collateral gets sold into a falling market.
  5. The price falls further, and the loop returns to step two.

Two things get mangled in retellings of cascades, so say them plainly.

First, no villain is required. Cascades are routinely narrated as whales conspiring to trigger liquidations, but the loop above runs on ordinary selling. Crowds and thin margins produce cascades without anyone conspiring.

Second, a cascade is not the machine malfunctioning. Every loan closed exactly at its published line, and every closure made a lender whole. Painful and working are not opposites. The real systemic lesson of any red hour is about the crowd, not the code: thousands of borrowers keeping thin margins against the same collateral, so one drop reached them all together. That is a lesson about positioning, not a bug to patch.

What happens if the price recovers after you get liquidated?

Here is the scenario that stings the most, and the one every borrower should sit with before opening a loan.

During the red hour, your loan crossed the line. A bot repaid your debt and took discounted collateral as its bounty. By breakfast, the price has bounced back above your line. You were right about the market. What is your position?

Closed. Permanently. There is nothing to reopen: the seizure was a completed sale, the bounty is spent, and the collateral has a new owner. The health factor only matters while a loan is alive. The protocol does not owe you the difference either. Necessary is judged at 3am, not at breakfast, and a machine that waited to find out whether prices would bounce would bleed its lenders while it waited.

One mercy survives the night: the debt died when the collateral was seized. The machine takes enough to close the loan plus the bounty, not everything you have. Whatever collateral remains is still yours, and you do not wake up still owing the 70.

If this finality sounds familiar, it should. It is the same lesson leveraged traders learn on centralized exchanges, covered in crypto leverage explained: liquidation is final, and being right by breakfast pays nothing. The DeFi difference is that the machinery is public: you can read the exact line, bounty, and rules before you borrow a cent.

How do you avoid being liquidated?

Borrowers who last in DeFi live like pilots. The health factor is the altimeter, and nobody flies at the treetops twice.

Concretely, three habits. Keep real margin above the line, sized for your collateral's volatility rather than for the calmest week you can remember; the loans that cross first in every cascade kept the thinnest cushion. Set alerts on your health factor so the market cannot move for hours without you knowing. And know your two levers in advance: stablecoins ready to repay, or collateral ready to add, so a bad night is a maintenance task instead of an ending.

If you want to feel this machine instead of just reading about it, the liquidations checkpoint of Your First 90 Days in DeFi, our free interactive course, puts a loan card in front of you and lets you pull each lever and trace the cascade loop yourself. The first three checkpoints need no account.

Related questions

Does a liquidation take all of your collateral? No. The liquidator repays your debt and takes collateral equal to that debt plus the bounty. Anything left over after debt and bounty remains yours. You lose the cushion and the discount, not necessarily everything.

Can a DeFi liquidation be reversed or appealed? No. The seizure is a completed transaction under rules published before you borrowed. There is no support desk, no appeal, and no mechanism to reopen a closed loan, even if the price recovers minutes later.

What is a good health factor? There is no universal number, but the principle is universal: your health factor must survive a hard move in your collateral without crossing one. The thinnest loans always cross the line first, and together.

Who receives the liquidation penalty? The liquidator: whoever repays the failing debt first. The protocol posts the discount as an open bounty, bots race for it, and the winner keeps the difference between the collateral taken and the debt repaid. The borrower funds it from their collateral.

Do liquidations happen outside DeFi too? Yes. Centralized exchanges and traditional brokers liquidate leveraged positions constantly. The DeFi difference is that the process runs on open code and open competition instead of behind a venue's closed doors: anyone can read the rules, and anyone can play the liquidator.

Are liquidation cascades a flaw in DeFi lending? No. Each liquidation in a cascade does its one job: protecting lenders at a published line. The cascade's force comes from crowded leverage on correlated collateral, not from a defect in the mechanism. The fix, to the extent there is one, lives in borrower positioning, not in the code.

Where to go next

Liquidations are the machine that keeps DeFi lending solvent: a ratio on every loan, a bounty on every failure, strangers racing to collect. Understand it and you understand why lenders can trust a pool run by nobody, and why borrowers must respect a line that never negotiates.

But notice what every loan card here quietly assumed: a dollar that stays a dollar. The debt was 70 USDC, and we never asked what holds USDC at one dollar overnight. That is its own machine, with four competing designs and one famous failure, covered in the four types of stablecoins.

To walk the whole lending machine in order, from how the pawnshop takes deposits to the liquidation bots that guard it, start Your First 90 Days in DeFi below. It is free, and the first three checkpoints need no account.

Tagged

DeFiLendingLiquidations