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

`selectWinner` can be manipulated

Summary

selectWinner can be manipulated

Vulnerability Details

enterRaffle allows players to join the raffle even after the raffle has ended. selectWinner calculates the winner using the length of players array.

A malicious player can enroll more account in the raffle after the raffle has ended hence changing the length of the players array and hence changing the winner to someone else or worse to themselves!

Impact

A malicious player can change the winner by enrolling more accounts after the raffle has ended.

Tools Used

Manual

Recommendations

Use VRFs to generate random numbers can choose winners.

Updates

Lead Judging Commences

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

weak-randomness

Root cause: bad RNG Impact: manipulate winner

Support

FAQs

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