The payout math splits the collected ETH 80/20 between the winner and the fee.
Slither flags a divide-before-multiply precision loss, but the dangerous pattern is (a / b) * c (divide first, then amplify). Every expression here multiplies before it divides ((x * 80) / 100), so truncation happens only on the final / 100 and is never amplified. The detector matches on * and / without checking their order.
Likelihood:
When entranceFee is set to a contrived sub-100-wei value, so totalAmountCollected is not a multiple of 5.
Impact:
At worst, ~2 wei of dust is stranded. For any realistic entranceFee the remainder is exactly zero.
Only a contrived entranceFee below 100 wei produces a 1–2 wei remainder — economically irrelevant.
No change required; the operation order is already correct. For defensiveness, derive one share by subtraction so the two always sum exactly:
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.