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

refund function should pop players array

Summary

Basically it's best to move the refunded address to the end of the array and pop it , so that the array get's smaller and cost less gas when iterating over it!

Vulnerability Details

players[playerIndex] = address(0);

Impact

Low

Tools Used

Manual review

Recommendations

Move the refunded array to the end of the array and pop it.

Updates

Lead Judging Commences

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

refund-doesnt-reduce-players-array-size-causing-protocol-to-freeze

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.

Give us feedback!