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

Rarity of the reward NFT can be influenced

Summary

Rarity of the reward NFT can be influenced by a player.

Vulnerability Details

Rarity of the NFT is calculated using the msg.sender and block.difficulty which means the Rarity can change based on who is calling the selectWinner function and when.

Since any player can call the selectWinner function even though they might not be the winner they can still influence the reward rarity, or worse they can be a winner and call the function at the right block to get the LEGENDARY rarity.

Impact

Players have the power to influence the rarity of the reward.

Tools Used

Manual

Recommendations

Don't use msg.sender to calculate the rarity, instead use VRFs and only let the owner call the function.

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.