The _initiateLiquidation
function in LendingPool.sol
incorrectly reverts with HealthFactorTooLow()
when a user’s health factor is above the liquidation threshold. The condition itself is correct (if (healthFactor >= healthFactorLiquidationThreshold)
), but the error message is misleading. This could cause confusion for users, auditors, and integrators, as the message suggests the health factor is too low when it is actually too high to allow liquidation.
Incorrect Revert Statement:
The condition is correct (liquidation should only happen if healthFactor < threshold
).
However, the revert message is incorrect. If healthFactor
is too high (not eligible for liquidation), the error message wrongly states that it is "too low."
Misleading Information: Users and developers might misdiagnose the issue.
Incorrect Error Handling: Automated scripts or frontend interfaces relying on this error message may behave incorrectly.
Manual Review
Modify the revert statement to accurately reflect the situation:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.