Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

Missing address(0) check in enterRaffle

Summary

Missing address(0) check in 'enterRaffle'

Vulnerability Details

Function 'enterRaffle' does not check the input for address(0).

Impact

Having address(0) on some position within 'players' array means that on that there was a valid address there but it was refunded according to the contract's logic.
Missing the address(0) check in enterRaffle means someone could send funds to the contract (paying entranceFee) and at the same time not register valid address for a player.
This will have consequences for the mathematic calculations in the other functions.

Tools Used

Manual review

Recommendations

Implement address(0) check in enterRaffle

Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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