The createContest() function in ContestManager accepts players and rewards arrays and passes them directly to the Pot constructor without validating that players.length == rewards.length.
Inside the Pot constructor, a loop iterates over i_players.length and accesses i_rewards[i] at each index. When the arrays have mismatched lengths, two failure modes exist.
When rewards.length < players.length, the constructor panics with an array out-of-bounds access, bricking the entire pot creation. When rewards.length > players.length, excess reward entries are silently ignored, but totalRewards can be set to include them, causing the pot to be overfunded with funds that no player can ever claim via claimCut().
Likelihood:
The owner calls createContest() with accidentally mismatched array lengths (e.g., building arrays programmatically where one list is filtered differently than the other)
A front-running or MEV scenario where an attacker observes a pending createContest() transaction and uses a governance or oracle manipulation to influence array inputs
Impact:
DoS (rewards.length < players.length): Pot creation reverts permanently, blocking the owner from launching the contest. Funds minted for the contest are stranded until the owner can re-submit with corrected arrays.
Fund misallocation (rewards.length > players.length): Excess rewards silently ignored. Owner funds the pot with totalRewards including the phantom entries, but only a subset of players can claim. The excess is locked until closePot() — if it executes.
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.