Normally, users should only be able to withdraw their winnings after the tournament concludes and the winning team has been set by the contract owner.
The contract currently allows users to call withdrawWinnings() before the winner is finalized, which can lead to incorrect payouts or manipulation of funds.
Likelihood:
Occurs whenever a user calls withdrawWinnings() before the owner finalizes the winner.
Occurs whenever winnerSet or similar flags are not enforced before allowing withdrawals.
Impact:
Impact 1: Users may receive payouts prematurely, before a correct winner is determined, leading to misallocation of funds.
Impact 2: Attackers could exploit this to withdraw funds and cause shortages or griefing, compromising fairness.
Explanation:The PoC shows that a user can withdraw winnings before the winner is finalized. This allows premature payouts, misallocates funds, and could be exploited to disrupt fair distribution.
Add a check to ensure the winner has been finalized before allowing withdrawals. This prevents premature withdrawals and ensures payouts are correct and fair.
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.