Liquidation should allow unhealthy positions to be reduced when the liquidator repays debt and receives collateral plus the liquidation bonus.
liquidate requires the borrower's ending health factor to be greater than the starting health factor. However, the protocol removes collateral worth more than the debt repaid because of the liquidation bonus. For sufficiently unhealthy positions, repaying debt while removing debt + bonus collateral lowers the borrower's health factor, so the transaction reverts even when the borrower is not yet insolvent.
Likelihood:
This occurs when a borrower's health factor is below the point where the 10% liquidation bonus still allows health factor improvement.
A normal collateral price drop can create this state before the position is fully insolvent.
Impact:
Liquidators cannot liquidate affected unhealthy positions because every liquidation reverts with DSCEngine__HealthFactorNotImproved.
The protocol keeps risky debt outstanding even though the borrower still has raw collateral available to repay part of the debt.
The borrower starts with:
After a liquidator repays 100 DSC, the protocol removes $110 of collateral because of the bonus:
The health factor is lower, so liquidate reverts.
Compute a maximum repay amount/collateral seizure that guarantees health factor improvement, or remove the strict improvement check and rely on solvency and collateral-availability checks designed for partial liquidation.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.