In the liquidate() function, the liquidator's health factor is only checked at the very end after they've already taken on the user's debt.
When the liquidator doesn't have sufficient collateral to absorb this new debt, the transaction reverts at the end, wasting gas. More critically, there's no check that the liquidator has enough DSC tokens approved to burn, which could lead to unexpected reverts mid-transaction.
Likelihood: Medium
Reason 1 // Liquidators may miscalculate their capacity
Reason 2 // MEV bots might attempt partial liquidations
Impact: Medium
Impact 1 // Gas wasted on failed liquidation attempts
Impact 2 // Legitimate liquidations may fail unexpectedly
Impact 3 // Reduced liquidation efficiency during crises
The following shows how a liquidator can waste gas on a liquidation that was always doomed to fail. The health factor check at the end reverts after all the expensive operations have already been performed.
Add an early check to ensure the liquidator has sufficient collateral capacity before performing the liquidation. This saves gas on failed attempts and provides clearer error messages.
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.