Root Cause: All critical administration and game-flow functions are restricted to a single
owner()
account → Impact: Owner can unilaterally manipulate game parameters, reset or block progress, or drain fees—no checks or multi-party governance.
WHY WOULD ANYONE TRUST THE OWNER: It's a Game something similar to a gamble. So we can't expect the owner to be fair. The owner can change the rules at any time, so we can't expect the game to be fair.
The Game
contract places complete authority over game progression, configuration, and fund withdrawals in the hands of a single owner()
. Functions such as:
resetGame()
updateGracePeriod(...)
updateClaimFeeParameters(...)
updatePlatformFeePercentage(...)
withdrawPlatformFees()
are all guarded by onlyOwner
. While ownership-based access is common, granting unchecked, unilateral control of both game logic and funds to one key creates a single point of failure and opens the door to:
Game Freezing: Owner can set gracePeriod
to an excessively high value, or call resetGame()
prematurely—blocking players permanently.
Fee Griefing: Owner can drive fees to astronomical levels, or repeatedly withdraw platform fees to starve the pot.
Malicious Drains: Owner can repeatedly update parameters or withdraw funds without accountability.
Likelihood: High
In real-world DeFi, overly centralized admin keys (e.g., unrevoked multisig keys) have resulted in protocol hijacks, emergency halts, and irreversible fund loss.
All critical control is vested in one EOA.
No limits on how often or what values can be set.
No multi-party checks, timelocks, or on-chain governance required.
Impact: High
Single-Point Control: Owner can unilaterally halt or hijack the game without recourse.
User Trust Erosion: Players have no defense against malicious parameter changes.
Financial Risk: Owner can empty the fee pool at will, potentially leaving no pot for players.
No Recovery Mechanism: No timelock, no multisig, no emergency override—game remains frozen until owner chooses otherwise.
In DeFi history, protocols with unrevoked admin keys (e.g., Yam Finance v1, various forks of Compound) suffered governance takeovers, emergency halts, and community loss when keyholders exercised unchecked power.
Tools Used:
Foundry Test Suite
Chat-GPT AI Assistance (Report Grammar Check & Improvements)
Manual Review
Add the following to test/Game.t.sol
to simulate malicious owner behavior:
Run:
Scenario
Owner Freezes Game
Owner Blocks Participation
Owner Drains Protocol Fees
Owner Resets at Will
Introduce Multi-Party Governance or Timelock
Require a timelock delay on critical parameter updates (e.g., 24 hours) so users can react.
Or use a multisig or DAO vote to approve changes, distributing authority.
Implement Role-Based Access
Replace onlyOwner
with granular roles (CONFIG_ADMIN
, FEE_COLLECTOR
, GAME_MANAGER
) via OpenZeppelin AccessControl.
Assign roles to distinct addresses or contracts to separate powers.
Add Immutable Limits
Enforce absolute max/min bounds on parameters (e.g., gracePeriod ≤ 7 days
, claimFee ≤ 10 ether
).
Prevent extreme values even if called by admin.
Emergency Pause/Exit
Add a pause()
feature allowing the community or a timelocked guardian to halt the game if malicious activity is detected.
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.