Eggstravaganza

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

Front-Runnable searchForEgg() (Race Condition)

Summary

The searchForEgg() function is vulnerable to front-running due to its reliance on publicly visible inputs.

Vulnerability Details

  • The pseudo-random number depends on block.timestamp, block.prevrandao, and msg.sender, which can be observed in the mempool.

  • Miners or bots can replicate favorable conditions to guarantee egg findings.

Impact

  • Players can be outcompeted by bots, undermining fairness.

Tools Used

Manual reviews

Recommendations

  • Implement commit-reveal schemes or use Chainlink VRF.

  • Add a small ETH fee per attempt to discourage spam.

Updates

Lead Judging Commences

m3dython Lead Judge 8 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.

Give us feedback!