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

Inadequate randomness employed in contract.

Summary

Both the winnerIndex and rarity can be calculated before initiating the call, thus exploiting who becomes the winner and the rarity of the NFT.

Vulnerability Details

The winnerIndex and rarity are calculated on the basis of the caller address, timestamp and difficulty. All of these parameters can be known prior to initiating the call, thus allowing the caller to win in almost all cases.

Impact

Winning by exploiting the randomness in all cases.

Tools Used

Manual Review

Recommendations

True randomness is difficult to achieve in blockchain natively, thus using services like chainlink VRF, etc is recommended.

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.