The searchForEgg
function uses a combination of block.timestamp
, block.prevrandao
, msg.sender
, and eggCounter
to generate a pseudo-random number for determining if an egg is found. Block variables like block.timestamp
and block.prevrandao
are predictable or can be manipulated by miners/validators.
Malicious user can predict the outcome of the random number generation, allowing them to guarantee finding an egg on their attempts. Malicious block validator can prevent users from finding eggs by delaying their transactions if it were to find an egg.
Utilize a secure and verifiable source of on-chain randomness, such as Chainlink VRF, instead of relying on block variables.
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.