Liquidation process is flawed. missing incentive to call warn
The liquidation process requires calling a warn function before liquidating, but there is no incentive to call warn, so liquidators may not call it, preventing liquidations and causing lenders to lose funds from bad debt.
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2023-10-aloe-judging/issues/145
Found by
0xReiAyanami
Aloe´s Liquidation process s flawed in the way, that there is no incentive for Liquidators to call the warn function, which is required before liquidations.
Vulnerability Detail
The Aloe protocol has a Liquidation process, which involves a grace period for the Borrower.
This means, there is a warn function, that has to be called, that is setting a unleashLiquidationTime. A Liquidation can only be executed when this time is reached.
Problem is, there is no incentive for anyone to call the warn function. Only the actual liquidate function is inventiviced by giving a 5% incentive in Tokens, if there is a swap required, and always giving a small amount of ETH (ANTE) to cover the gas cost.
A Liquidator that calls the warn function has no guarantee, that he is the one, that actually can call liquidate, when the time has come. Therefore it would be a waste of Gas to call the warn function.
This might result in a situation where nobody is willing to call warn, and therefore the borrower will not get liquidated at all, which could ultimately lead to a loss of Funds for the Lender, when the Borrower starts to accrue bad Debt.
Impact
- No incentive to call
warn--> Borrower will not get liquidated - Loss of funds for Lender, because Borrower might accrue bad debt
Code Snippet
https://github.com/sherlock-audit/2023-10-aloe/blob/main/aloe-ii/core/src/Borrower.sol#L148-L173
Tool used
Manual Review
Recommendation
Incentivice the call of warn, to at least pay a small amount of eth (similiar to the ANTE), to ensure liquidation is going to happen.
Discussion
sherlock-admin2
3 comment(s) were left on this issue during the judging contest.
panprog commented:
borderline low/medium, but indeed there is no incentive for anyone to call warn
MohammedRizwan commented:
valid
chrisling commented:
the best incentive in this case is that liquidators can liquidate after they call warn. The recommendation will only introduce a lot more issues (e.g. malicious actors exploiting the incentive by spamming warn)
haydenshively
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
Impact
Without an incentive to call warn, liquidations may not happen, potentially causing lenders to lose funds as bad debt accrues.
What the attacker needed
No incentive to call warn
The fix
The issue was fixed in a pull request.
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 this lending protocol, before a borrower can be liquidated, someone must first call a 'warn' function that starts a countdown. But calling warn costs gas and gives no reward, so nobody may do it. If warn is never called, the borrower is never liquidated, and lenders may lose money if the borrower's debt goes bad.
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.