Liquidations are enabled when repayments are disabled, causing borrowers to lose funds without a chance to repay
The contract owner can disable debt repayments while liquidations remain active, so borrowers cannot repay to avoid liquidation and may lose their collateral.
Source: https://github.com/sherlock-audit/2023-02-blueberry-judging/issues/290
Found by
Jeiwan, Nyx
Summary
Debt repaying can be temporary disabled by the admin of BlueBerryBank, however liquidations are not disabled during this period. As a result, users' positions can accumulate more borrow interest, go above the liquidation threshold, and be liquidated, while users aren't able to repay the debts.
Vulnerability Detail
The owner of BlueBerryBank can disable different functions of the contract, including repayments. However, while repayments are disabled liquidations are still allowed. As a result, when repayments are disabled, liquidator can liquidate any position, and borrowers won't be able to protect against that by repaying their debts. Thus, borrowers will be forced to lose their collateral.
Impact
Positions will be forced to liquidations while their owners won't be able to repay debts to avoid liquidations.
Code Snippet
Tool used
Manual Review
Recommendation
Consider disallowing liquidations when repayments are disabled. Alternatively, consider never disallowing repayments so that users could maintain their positions in a healthy risk range anytime.
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
Borrowers could be forced into liquidation without being able to repay, losing their collateral.
What the attacker needed
Admin disables repayments
The fix
Liquidations should be disallowed when repayments are disabled, or repayments should never be disabled.
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 system, borrowers must repay their loans to avoid losing their collateral. This report shows that the admin could turn off repayments but leave liquidations on, so borrowers had no way to save their positions.
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.