Description: The new bid requiredAmount is calculated base on the previous bid amount plus a percentage increment. however, the calculation does division before multiplication, leading to potential precision loss due to integer division truncation.
Impact: This precision loss can lead to scenarios when the initial bid is low, resulting in a lower than expected requiredAmount for subsequent bids.
Proof of Concept: Add the following test to BidBeastMarketPlaceTest.t.sol and run testSubsequentBidsRequireLowerThanInitBid
Recommended Mitigation:
reorder the calculation in BidBeastNFTMarletPlace:placeBid to perform multiplication before division to maintain 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.