entranceFee should have a minimum value.
If the value is too small, then prizePool will be zero:
Technically if players.length * entranceFee * totalAmountCollected < 100, then it will be 0.
This is because solidity only do integer division, if there is a remainder, then it is discarded.
This is not a situation that occurs very often, as such impact is not high. But it is worth considering that under certain conditions, the prize pool or the fees could be zero. This could incur reputational damage for the protocol, and a very small amount of funds lost.
Manual Review.
Check for a minimum value for entranceFee in the constructor or increase the precision of the calculation.
like 1 wei
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.