The `Pot` constructor does not validate that the `players` and `rewards` arrays have matching lengths, that the sum of rewards equals `totalRewards`, or that the arrays are non-empty. This can lead to creation of invalid Pot contracts with mismatched data, causing incorrect reward distribution, division by zero errors, or accounting discrepancies.
The constructor directly uses the arrays without validation, which can result in silent failures or incorrect state initialization.
Likelihood:
* This occurs when a Pot is created with invalid input parameters
* The issue manifests when arrays are mismatched, empty, or reward sums don't align
Impact:
* Invalid Pot contracts can be created, leading to incorrect reward distribution
* Division by zero in `closePot()` if `i_players.length` is 0 (though this is now fixed in issue #1)
* Players may not receive their intended rewards due to array misalignment
* Accounting errors can occur if sum of rewards doesn't match totalRewards
* Funds can be locked or incorrectly distributed
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.