The EggHuntGame
contract uses a predictable method to generate pseudo-random numbers for determining whether a player finds an egg. This vulnerability allows miners or attackers to manipulate the outcome by controlling block variables (block.timestamp
, block.prevrandao
), leading to unfair advantages in the game.
Location:
EggHuntGame::searchForEgg()
Issue:
The randomness is derived from:
Predictability: block.timestamp
and block.prevrandao
are public and can be influenced by miners/validators.
Front-running Risk: Attackers can compute the expected random number before submitting a transaction and only proceed if favorable.
No Entropy: The seed lacks external unpredictability (e.g., oracle inputs).
Attackers can guarantee egg discoveries, breaking game fairness -- making them monopolize rewards, devaluing NFTs for legitimate participants.
Manual code review.
Use Chainlink VRF
Integrate Chainlink’s Verifiable Random Function (VRF) for cryptographically secure randomness.
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.