The contract uses block.prevrandao
for randomness, which is unsupported on many Ethereum-compatible chains (L1/L2), causing reverts or insecure fallback behavior.
Location: EggHuntGame.sol
, searchForEgg()
function
Code Snippet:
Issue:
block.prevrandao
was introduced in Ethereum’s Paris upgrade (post-Merge) and is not supported on:
Proof-of-Work Chains: BSC, Avalanche C-Chain, Polygon PoS (use block.difficulty
).
Certain L2s: zkSync Era, StarkNet (use custom RNG).
On unsupported chains, block.prevrandao
returns 0
or causes undefined behavior, breaking the RNG logic.
Broken Functionality: searchForEgg()
will revert or produce predictable/invalid randomness on unsupported chains.
Deployment Limitations: Contract cannot be deployed cross-chain without modification.
Game Integrity Risk: Predictable RNG enables exploitation on affected chains.
Manual Code Review
Implement Chainlink VRF for universally compatible, secure randomness.
Owner is trusted and is not expected to interact in ways that would compromise security
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.