The getGameStatus
function returns contradictory game states when gameActive
is manually set to true
but the current timestamp exceeds endTime
. This creates mismatched status displays and operational inconsistencies.
Flawed State Logic:
Key Issues:
Manual gameActive
state is not auto-synced with time conditions
Allows gameActive=true
and block.timestamp > endTime
coexistence
Frontend may display "Game time elapsed" while other functions still accept interactions
• User confusion due to conflicting status indicators (Low)
• Potential gas waste from invalid transactions (Medium)
• Inaccurate game analytics if admins forget to call endGame()
(Medium)
• Manual code review
1. Time-Driven State Machine
2. Auto-State Termination
3. Enhanced Admin Controls
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.