An attacker can cheat to only send a transaction when it's a win.
https://github.com/CodeHawks-Contests/2025-04-eggstravaganza/blob/main/src/EggHuntGame.sol#L70-L73
This code is public, then... an attacker can just process this code in local until he finds a win :
random < eggFindThreshold
.
And then, just only send this winning transaction. That way, he only submit winning transactions to the network and then avoid losing gas
at each losing submission.
Only have winning transactions, never lose. Always mint Eggs.
Github, Manual review.
Either don't use the blockchain for a game about guessing a random value or use Chainlink VRF to generate a random number :
https://chain.link/vrf
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.