The intended behavior:
Takes the previous bid amount
Calculates a 5% increase (using S_MIN_BID_INCREMENT_PERCENTAGE = 5)
Requires new bid to be at least this increased amount
Prevents small bid increments and ensures meaningful price discovery
Vulnerability:
The BidBeastsNFTMarket contract contains a precision loss vulnerability in its bid increment calculation. The current implementation performs division before multiplication, leading to truncation of values due to Solidity's integer arithmetic. This allows users to place bids lower than the intended minimum increment amount.
Bidders can place bids lower than intended minimum increment
Protocol receives less in bid increments than designed
Compounds with each bid, leading to accumulated value loss
Sellers receive less value than protocol design intended
Likelihood:
Medium - Allows bids below intended minimum increment
Impact:
High - Occurs with most bid amounts not divisible by 100
The above PoC demonstrates that:
A bid of 1050 wei is accepted when it should require 1055 wei
This represents a 5 wei loss in the minimum increment
The issue compounds with larger numbers and subsequent bids
Affects any bid amount not perfectly divisible by 100
These changes ensure:
No precision loss in bid calculations
Consistent and accurate minimum bid requirements
Better maintainability and clarity of code
Proper test coverage for edge cases
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.