The EggHuntGame
contract contains a critical vulnerability where the game administrator can arbitrarily change the eggFindThreshold
during an active game. This parameter directly controls the probability of finding eggs, allowing the admin to selectively favor or penalize players by adjusting the difficulty in real-time. This fundamentally undermines the fairness and integrity of the game mechanics.
The setEggFindThreshold
function allows the owner to change the probability of finding eggs at any time, with no restrictions on whether a game is active:
Meanwhile, the searchForEgg
function uses this threshold to determine success:
The vulnerability stems from:
Lack of restrictions on when the threshold can be changed
Centralized control of the game's core probability mechanism
Absence of transparency mechanisms to track or notify threshold changes
This creates fairness issues:
Selective Advantage: The admin can observe specific wallets searching for eggs and increase the threshold just before their transaction, then decrease it afterward.
Targeted Difficulty: The admin can make the game arbitrarily difficult for certain players or time periods.
Tournament Manipulation: In competitive settings, the admin can effectively choose winners by adjusting difficulty.
Inadverted change - the admin could change this setting during an active game unaware this favors some players
manual check
Option 1: Time-Lock for Threshold Changes
Option 2: Prohibit Changes During Active Games
Option 3: Game-Specific Thresholds
Owner is trusted and is not expected to interact in ways that would compromise security
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.