The calculation of totalAmountCollected is incorrect because it includes people who have withdrawn.
The formula is as follows
uint256 totalAmountCollected = players.length * entranceFee;
The player who performed a refund is assigned a zero address in the index and becomes non-active, but the length of the array remains the same. Therefore, the returned fee is also included in the calculation formula.
Calculate the wrong amount when distributing the award.
Manual
When making a player non-active, the length of the array is also changed.
Funds are locked to no one. If someone gets the refund issue, they also got this issue. IMPACT: High Likelihood: High
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.