BidBeastsNFTMarket:placeBid Function: Incorrect Calculation Logic Causes Bid Amount to Round DownUnder normal circumstances, when the placeBid function handles a buyer placing a bid in an auction, starting from the second bid, each subsequent bid amount must be greater than the previous bid.
However, due to an error in the bid calculation logic, subsequent bid amounts may be rounded down, meaning the next bid might not actually reach the intended 5% increase.
The relevant code in BidBeastsNFTMarketPlace.sol is as follows:
Likelihood:
This calculation logic is triggered every time a buyer places a subsequent bid.
Impact:
While there is no direct fund loss, it could allow the next minimum bid to be slightly lower than the true 5% increase, which violates the protocol's intended design.
The original code performs division first, followed by multiplication, which is a clear source of precision loss.
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.