Utilizing division for both awards and expenses, but calculation errors may cause the sum to be incorrect when added together.
The formula is as follows
uint256 prizePool = (totalAmountCollected * 80) / 100;
uint256 fee = (totalAmountCollected * 20) / 100;
These are expected to add up to totalAmountCollected, but may not actually do so due to rounding errors. This may prevent withdrawFees() from passing require(address(this).balance == uint256(totalFees)).
Failure to extract expenses
Manual
Recommend the following
uint256 prizePool = (totalAmountCollected * 80) / 100;
uint256 fee = totalAmountCollected - prizePool
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.