In the Pot.sol constructor there are two arrays that are passed: `players` and `rewards`. They are copied into the state variables `i_players` and `i_rewards`. Assuming that the player array and the rewards array are equal, each of the players is assigned a sum of the rewards using the `playersToRewards` mapping. To do that the protocol uses a for loop to copy the data into the mapping.
When using a list that can be potentially unlimited a DoS (Denial of Service) attack could be exploited. If an attacker decided to, they could enter the contents with a big number of different addresses and make the array enormous. This will cause the gas fees for the protocol to be unreasonably expensive, and render the protocol unusable.
Manual Review
Add a limit to the amount of players allowed to participate in each contest.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.