Liquidation Bots: How DeFi's Quiet Guardians Earn Their Keep
When the Market Cracks at 3 a.m.
In September 2025, DeFi watches leveraged positions worth more than $1.7 billion get liquidated inside a single 24-hour window, according to MarketMinute's reporting on the stress event. A month later, an October flash crash erases what AInvest describes as more than $19 billion in leveraged exposure across multiple chains in a matter of hours. During both events, almost no humans intervene in real time. The work of clearing positions, recovering collateral, and keeping lending protocols solvent falls almost entirely to software — to liquidation bots — running silently in the background like an army of repo men who never sleep.
These bots aren't doing charity. They are economically motivated, profit-seeking actors. But the design of DeFi lending means their pursuit of profit is exactly what keeps the system from blowing apart. Without them, a market downturn isn't just a bad day for traders — it's an extinction event for protocols.
Why DeFi Needs a Repo Man
In traditional finance, when you fall behind on a car loan, the lender hires a repo company. A driver shows up before dawn, hooks your truck to a tow rig, and hauls it to an auction lot in some industrial corner of town. The lender recovers some money, the auction house takes a cut, the repo company gets paid, and your loan is closed out. The whole apparatus exists because somebody has to physically come get the collateral.
DeFi lending works on the same principle but with no driver and no truck. As Cyfrin's audit team explains, a position becomes "liquidatable" when the value of the borrower's collateral, adjusted by the protocol's loan-to-value ratio, falls below the value of what they borrowed. At that point, anyone in the world can step in, repay the loan on behalf of the borrower, and walk off with the collateral — usually at a discount.
That discount is the liquidation bonus. According to Block3 Finance's overview, bonuses typically range from 5% to 10% of collateral value, depending on the protocol and the asset. On Aave V3, ETH and stablecoin collateral carries roughly a 5% bonus per the Aave documentation; riskier assets like YFI run as high as 15%. On Compound, the discount sits at a flat 5%, per Dragonfly Research's primer on liquidators.
This bonus is not generosity. It's the protocol bribing somebody — anybody — to do the dirty work of clearing bad positions. The same way a volunteer fire department can't show up if the firehouse pays nothing, a DeFi lender can't function if liquidation isn't profitable. The bonus is the salary. And like any salaried job, it attracts professionals.
Inside the Bot
The architectural picture, drawn from sources like Block3 Finance, 7BlockLabs, and DeFinomist, is simpler than the mythology suggests. A liquidation bot is essentially four loosely coupled modules.
The monitoring module watches every open position on every protocol it cares about. It reads collateral balances, debt balances, and price feeds, then computes each position's health factor — a single number summarizing how close that user is to insolvency. The math is straightforward, but the scale is large. On any major lending market there can be thousands of positions to watch simultaneously, all updating block by block.
The decision engine turns observation into action. Given a position whose health factor crosses the liquidation threshold, the engine calculates whether the trade is worth doing. How much profit after gas? How much slippage when I unload the collateral on a DEX? Is anybody else likely to beat me to it? If the math is green, the engine signals execute.
The execution module is where rubber meets road. The bot signs a transaction, broadcasts it, and prays. On Ethereum, that means a high-stakes priority fee bidding match against every other bot watching the same position. On Solana, the dynamics differ but the underlying tension is identical: the fastest, smartest submission wins; everyone else eats the gas cost of a failed transaction.
The logging and error-handling layer is the unsexy one nobody talks about, but it's what separates a profitable shop from a money-loser. Every failed transaction, every revert, every slippage surprise has to get recorded and analyzed. Bot operators iterate constantly on what went wrong yesterday — like a NASCAR pit crew studying tape of every blown stop.
Two specific design choices deserve a closer look.
The first is the oracle dependency. Liquidation eligibility hinges entirely on a price number. If that number is wrong, slow, or manipulable, the entire protocol is at risk. Price feeds provide the inputs the bot has to trust. Cyfrin's auditors recommend cross-verifying from at least two independent sources, but in practice, most protocols hardcode a single oracle and accept the systemic risk. As Cyfrin's writeup puts it, "if the liquidation engine is the heart of a DeFi lending protocol, then price oracles are its eyes — without accurate and timely price data, the entire system is blind."
The second is flash loan integration. Per Dragonfly Research, dYdX historically offers native flash borrowing, which means a liquidator can borrow the repayment capital, execute the liquidation, swap the collateral for profit, and repay the loan all inside a single atomic transaction. This collapses the bot's capital requirement nearly to zero. You don't need to be rich to be a liquidator on those venues; you need to be fast and correct.
The Solana Race
Liquidation economics on Solana in 2025 and 2026 look very different from the Ethereum world Dragonfly described back in 2019. The competitive ecosystem is denser, the protocols are more aggressive, and the penalties charged to borrowers have collapsed.
Per RedStone's 2025 Solana lending report, Solana's lending markets hold $3.6 billion in TVL as of December 2025, up 33% year-over-year from $2.7 billion the prior December. The same report notes that Kamino Finance holds roughly $3.5 billion of that — by AInvest's tally, around 75% of the total Solana lending market. That's a level of concentration that has every analyst nervous and every competitor circling.
Into that landscape walks Jupiter Lend, which launches in August 2025 and reaches $500 million in TVL inside its first 24 hours, per the RedStone report. By October 2025, it crosses $1.65 billion. Jupiter Lend's pitch isn't a marginal improvement on Kamino — it's a structural attack on the liquidation engine itself. Its product description references a "bespoke liquidation engine that processes all positions in a single transaction, dramatically reducing bad debt risk," paired with LTV ratios up to 95% and a liquidation penalty as low as 0.1%.
Kamino does not take it sitting down. On September 1, 2025, the protocol announces — per MEXC's reporting — that it is cutting its main-market liquidation penalty from 1% to 0.1%, a 90% reduction. It also cuts the liquidation increment from 20% to 10%, meaning each liquidation event is smaller and more surgical. MEXC links this directly to competitive pressure from Jupiter Lend's rapid growth.
The outcome for users is good. Smaller penalties, faster clearing, and protocols compete aggressively on borrower-friendly terms. The outcome for liquidation bots is harsher. When the bounty per liquidation drops by an order of magnitude, the only operators who survive are those with the lowest cost of capital, the fastest infrastructure, and the cleanest execution. This is the Walmart effect arriving in lending: relentless price compression, with the cost ultimately paid by suppliers — in this case, the bot shops that used to make a comfortable margin off bigger spreads.
Kamino's reliability data backs up the story. Per RedStone, in November 2025 alone, Kamino processes roughly $26.5 million in collateral across more than sixteen thousand liquidation events with zero bad debt. Across eighteen audits since inception, the protocol has not booked a single dollar of bad debt. That track record is not luck; it's the cumulative output of thousands of liquidator bots competing to be the fastest hand on the trigger.
The Engine Redesign at Aave
While Solana protocols compete on penalty rates, Aave goes a different direction with V4. Per Aave's own V4 blog post, the protocol replaces its fixed-bonus model with a Dutch-auction-style variable bonus. The math now depends on how far underwater a position has drifted. A position just below the liquidation threshold pays a small bonus; a position deep into insolvency pays a larger one.
Three governance parameters control the curve: maxLiquidationBonus, which caps the upside; healthFactorForMaxBonus, which pins where the maximum bonus kicks in; and liquidationBonusFactor, which sets the floor at the liquidation threshold. The system is essentially price discovery applied to the bonus itself — let the auction figure out what each rescue is worth.
The design solves a real problem. Under V3, all liquidatable positions pay the same bonus, regardless of severity. A position 0.001 below threshold pays the same as a position deeply underwater. That creates weird competitive dynamics — bots race to liquidate marginal positions for guaranteed profits and ignore deeply distressed ones if the swap-out path looks risky. V4's curve incentivizes liquidators to keep coming back even as conditions deteriorate, because the bonus keeps climbing.
V4 also addresses dust. Per the Aave V4 blog, if a position's remaining debt or collateral falls below a DUST_LIQUIDATION_THRESHOLD (the example given is around $1,000), liquidators can clear the entire position rather than leaving an uneconomic scrap behind. Dust accumulation has been one of DeFi lending's quiet bleed sources for years — small positions that aren't worth anyone's gas to clean up, sitting around accruing interest the protocol can't collect. Like loose change in your car's cup holder, individually trivial and collectively non-zero.
Per Aave's blog, the protocol has processed approximately 295,000 liquidations totaling more than $3.3 billion since launch. That's the scale at which engine design choices stop being academic and start being load-bearing.
The Cascade Problem
The same bots that protect each individual protocol collectively amplify a market-wide downturn. This is the dark side of the design.
The mechanic is straightforward. An asset price drops, dragging positions below their health threshold. Liquidation bots execute, selling the collateral on DEXes. The selling pressure drops the asset's price further. More positions cross the threshold. More liquidations fire. The spiral continues until either the asset finds a buyer at a new lower level, or until protocol insurance funds and emergency mechanisms intervene.
The September 2025 event referenced earlier is a textbook example. The October flash crash, per AInvest's reporting, wipes more than $19 billion in leveraged exposure across multiple chains. AInvest also documents Stream Finance's roughly $93 million collapse, in which the xUSD stablecoin depegs by about 77% and a related stablecoin USDX falls from $1 to as low as $0.09 in a cascade scenario. Leveraged positions running 20× to 50× on certain platforms compound the carnage.
DeFi's defenders argue that the cascade is the system functioning, not failing — it's the protocol clearing risk before it becomes existential. That's true at the level of any individual protocol. But across protocols, cascades produce externalities. Bots competing to liquidate the same asset on multiple lending markets simultaneously can crash that asset's market price faster than any single protocol's risk model anticipates. Cross-protocol collateral interdependence — using the same asset as collateral on multiple platforms — turns a localized stress event into a market-wide spiral.
The fix, in theory, is better insurance fund design, more conservative LTV ratios, and circuit breakers that pause liquidations during extreme volatility. The fix, in practice, is whatever protocols can implement without losing user TVL to competitors who don't impose those frictions. So far, the protocols winning the race are the ones with the most aggressive liquidation engines and the lowest penalties, not the most conservative risk management. The market is pricing speed and capital efficiency higher than caution.
What the Failure Modes Look Like
Liquidation isn't a monolithic system, and Cyfrin's audit team documents a surprising variety of ways it breaks. Small positions accumulate when liquidators don't bother — the gas cost exceeds the bounty. Sophisticated borrowers withdraw collateral incrementally in ways that keep their position technically solvent on every block but leave little margin if prices move. Bad debt creeps in when collateral becomes less valuable than the cost of acquiring the repayment token.
Then there are the operational failures. Denial-of-service attacks where a borrower creates dozens of tiny sub-positions, each one too expensive to liquidate individually. Front-running tricks where nonce manipulation or pending actions block legitimate liquidation calls. Decimal precision errors between collateral tokens of differing decimal counts, producing incorrect reward calculations.
The list of historical incidents is colorful. Liquidations blocked by ERC721 callback reverts on collateral tokens. USDC deny-list addresses preventing payout to a liquidator. Insurance funds depleted before all bad debt is cleared, leaving the protocol to socialize the loss. Interest accrual during a protocol pause triggering cascade liquidations the moment the pause lifts.
What ties these together is that the liquidation engine is the protocol's last line of defense — and simultaneously its biggest attack surface. Every edge case the design team didn't think of becomes a permanent footnote in someone's incident report.
The MEV Connection
On Solana especially, liquidation overlaps heavily with MEV (Maximal Extractable Value). Liquidations are predictable on-chain events with bounded payoffs, which makes them perfect targets for MEV-style competition. The Jito ecosystem on Solana introduces an additional channel for landing transactions where the competitive dynamic depends on tip-priority competition rather than raw fee size. That means even a bot with marginal computational edge can sometimes still win if its tip strategy is more efficient.
The infrastructure layer required to compete at this level is non-trivial. Operators need dedicated low-latency RPC access, the ability to subscribe to slot-level updates, custom indexing of on-chain state, and in some cases physical co-location with validators. The capex floor for a competitive liquidation bot on Solana in 2026 is meaningfully higher than it was on Ethereum in 2019. The hobbyist with a Python script and a cheap VPS isn't competing anymore — not on the major venues, anyway.
This pushes the activity toward specialized shops. A few firms manage liquidation flows at industrial scale — Gauntlet, for example, reports managing $140 million across model-tested strategies and approximately $1.5 billion in total DeFi vault management. The activity is professionalizing the same way market making professionalized: starting as a side hustle for a clever engineer with a laptop, ending as an institutional discipline with dedicated infrastructure and full-time risk teams.
MarginFi and the Cost of Stress
Not every Solana lending story is a winning story. Per smartymetrics' analysis, MarginFi's TVL falls from roughly $385.89 million in Q4 2024 to about $163.78 million in March 2025. The protocol's liquidation revenue across Q1 2025 — approximately $88.5 million per the same analysis — actually hints at how active its liquidation engine remains during the stress period.
MarginFi's design is instructive. It uses partial liquidations rather than wiping accounts entirely, and its 5% penalty splits as 2.5% to the protocol's insurance fund and 2.5% to the liquidator, per its official documentation. The split is itself a statement about whose role matters: half the bonus to the keeper who did the work, half to the buffer that absorbs whatever the keeper couldn't.
The lesson is that liquidation engines do their job even when the protocol around them is struggling. MarginFi loses more than half its TVL in a quarter, but its liquidation flows keep clearing positions and feeding its insurance fund. The engine is structurally independent of user enthusiasm — it works whether the protocol is winning or losing market share.
What This Means for the Coming Period
The direction of travel is clear enough to predict in broad strokes. First, liquidation penalties keep falling on competitive lending markets. The race that starts with Jupiter Lend's 0.1% and pulls Kamino to match isn't going to reverse. New entrants lead with even tighter terms, and incumbents follow or shrink.
Second, engine design keeps consolidating around single-transaction execution, dynamic bonuses, and dust-aware logic. The Aave V4 model and the Jupiter Lend single-transaction model are both responses to inefficiencies in the older fixed-bonus design. Other protocols copy what works, the same way every fast-food chain eventually ends up with a drive-through window.
Third, the operator concentration intensifies. As margins compress, only operators with substantial infrastructure investment can compete. That has the dual effect of professionalizing the activity and shrinking the pool of independent actors capable of providing the safety-valve function. If three firms handle the lion's share of liquidations on a major chain, that's not decentralization — it's a different kind of centralization, one protocols have to design around.
Fourth, systemic cascade events stay a present risk. The September and October 2025 events demonstrate that even mature protocols with strong individual liquidation engines remain exposed to cross-protocol contagion. Coordinated circuit breakers across protocols would help, but they require either governance coordination DeFi has historically lacked or a market-wide event severe enough to force the issue.
For borrowers, the picture is mostly positive: lower penalties, faster clearing, more sophisticated risk management. For protocols, the picture is competitive: differentiate on liquidation experience or lose TVL. For liquidation bot operators, the picture is brutal: scale up or get out. The quiet guardians keep doing the work — they just do it for thinner margins and from more concentrated shops.
Key Takeaways
- Liquidation bots are profit-seeking guardians. The protocol bonus (typically 5–10%, falling toward 0.1% on competitive Solana markets) is what aligns operator incentives with system safety. Per Dragonfly Research, cumulative liquidator profits across early DeFi protocols exceeded $5 million.
- Solana's lending market is a price war. Kamino's 90% penalty cut (1% → 0.1%) per MEXC News and Jupiter Lend's growth to $1.65 billion TVL by October 2025 per RedStone signal a structural shift toward borrower-friendly terms.
- Aave V4 introduces variable, Dutch-auction-style bonuses that scale with health-factor severity, per Aave's V4 blog. The design aims to keep liquidators engaged across all severities of distress.
- Cascading liquidations remain the system's biggest vulnerability. The September 2025 stress event (more than $1.7B in 24 hours, per MarketMinute) and the October 2025 flash crash (more than $19B per AInvest) show that even healthy protocols are exposed to cross-market contagion.
- The hobbyist liquidator era winds down. Infrastructure costs and competitive pressure consolidate the activity into a small number of professional operators, with consequences for both protocol design and DeFi's decentralization story.
Disclaimer
This article is for informational and educational purposes only and does not constitute financial, investment, legal, or professional advice. Content is produced independently and supported by advertising revenue. While we strive for accuracy, this article may contain unintentional errors or outdated information. Readers should independently verify all facts and data before making decisions. Company names and trademarks are referenced for analysis purposes under fair use principles. Always consult qualified professionals before making financial or legal decisions.