The constructor iterates through i_players and attempts to map them to values in i_rewards without verifying that both arrays have the same length. This leads to a Denial of Service (DoS) during deployment or a corrupted state.
Describe the normal behavior in one or more sentences
Each player should have a corresponding reward amount.
Explain the specific issue or problem in one or more sentences
The constructor does not verify that players.length == rewards.length. This can lead to out-of-bounds reads or incorrect reward assignments.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
If the deployment fails, time and gas are wasted. If the deployment succeeds with mismatched lengths (case 2), the remainingRewards accounting will be permanently broken, leading to issues in claimCut() and closePot().
Add a require statement at the beginning of the constructor to ensure parity between the two input arrays.
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.