Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

H-1 MEV and Weak Randomness in `EggHuntGame::searchForEgg

Root Cause: Predictable Randomness
Impact: Loss of Fairness

Description

The searchForEgg() function uses weak randomness that is vulnerable to manipulation by miners/validators and MEV bots. The random number generation relies on predictable values like block.timestamp, block.prevrandao, msg.sender and a counter, which can be influenced or known in advance.

Impact

  • Miners/validators can manipulate block.timestamp and block.prevrandao to influence the random number generation

  • MEV bots can monitor the mempool and front-run successful egg finds while avoiding unsuccessful attempts

  • Players can predict and manipulate their chances of finding eggs

  • This breaks the intended fairness and randomness of the egg hunting game

  • Players with more resources (MEV capabilities) have an unfair advantage

Updates

Lead Judging Commences

m3dython Lead Judge 3 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Insecure Randomness

Insecure methods to generate pseudo-random numbers

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.