Trick or Treat

First Flight #27
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing Zero Address Check for Cost

Summary

setTreatCost() doesn't check for a zero address when setting the cost.

Vulnerability Details

Location: src/TrickOrTreat.sol:setTreatCost()

Impact

While unlikely, this could potentially lead to treats being set with invalid costs.

Tools Used

Recommendations

Add a zero address check before setting the cost.

Updates

Appeal created

bube Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[invalid] Zero treat cost

The cost of the treat is set only by the owner (in the constructor, in addTreat and in setTreatCost). That means the cost of the treat will always be greater than zero.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.