The placeBid function calculates the minimum required bid amount based on the previous bid and an increment percentage
The calculation (previousBidAmount / 100) * (100 + S_MIN_BID_INCREMENT_PERCENTAGE) suffers from precision loss due to integer division, resulting in lower required bid amounts than intended
Likelihood: HIGH
Occurs on every bid calculation where previousBidAmount is not a multiple of 100
Integer division always rounds down in Solidity
Impact: MEDIUM
Required bid increments will be lower than the intended 5%
For a bid of 123 wei, next required bid would be 105 wei instead of 129 wei
Change the order of operations to perform multiplication before division to avoid precision loss in the bid increment calculation.
Integer division in requiredAmount truncates fractions, allowing bids slightly lower than intended.
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.