Eggstravaganza

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

Owner privileges in `EggHuntGame::setEggFindThreshold` could lead to a loss of fairness in the game.

Description: The owner can arbitrarily change the EggHuntGame::eggFindThreshold during the game, which could be unfair to participants.

Impact: The owner could manipulate the game dynamics, reducing or increasing the chance of finding eggs.

Recommended Mitigation: Restrict changes to eggFindThreshold to only when the game is inactive.

function setEggFindThreshold(uint256 newThreshold) external onlyOwner {
+ require(!gameActive, "Cannot change threshold during an active game");
require(newThreshold <= 100, "Threshold must be <= 100");
eggFindThreshold = newThreshold;
}
Updates

Lead Judging Commences

m3dython Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Trusted Owner

Owner is trusted and is not expected to interact in ways that would compromise security

Support

FAQs

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

Give us feedback!