The end
function finalizes the auction, but it does not check whether the highest bid is greater than zero. If no bids were placed, the NFT would remain locked in the contract and be transferred to the contract address.
In the end
function:
If no bids are placed, the highest bidder remains the NFT owner (as it was set to the owner during start
), but the function still attempts to transfer the NFT. This could result in the NFT being locked in the contract if no valid bids are made.
If no bids are made, the NFT could be locked in the contract, and the owner may lose access to it.
Manual code review
Before transferring the NFT, ensure that the highest bid is greater than the starting price and greater than zero:
Alternatively, return the NFT to the owner if no valid bids are made.
If there are no placed bids in the auction, the `end` function will always revert. The owner can not receive back the nft ant it will be locked in the contract.
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.