The NFTLiquidator
contract implements an auction mechanism for liquidated NFTs. Users can place bids using the placeBid()
function, which automatically refunds the previous highest bidder when a new higher bid is placed.
The placeBid()
function uses Solidity's native transfer()
to refund the previous highest bidder. This creates a potential denial-of-service vulnerability because transfer()
only provides 2300 gas stipend to the recipient, which is insufficient if the recipient is a contract with a complex receive()
or fallback()
function.
If the current highest bidder is a malicious contract that intentionally fails to accept ETH transfers (by implementing a receive()
function that reverts or consumes more than 2300 gas), subsequent bidders will be unable to place new bids as the refund transaction will always fail.
High. This vulnerability can completely freeze the auction mechanism for any NFT where a malicious contract becomes the highest bidder. The auction cannot proceed as new bids will always fail, and the NFT becomes permanently stuck in the auction state unless bought back through the buyBackNFT()
function at a premium.
High. The attack requires minimal resources (just deploying a simple contract) and has no external dependencies or timing constraints. Any actor can execute it at any time during an auction.
Attacker deploys a contract with a receive()
function that always reverts:
Attacker uses the malicious contract to place a bid on a valuable NFT
Any subsequent attempt to place a higher bid will fail because the contract cannot refund the attacker's bid
The NFT remains stuck in auction until someone pays the buyback premium
Replace the transfer()
call with a "pull over push" pattern where bid refunds are stored in a mapping and claimed separately:
This pattern allows the auction to proceed normally even if a bidder cannot receive refunds, as they can claim their refund later using the claimRefund()
function.
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.