The EggHuntGame contract allows the owner to modify the eggFindThreshold
without any minimum limit. This means the owner could set the threshold to 0
, making it impossible for players to win NFTs. Additionally, the owner could front-run players by adjusting the threshold dynamically to control the outcome of the game.
Affected code:
The setEggFindThreshold
function allows the contract owner to set the probability of finding an egg:
However, there is no minimum threshold enforcement allowing the owner to set eggFindThreshold = 0
, preventing players from finding any eggs. Addinionally, the owner can observe pending transactions and adjust eggFindThreshold
in response to user interactions.
For example, if a player attempts to search for an egg, the owner can increase or decrease the threshold before the transaction is executed, influencing the outcome unfairly.
The owner can prevent users from winning by setting eggFindThreshold = 0
, making the game unplayable.
Players may lose trust in the fairness of the game if they suspect owner manipulation.
If NFTs have value, the owner could dynamically adjust eggFindThreshold
to favor certain players or manipulate NFT supply.
Manual review
I would recommend implementing a minimum treshold requirement like at least 10%.
Owner is trusted and is not expected to interact in ways that would compromise security
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.