list() enforces _price >= MIN_PRICE (1 USDC), ensuring listings are created at a meaningful minimum.
updatePrice() only checks _newPrice > 0, so a seller can update an existing listing to a price of 1 unit (0.000001 USDC) after it has been created. The minimum price invariant can be bypassed through this path.
Likelihood: High
Any whitelisted seller can call updatePrice() on their active listing at any time with no special conditions.
The check _newPrice > 0 is trivially satisfied by setting _newPrice = 1.
Impact: Medium
Breaking the minimum price invariant enables a front-running attack: a seller sees a buyer's approve(contract, 500e6) transaction in the mempool and front-runs it with updatePrice(listingId, 1). The buyer's subsequent buy() call completes and pays 1 unit (0.000001 USDC) for the NFT instead of the expected price.
Any off-chain tool or aggregator that caches listing prices will show stale data, leading to purchases at unintended prices.
A seller lists at 500 USDC (valid). They then update the price to 1 unit before the buyer's transaction executes, causing the buyer to pay essentially nothing.
Apply the same MIN_PRICE check in updatePrice() as is already present in list().
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.
The contest is complete and the rewards are being distributed.