there are two major problems that comes with the way contests are created using the ContestManager::createContest.
using dynamic arrays for players and rewards leads to potential DoS for the Pot::constructor, this is possible if the arrays are too large therefore requiring too much gas
it is not safe to trust that totalRewards value supplied by the manager is accurate and that could lead to some players not being able to claimCut
If the array of players is very large, the Pot::constructor will revert because of too much gas required to run the for loop in the constructor.
Another issue is that, if a Pot is created with a wrong totalRewards that for instance is less than the sum of the reward in the rewards array, then some players may never get to claim their rewards because the Pot will be underfunded by the ContestManager::fundContest function.
Here is a test for wrong totalRewards
Pot not created if large dynamic array of players and rewards is used
wrong totlRewards value leads to players inability to claim their cut
manual review
foundry test
review the pot-creation design by, either using merkle tree to store the players and their rewards OR another solution is to use mapping to clearly map players to their reward and a special function to calculate the totalRewards each time a player is mapped to her reward. this totalRewards will be used later when claiming of rewards starts.
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.