ContestManager.createContest never validates that players.length > 0 before deploying a Pot:
If a pot is created with an empty players array but a nonzero totalRewards (and funded via fundContest), i_players.length is permanently 0 (it's set once in the constructor with no setter). Nobody can ever call claimCut() successfully (there is no player whose address maps to a nonzero reward), so remainingRewards stays at the full totalRewards forever. When closePot() is eventually called:
i_players.length is 0, so this line panics with a division-by-zero error. The panic unwinds the entire call, including the managerCut transfer executed on the line immediately above — Solidity reverts undo all state changes and value transfers made earlier in the same call. closePot() can never succeed for this pot (i_players.length is immutable), so this isn't a one-time revert to route around — it's permanent.
Likelihood: Low-Medium
Requires an admin to create a pot with an empty players array while still funding it with a nonzero amount — a straightforward input-validation gap, not a deliberate multi-step setup.
Impact: Critical
Total, unconditional, and permanent loss of the entire totalRewards funded into the pot. Unlike every other finding in this report, here nobody receives anything — not the claimants (there are none), and not even the manager, since the panic reverts their cut too. There is no recovery function anywhere in scope.
A pot funded with 1000 tokens and zero players can never be closed; the funds are provably stuck:
Validate at creation, where the invalid state actually originates:
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.