The endTime
variable is defined and set during the game start, but its enforcement is inconsistent across the contract. While some functions (like searchForEgg
) include a check for endTime
, others (like depositEggToVault
) do not. This inconsistency allows for scenarios where the game appears to have ended but players can still interact with certain functions, leading to:
Inconsistent Game State: Some functions enforce endTime
, while others rely solely on gameActive
.
Unfair Gameplay: Players can deposit eggs or perform other actions after the game has logically ended.
Economic and Trust Issues: Rewards or incentives tied to the game's lifecycle may be exploited or misaligned.
1/ searchForEgg Enforces endTime
The searchForEgg function includes a check for endTime:
This ensures that players cannot search for eggs after the game has ended.
2/ depositEggToVault Does NOT Enforce endTime
The depositEggToVault function does not check endTime:
This allows players to deposit eggs into the vault even after the game has ended, creating inconsistencies in the game's lifecycle.
3/ endGame Relies on Manual Intervention
The endGame function must be called manually by the owner to stop the game:
If the owner forgets or is unavailable to call this function, the game can continue indefinitely, even though endTime has passed.
4/ getGameStatus Reflects endTime but Does Not Enforce It. this is purely informational and does not enforce endTime in any way.
Inconsistent Enforcement:
Players can still deposit eggs after the game has ended, creating inconsistencies in the game's lifecycle.
Unfair Advantage:
Players who deposit eggs after the game has ended could gain an unfair advantage in tournaments or reward systems.
Economic Exploitation:
If rewards are tied to deposits or other actions, players could exploit the lack of endTime enforcement to claim rewards after the game has ended.
Centralization Risk:
The reliance on the owner to manually call endGame introduces a centralization risk. If the owner is unavailable, the game can continue indefinitely.
manual review
Option 1: Enforce endTime in all critical functions
Option 2: Automatically end the game when endTime is reached - could be done with oracle feeds and a keeper.
Incorrect values reported when a game is ended early
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.