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

generating a random number on-chain - randomness vulnerability

Summary

Anyone is able to get the needed index

Vulnerability Details

A malicious actor can copy the lines that calculate random numbers, and get the index they need, and call the selectWinner function when they need to become a winner

Impact

Anyone could cheat and win all raffles

Tools Used

hardhat

Recommendations

For generating a random number use off-chain oracles or services specifically for this

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 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.

Give us feedback!