There is a lack of checks on the inputs of function createContest()
may create several problems.
The lack of checks:
No limit on the array size.
No length equality check, that is, whether players.length == rewards.length
No duplicate checks on players
No minimum and maximum amount of rewards.
No check whether the total amount of rewards equal to totalRewards
.
The problems that may occur associated with the lack of checks above:
The array Pot::claimants
can be too long that a call to function Pot::closePot()
may exceed block gas limit.
A player
may not be added due to a lack of rewards
data, or vice versa.
A player's existing data will be overwritten by the duplicates.
The reward may be too small or too large. Zero amount also means that there is no reward for the player.
Data inconsistency that may cause Pot::claimCut()
to fail due to arithmetic overflow if remainingRewards is less than the total rewards for players. The Pot
contract also may not have enough assets to distribute to all players.
The newly created Pot contract may not work as expected.
Manual review.
Consider adding checks to prevent the mentioned problems from happening.
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.