A malicious user can potentially escape liquidation by creating a dust amount position and trigger the liquidation by themself
A liquidated position can be reused for depositing and borrowing, but if a liquidation auction is already ongoing, triggering a new liquidation fails until the old auction is settled. An attacker can create a tiny position, trigger its liquidation, and then borrow a larger amount, hoping liquidators ignore the dust auction and thus fail to liquidate the real loan.
Submitted by WatchPug, also found by jonah1005
In the current implementation, a liquidated position can be used for depositing and borrowing again.
However, if there is a liquidation auction ongoing, even if the position is now liquidatable, the call of triggerLiquidation() will still fail.
The liquidator must settleLiquidation first.
If the current auction is not profitable for the liquidator, say the value of the collateral can not even cover the gas cost, the liquidator may be tricked and not liquidate the new loan at all.
Considering if the liquidator bot is not as small to handle this situation (take the profit of the new liquidation and the gas cost loss of the current auction into consideration), a malicious user can create a dust amount position trigger the liquidation by themself.
Since the collateral of this position is so small that it can not even cover the gas cost, liquidators will most certainly ignore this auction.
The malicious user will then deposit borrow the actual loan.
When this loan becomes liquidatable, liquidators may:
- confuse the current dust auction with the
liquidatableposition; - unable to proceed with such a complex liquidation.
As a result, the malicious user can potentially escape liquidation.
Recommendation
Consider making liquidated positions unable to be used (for depositing and borrowing) again.
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 contract allows a position that is already in liquidation to be used again for depositing and borrowing, and it prevents triggering a new liquidation while an auction is ongoing.
Impact
The attacker could potentially escape liquidation, but this depends on liquidators being confused or unable to handle the situation.
What the attacker needed
A lending position; ability to create a dust position; liquidators ignore unprofitable auctions
The fix
The recommendation is to make liquidated positions unable to be used again for depositing and borrowing.
How it was found
- Create a very small position (dust amount) and trigger its liquidation.
- Since the collateral is too small to cover gas, liquidators ignore the auction.
- Deposit and borrow a larger amount using the same position.
- When the new loan becomes liquidatable, liquidators may be confused by the ongoing dust auction or unable to proceed with a complex liquidation.
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 some lending systems, when a loan becomes unsafe, anyone can start a liquidation auction to sell the collateral. This report shows that if a user has an old auction still running, they can open a new loan and later, when that loan becomes unsafe, liquidators might be confused or unable to act because the old auction is still there. The user might then avoid having their loan liquidated.
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.