The protocol expects totalRewards to equal the total amount distributed across all players.
However, there is no validation ensuring that the sum of rewards[] matches totalRewards, allowing contests to be created with inconsistent reward configurations.
Likelihood:
Contest parameters are manually configured during creation, making misconfiguration realistic.
The contract accepts inconsistent totals without validation, allowing invalid accounting states.
Impact:
Reward distribution becomes inconsistent with the funded amount.
Excess or unallocated funds may remain in the contract until manually recovered by the owner.
A contest is created where:
The contract is funded with 1000 ether, but only 500 ether is assigned to players:
Result:
The remaining funds are not distributed via the reward logic and require manual recovery (e.g., closing the pot by the owner).
Validate that the sum of rewards matches totalRewards before deploying the Pot.
This enforces the invariant:
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.