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

Predictable Randomness

Summary

The contract uses a pseudo-random number generator to select a winner and to determine the rarity of minted tokens. This uses block variables such as block.timestamp and block.difficulty, which can be influenced by miners to a certain extent. This may not be a critical issue depending on the value of the prizes, but for high-stake games, this could potentially be exploited by a miner.

Vulnerability Details

Impact

Medium Severity - Randomness: Depending on the value of the prizes, the current pseudo-random number generator implementation may or may not pose a critical issue. High-stake games could be vulnerable to miner influence.

Tools Used

vscode

Recommendations

Consider using a more secure source of randomness, such as the Chainlink VRF (Verifiable Random Function).

Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year 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.