Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Valid

Strict Equality Check for Entrance Fee in `enterRaffle` Function May Limit User Flexibility

Summary

The enterRaffle function uses a strict equality check to validate the amount of Wei sent, requiring it to be exactly equal to the entrance fee multiplied by the number of participants.The require statement in the enterRaffle function verifies that msg.value is equal to the entrance fee multiplied by the number of participants. This strict equality check may restrict the participation of users .Modifying the check to allow for amounts greater than or equal to the entrance fee could provide more flexibility without compromising the raffle's integrity.

Vulnerability Details

Impact

Tools Used

Manual analysis

Recommendations

Modify the check to allow participation if msg.value is greater than or equal to the entrance fee.

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

greifers-send-money-to-contract-to-block-withdrawfees

Support

FAQs

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

Give us feedback!