Description
The protocol does not provide a mechanism for the NFT owner to recover their NFT in the event that a) there are no bids or b) the highest bid does not exceed the reserve price. The StarknetAuction::end
function correctly sends the NFT to the winning bidder:
The StarknetAuction::start
function transfers the ownership of the NFT for auction to the StarkNetAuction contract.
The StarknetAuction::withdraw
function allows losing bidders to withdraw their bid ERC20 tokens. It also allows the contract/NFT owner to withdraw the value of the winning bid. However, there is no provision to allow the NFT owner to transfer ownership of the NFT back to themselves where a sale is not completed.
Impact:
Where no sale is completed, the NFT owner loses ownership of their NFT; the NFT for sale is locked in the StarknetAuction
Recommended Mitigation:
The protocol should create a new method: StarknetAuction::withdrawNFT
This function should be called only by the contract owner and after the auction has ended. The StarknetAuction::ended
is set in the StarknetAuction::end
method. The NFT will have already been transferred to the highest bidder and is no longer in the ownership of the contract by the time the new method is called.
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.