_redeem_collateral has no assert amount_collateral > 0 check, allowing anyone to call
Impact: waste of gas
_redeem_collateral has no assert amount_collateral > 0 check, allowing anyone to call redeem_collateral(token, 0) which emits a fake CollateralRedeemed event with zero amount, wastes gas, and pollutes the event logs — while _deposit_collateral correctly has this check.
Likelihood:
Medium — anyone can call this with zero amount at any time with no special conditions required.
Impact:
Low — no funds are lost. Transaction succeeds but does nothing useful. Wastes caller's gas and emits a misleading event with zero amount polluting the event logs.
Add the same zero amount check that exists in_deposit_collateral:
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.