The _burn_dsc() function does not validate that amount_dsc_to_burn is greater than zero.
While _mint_dsc and _deposit_collateral have this check, burning zero tokens is allowed.
This can be used to manipulate events or perform no-op operations that waste gas and pollute logs.
Likelihood: Low
Reason 1 // Requires intentional zero-value calls
Reason 2 // No direct financial loss
Impact: Low
Impact 1 // Gas wastage on no-op operations
Impact 2 // Potential for event spam
Impact 3 // Inconsistent validation across functions
The following demonstrates that zero-amount burns are accepted, unlike zero-amount mints which correctly revert. This inconsistency could be exploited to spam events or waste gas.
Add a zero-amount check to _burn_dsc for consistency with other functions. This prevents no-op operations and ensures all state-changing functions validate their inputs.
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.