Trick or Treat

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

user go get a treat will still pay high amout

Summary

Vulnerability Details

https://github.com/Cyfrin/2024-10-trick-or-treat/blob/main/src/TrickOrTreat.sol#L95

require(msg.value >= requiredCost, is require statement make sure that a user that get a treat pay the exact amount or pays more than the exact amount, which is not intended by the protocol, a user that get a treat is supposed to pay the normal price or half price

Impact

this require statement make user that get a treat to pay more than the requiredcost or pay the exact requiredcost which is not fair for a treat

Tools Used

manual

Recommendations

the protocol should make sure that users who get a treat pays the required cost or less

Updates

Appeal created

bube Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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