For this auction, there's a BidBeastsNFTMarketPlace::Listing.minPrice set by the seller, which, as the name suggests, is the minimum price at which the seller is willing to sell their NFT.
But the contract enforces that the first bid must be strictly greater than this minPrice, preventing bids exactly at minPrice (line 151 in BidBeastsNFTMarketPlace::placeBid):
Plus, it can be seen that both BidBeastsNFTMarketPlace::settleAuction and BidBeastsNFTMarketPlace::takeHighestBid functions checks if the highest bid is greater than or equal to (>=) the minPrice, indicating the seller's intent to accept bids at minPrice (lines 186 and 196 respectively):
This discrepancy forces bidders to overpay by at least 1 wei, creating unnecessary friction.
Likelihood: Medium
Occurs when a bidder tries to bid exactly at minPrice for the first bid.
Impact: Low
Bidders can't bid at the exact minimum price
No funds at risk, just a minimal overpayment of 1 wei
Add the following test test_cannotBidAtMinPrice in the test file:
Run the above test using the command:
The output we get:
Change the strict greater-than (>) to greater-than-or-equal-to (>=) in the placeBid function:
First bid validation uses > instead of >=, preventing valid starting bids.
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.