Normal behavior:
Owner sets the winning team after the event ends, and winning users receive proportional rewards.
Specific issue:
The setWinner() function relies entirely on the owner:
Likelihood:
This occurs whenever the owner is malicious, compromised, or coerced, allowing them to set the winner to any team.
This also occurs if the owner accidentally calls setWinner() with the wrong index or before proper event finalization, due to lack of checks beyond onlyOwner and the timestamp check.
Impact:
Owner can steal all staked tokens by falsely setting the winner.
Winning users receive 0 payout or incorrect amounts.
Explanation:
If the owner is malicious or compromised, setWinner allows them to choose any team, potentially giving themselves (or nobody) all the rewards.
Short explanation:
Use time locks or multi-sig governance to set the winner.
Optionally, allow off-chain reporting with signed proofs or commit-reveal to avoid single-point manipulation.
Introduce onlyAfter(uint256 timestamp) modifier
Replace single-owner control with multisig or DAO voting
This is owner action and the owner is assumed to be trusted and to provide correct input arguments.
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.