Variable random in searchForEgg() function not enough random.
searchForEgg() function source code:
The current implementation relies on easily predictable values (block.timestamp, block.prevrandao, msg.sender, eggCounter), all of which can be known in advance. This allows a malicious actor to time their transaction, calling searchForEgg() at the optimal moment to guarantee the comparison on line 9 passes (in the code above).
This implementation of randomness allows an malicious actor to always win or have a high chance of winning in searchForEgg().
Manual code review.
Fix:
Use ChainlinkVRF for important random values.
Hardening:
Use more random values, for example:
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.