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

Weak Randomness

Summary

Weak Randomness in different parts of the project

Vulnerability Details

In the ChoosingRam.sol contract we can see 2 instances of this weak randomness:

uint256 random = uint256(
keccak256(
abi.encodePacked(block.timestamp, block.prevrandao, msg.sender)
)
) % 2;
.
.
.
uint256 random = uint256(
keccak256(abi.encodePacked(block.timestamp, block.prevrandao))
) % ramNFT.tokenCounter();

Impact

Values are not random and therefore could be predicted.

Tools Used

Manual review

Recommendations

Use some off-chain random number generator such as Chainlink VRF

Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic
Assigned finding tags:

Weak randomness in `ChoosingRam::increaseValuesOfParticipants`

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.