The Pot::constructor take an array param of rewards for each player and a param of totalReward. The total value of rewards array need to equal the totalReward value. But the constructor do not check for this.
If the totalReward value is larger than total value of rewards array, the Owner will have to send more token than needed. And if totalReward value is smaller than total value of rewards array, claimCut will revert when player call because the Pot contract doesn't have enough token and causing arithmetic underflow.
The total value of rewards array is 4. The owner fund the contest with the totalRewards of 3. After Player 1 claim cut, player 2 can not claim.
Paste this test into TestMyCut.t.sol, test will pass.
Manual review
Foundry
Add checking to ensure the totalRewards value is equal to total value of rewards array.
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.