The bid increment calculation in placeBid() performs division before multiplication, causing precision loss for amounts that are not evenly divisible by 100. This results in accepting bids that are lower than the intended 5% increment.
Likelihood:
The problem is integer division truncation. When previousBidAmount is divided by 100 first, any remainder is lost, leading to imprecise calculations.
Impact:
Precision Loss: Bidders can submit lower bids than intended due to truncation.
Change the calculation order to preserve precision:
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.