Normal behavior: The liquidation health factor check should accept any liquidation that does not worsen the borrower’s health, including cases where rounding leaves the health factor unchanged.
Issue: The implementation uses a strict > check (ending_user_health_factor > starting_user_health_factor), causing valid liquidations that only marginally improve or keep the health factor constant (due to rounding) to revert.
Likelihood:
Reason 1 // Fixed‑point arithmetic and integer division frequently produce off‑by‑one style rounding effects.
Reason 2 // Partial liquidations near the threshold are common, especially from automated bots that try to optimize capital use.
Impact:
Impact 1 // Some otherwise valid liquidation attempts revert unexpectedly, leaving a subset of risky positions unliquidated.
Impact 2 // Unreliable liquidation behavior complicates bot strategies and can lead to pockets of unaddressed risk that accumulate over time.
A partial liquidation leaves the health factor at exactly the same value:
Choose parameters such that a given debt_to_cover reduces the user’s debt just enough that the ratio remains the same after rounding.
starting_user_health_factor and ending_user_health_factor both compute to the same integer.
The assertion ending_hf > starting_hf fails, reverting the liquidation even though it did not worsen the position.
Relax the check to >= or otherwise ensure that small rounding effects do not block beneficial or neutral liquidations.
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.