Normal behavior: draw payout should be derived from actual active entrants and available pot, so selectWinner() can always settle completed rounds.
Issue: refunded players are replaced with address(0) but remain in players.length. selectWinner() derives totalAmountCollected from players.length * entranceFee, which can exceed real balance after refunds and make winner payout revert.
Likelihood:
Accounting desynchronization appears as soon as any participant successfully refunds.
Settlement attempts continue to use array length rather than active-player/pot accounting.
Impact:
Draw settlement can revert indefinitely, creating a liveness DoS for raffle completion.
Legitimate participants are unable to receive timely payout and protocol operation is disrupted.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.