In the NFTLiquidator contract, if no bids are placed on an NFT during the auction, the NFT remains locked in the contract, and the auction cannot be ended successfully. This issue arises because the endAuction function reverts with the NoBidsPlaced error if no bids have been placed. As a result, the NFT cannot be reclaimed, re-auctioned, or transferred back to the original owner, leading to a permanent lock of the NFT in the contract.
The vulnerability is found in the endAuction function of the NFTLiquidator contract. The function checks if any bids have been placed by verifying if data.highestBidder is not the zero address. If no bids have been placed, the function reverts with the NoBidsPlaced error, preventing the auction from being ended and the NFT from being transferred out of the contract.
The impact of this vulnerability is significant as it leads to the permanent lock of the NFT in the NFTLiquidator contract if no bids are placed during the auction. This prevents the NFT from being reclaimed, re-auctioned, or transferred back to the original owner, resulting in a loss of the NFT.
Manual review
To fix this vulnerability, the endAuction function should be modified to include a fallback mechanism that allows the NFT to be reclaimed, re-auctioned, or transferred back to the original owner if no bids are placed. Here are some recommendations:
Allow Original Owner to Reclaim NFT: Implement a function that allows the original owner to reclaim the NFT if no bids are placed during the auction.
Allow Contract Owner to Re-Auction NFT: Implement a function that allows the contract owner to re-auction the NFT if no bids are placed during the initial auction.
Implement Grace Period for Re-Auction: Implement a grace period during which the NFT can be re-auctioned if no bids are placed.
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.