No assert amount_dsc_to_burn > 0 check exists in _burn_dsc or its external wrapper burn_dsc. The developer added zero checks in _deposit_collateral and liquidate but missed this function.
Impact: Low — no funds lost. Just wastes gas on every zero amount call.
The _burn_dsc internal function does not validate that amount_dsc_to_burn is greater than zero. Calling burn_dsc(0) succeeds without reverting — it subtracts zero from the user's debt record, calls burn_from with zero amount, and runs an unnecessary health factor check. This wastes gas and is inconsistent with other functions in the protocol that validate amounts.es
Likelihood:
Medium — anyone can call burn_dsc(0) at any time with no special conditions.Impact:
Impact: Low — no funds lost. Just wastes gas on every zero amount call.
Add zero check in _burn_dsc:
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.