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

Randomness vulnerabilities

Summary

The function selectWinner has a randomness vulnerability.

Vulnerability Details

Each transaction on Ethereum has a deterministic state. Using timestamp and block difficulty to generate random numbers is not appropriate

Impact

block.timestamp and block.diffulty are used to choose a winner. We can manipulate the selection of the winner because both method are not good enough to generate random numbers

Tools Used

Manual review

Recommendations

Do not use block.timestamp or blockhash as a source of randomness. Instead, use oracle such as chainlink

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.