The TwentyOne contract uses predictable values (block.timestamp, msg.sender, block.prevrandao)
for random card generation which can be manipulated.
The following test demonstrates that card generation is predictable:
Players can predict which cards they'll receive
Game integrity is compromised
Protocol could suffer financial losses
Manual code review
Forge testing framework
Gas analysis
Use Chainlink VRF or commit-reveal scheme for true randomness.
Replace:
With:
Randomness Manipulation: The randomness mechanism relies on block.timestamp, msg.sender, and block.prevrandao, which may be predictable in certain scenarios. Consider using Chainlink VRF or another oracle for more secure randomness.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.