Deficit treated as available liquidity
After a bad-debt liquidation, the reserve's deficit is removed from total debt without restoring liquidity, yet the interest-rate update still treats total supply minus total debt as available liquidity. This makes the reserve look healthier than it is, so borrowers can keep debt at an undercharged interest rate while the deficit persists.
v12 Follow with 0xCiphky, 6FigFundedTrader and 25 others
Originally disclosed on Code4rena
Submitted by v12, also found by 0xCiphky, 6FigFundedTrader, abdelhaq16, Afriauditor, bchen, botdidy, D_Auditor, Drothon, fuzious, gz627, happykilling, hezze, johnyfwesh, kb520, LTC_DJ, LTCDingZhen, maigadoh, merlinboii, PadIA, samuraii77, SOPROBRO, Steven96, Trynax, y4y, yuzengbao, Z3r0darkth1rty, and z3rco
Found by V12
contracts/kinetic-router/src/calculation.rs#L1000
update_interest_rates_and_store recalculates reserve rates through calculate_interest_rates_for_reserve, which derives utilization from total_supply and total_debt and then sets available_liquidity = total_supply - total_debt. Both liquidation flows can burn unrecoverable debt and book it separately with storage::add_reserve_deficit(...) before calling this function again, so the bad debt is removed from total_debt without any underlying liquidity being restored. Because the rate update does not subtract the stored deficit or read the aToken’s actual underlying balance, it writes artificially low current_variable_borrow_rate and current_liquidity_rate back to storage after a bad-debt event. The borrow path itself checks real aToken cash before lending, so the protocol can remain short of underlying while this function reprices the reserve as if liquidity had returned. Once a reserve carries deficit, any borrower can keep debt there at a systematically discounted rate until treasury/admins cover the hole.
Root Cause
The rate update logic assumes total_supply - total_debt is the source of truth for available liquidity. That invariant stops holding once bad debt is externalized into reserve_deficit, but calculate_interest_rates_for_reserve does not subtract the deficit or use actual underlying liquidity.
Impact
A deficit-bearing reserve is repriced as healthier than it really is, so borrowers can open or maintain debt at undercharged interest for as long as the deficit persists. That leaks yield from suppliers and the treasury, and the leakage scales with the size and lifetime of the bad-debt deficit.
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
Likely the rate calculation assumes total supply minus total debt equals available liquidity, but it never subtracts the separately stored reserve deficit or checks the actual token balance.
Impact
Borrowers can open or maintain debt at a discounted rate for as long as the deficit lasts, leaking yield from suppliers and the treasury; the text notes the borrow path still checks real cash, so the pool can remain short of underlying.
What the attacker needed
A reserve carrying bad-debt deficit; a borrower willing to keep debt there
The fix
The rate update should subtract the stored reserve deficit or read the aToken's actual underlying balance when deriving available liquidity.
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.
A lending pool earns interest based on how much of its money is lent out versus sitting idle. When a loan goes bad, the pool records a loss, but the code that sets interest rates ignores that loss and thinks the pool has more spare cash than it really does. That keeps borrowing cheap when it should be expensive, so savers and the treasury earn less.
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.