Normal behavior: Compute required bid as previous × (100 + increment) / 100 with correct rounding down.
Issue: Current code divides first then multiplies, causing underestimation by truncation for many values.
155:158:2025-09-bid-beasts/src/BidBeastsNFTMarketPlace.sol
Likelihood:
Triggers whenever previousBidAmount % 100 != 0
Common in typical bidding amounts
Impact:
Allows slightly smaller-than-intended bids to be accepted
Minor revenue loss for sellers
Important detail (integer math)
Because Solidity uses integer division, the current order divides first, then multiplies:
Current: (prev / 100) * 105
Safer: (prev * 105) / 100
These are not always equal due to truncation. Example:
prev = 101 wei, 5%
Current: (101/100)=1 → 1105=105
Correct: (101105)/100 = 106 (truncates from 106.05)
Result: the current code underestimates by 1 wei, allowing a slightly smaller bid than intended.
This method preserves more precision before the final truncation.
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.