The EggHuntGame
contract uses predictable sources for randomness, including block.timestamp
, block.prevrandao
, and other deterministic data to generate "random" values. This approach creates a vulnerability where the randomness can be predicted and exploited by attackers.
Add below test to test suite, it proves random variable is predictable.
This vulnerability allows players or attackers to:
Predict exactly when they will find eggs
Time their transactions to maximize rewards
Gain an unfair advantage over other players
Manual code review
Forge testing framework to validate the vulnerability
Use a secure source of randomness, such as Chainlink VRF (Verifiable Random Function)
Insecure methods to generate pseudo-random numbers
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.