The contract calculates a protocol fee as a percentage of the total pot. However, since both totalPot
and PROTOCOL_FEE_PERCENT
are integers and Solidity does not support floating-point arithmetic, the fee calculation might lose precision — especially with small totalPot
values or low percentages.
Solidity performs integer division, which truncates any decimal values.
if totalPot = 5
and PROTOCOL_FEE_PERCENT = 2
, the actual fee should be 0.1
, but the result will be 0
due to truncation.
Manual review
Add minimum fee threshold
The tie-handling logic loses one wei due to integer division
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.