Worsening liquidations create bad debt
The liquidation function checks that a borrower is unhealthy before seizing collateral and burning debt, but never verifies that the borrower's health factor improves afterwards. A liquidator can repeatedly liquidate borderline positions, taking bonus collateral while making the position less solvent, until the protocol absorbs the remaining debt as a reserve deficit.
v12 Follow with 0xastronatey, 0xbereket and 22 others
Originally disclosed on Code4rena
Submitted by v12, also found by 0xastronatey, 0xbereket, aestheticbhai, aman, ArsenBai, ClaudioGoose, constantquadruped, Dex_ter, dhaxor, Felh, Haerincode, LeoGold, Nyx, oieusouogoku, qed, RevolXX, sentient, SOPROBRO, Spottedhyena0, taronsung, TheWeb3Mechanic, twicek, y4y, and zubyoz
Found by V12
contracts/kinetic-router/src/liquidation.rs#L124
internal_liquidation_call checks that the borrower is unhealthy before liquidation and enforces close factor, but it never recomputes or compares the borrower’s post-liquidation health factor after collateral is seized and debt is burned. The repo’s own liquidation comments/tests distinguish a safe partial-liquidation zone above LT * (1 + bonus); with the common 8500 liquidation threshold and 500 bonus, that bound is 0.8925, while the 50% close-factor zone still extends down to 0.5. For borrowers in that reachable band, a 50% liquidation removes collateral faster than debt and makes the health factor worse, yet this function still accepts the trade because its only post-state checks are leftover-value and bitmap updates. Once collateral is exhausted, the same function explicitly burns the remaining debt and books it as reserve_deficit. A liquidator can therefore keep taking bonus collateral from a position that is getting less solvent after each step until the protocol is forced to absorb the residual bad debt.
Root Cause
The function validates only the pre-liquidation state and never enforces the direct-liquidation invariant that the borrower’s post-liquidation position must be safer. validate_close_factor limits size, but nothing proves that the chosen liquidation actually improves solvency before the function finalizes state and, if needed, socializes the remainder as deficit.
Impact
An attacker can repeatedly liquidate borderline unhealthy positions that should be rejected under the documented ‘HF must improve’ invariant, harvesting liquidation bonuses while driving the borrower deeper underwater. That accelerates collateral exhaustion and can end in the reserve_deficit path, shifting unrecovered debt onto the protocol.
Proof of Concept
See this gist for full Proof of Concept
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The function validates only the pre-liquidation state and never enforces that the borrower’s post-liquidation position must be safer.
Impact
An attacker could repeatedly liquidate borderline unhealthy positions, harvesting liquidation bonuses while driving the borrower deeper underwater, which can end in the reserve_deficit path and shift unrecovered debt onto the protocol.
What the attacker needed
Borrower in the reachable unhealthy band; liquidator can call liquidation repeatedly
The fix
The liquidation function should recompute the borrower’s health factor after the trade and reject any liquidation that does not improve it.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In a lending protocol, a borrower is 'unhealthy' when their collateral is worth too little compared with their debt. A liquidator can then repay part of the debt and take some collateral plus a bonus. This report says the code never checks that the borrower is actually healthier after that step, so a liquidator can keep taking bonus collateral from a position that is getting worse, until the protocol is left with unpaid debt.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.