Eggstravaganza

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

Owner can change eggFindTreshhold during game

Summary

Owner can change the eggFindThreshold at any desired time, while game is active or not active

Vulnerability Details

This can help certain players to take advantage of periods when eggFindThreshold is set to a high value and eggs are easier to find

Impact

Can lead to unfair results

Tools Used

Forge Test, Remix, Manual Review

Recommendations

Restrict setting a new eggFindThreshold only to times when the game is not active

/// @notice Allows the owner to adjust the egg-finding chance.
function setEggFindThreshold(uint256 newThreshold) external onlyOwner {
require(newThreshold <= 100, "Threshold must be <= 100");
require(!gameActive, "Can not change value when game is active"); // Restrict changing the value only to times when game is not active
eggFindThreshold = newThreshold;
}
Updates

Lead Judging Commences

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