Attacker can create small positions that will not have any incentive to liquidate
The protocol allows a borrower to open a position with collateral equal to the borrowed amount, or to reduce an existing debt to a tiny amount such as one wei through partial repayment. Such dust positions offer no reward to liquidators, so they may never be closed and could accrue bad debt for the protocol.
Allen_George08 Follow with Kvar, anchabadze and 8 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-05-lend-audit-contest-judging/issues/592
Found by
Allen_George08, Kvar, anchabadze, devAnas, dimah7, durov, kenzo123, one618xyz, onthehunt, rudhra1749, sheep
Summary
Partial repayment allows an attacker to reduce his debt positions or create small debt positions (since collateral >= borrow amount) that will have no incentive to be liquidated which can lead the protocol to accrue bad debt.
Root Cause
When initially opening a position collateral can be equal to borrow amount:
function borrow(uint256 _amount, address _token) external {
require(_amount != 0, "Zero borrow amount");
address _lToken = lendStorage.underlyingTolToken(_token);
LTokenInterface(_lToken).accrueInterest();
(uint256 borrowed, uint256 collateral) =
lendStorage.getHypotheticalAccountLiquidityCollateral(msg.sender, LToken(payable(_lToken)), 0, _amount);
LendStorage.BorrowMarketState memory currentBorrow = lendStorage.getBorrowBalance(msg.sender, _lToken);
uint256 borrowAmount = currentBorrow.borrowIndex != 0
? ((borrowed * LTokenInterface(_lToken).borrowIndex()) / currentBorrow.borrowIndex)
: 0;
@> require(collateral >= borrowAmount, "Insufficient collateral");
Or when repaying borrower can use partial repayment to reduce his debt to tiny amounts such as 1 wei, which will not any incentive for liqudators to close them, since liquidator must receive rewards higher than the gas fees, which may not be fraction amounts since there will be a deployment on ETH mainnet also.
Internal Pre-conditions
- Borrower must borrow small amounts such as 1 wei.
- Or reduce his debt positions to 1 wei.
External Pre-conditions
None
Attack Path
None
Impact
Such positions will accrue the protocol bad debt, which can lead to insolvency.
PoC
No response
Mitigation
Enforce a minimum borrow amount or don't allow borrowers to leave small amount when repaying on their debt.
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 borrow and repay functions do not enforce a minimum position size, allowing collateral to equal the borrow amount and debt to be reduced to dust.
Impact
Dust positions may never be liquidated, which could cause the protocol to accrue bad debt and potentially become insolvent.
What the attacker needed
Borrow a tiny amount such as 1 wei; or repay down to a tiny residual debt
The fix
The protocol should enforce a minimum borrow amount or prevent borrowers from leaving a tiny residual debt when repaying.
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 puts up collateral and takes a loan. If the loan becomes risky, a liquidator steps in to close it and earns a reward. This report says a borrower can make the loan so tiny that the reward is less than the cost of the transaction, so nobody bothers to liquidate it and the protocol is left holding the loss.
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.