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

Lottery winner may have zero address

Summary

After calling refund, the player’s address becomes zero and he continues to participate in the lottery.

Vulnerability Details

After calling refund() the player's address becomes address(0) and he continues to participate in the lottery. If the player with address(0) wins, the money is sent to address zero and burned.

Impact

Money is sent to zero address and burns.

Tools Used

Manual review

Recommendations

After calling a refund(), need remove player from array. Replace players[playerIndex] = address(0); with delete players[playerIndex];.

Updates

Lead Judging Commences

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

zero address can win the raffle

Funds are locked to no one. If someone gets the refund issue, they also got this issue. IMPACT: High Likelihood: High

Support

FAQs

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