Trick or Treat

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

Treat Count Accuracy Off Due to Starting Candy

Summary

The treat count increases correctly when adding new treats only if we account for the undocumented initial "Candy" treat.

Vulnerability Details

Location: src/TrickOrTreat.sol:addTreat() and src/TrickOrTreat.sol:getTreats()

Impact

The contract correctly manages treat counts, but the presence of an initial treat could be surprising if not well-documented.

Tools Used

Recommendations

Ensure the presence of the initial "Candy" treat is well-documented in the contract and any associated documentation. Consider adding a function to retrieve the total number of treats for easier verification.

Updates

Appeal created

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

Support

FAQs

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