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

ENTER_RAFFLE_CAN_BE_BLOCKED_BY_USER_REFUNDS

Summary

Function enterRaffle can be blocked if two users are called refund or attacked called refund from two added accounts

Vulnerability Details

In enterRaffle checked that array players stored as a state variable has no duplicated addresses. However this array can contain two zero addresses if two users called refund. In this case function enterRaffle will fail in require(players[i] != players[j], "PuppyRaffle: Duplicate player"); because it contains two zero addresses.

Impact

Contract entering blockage by anyone

Tools Used

Recommendations

Skip zero addresses in duplications check

Updates

Lead Judging Commences

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

reentrancy-in-refund

reentrancy in refund() function

Support

FAQs

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