Normal behaviour: When 3 days since the NFT listing have passed and no bids have been made in that time period, the NFT should be returned back to the Seller.
Problematic behaviour: The 3 day initial auction duration is not currently enforced in the contract logic. In addition, the NFT is not automatically returned to the seller unless the seller calls the BidBeastsNFTMarketPlace::unlistNFT method.
Root cause:
The function below settles the auction for NFTs that had bidding activity and whose auctionEnd has passed, and does not return the NFT to the seller when no valid bids have been placed:
Likelihood: High
This oversight affects every listed NFT that has not received any valid bids.
Impact: Medium
Even though this logic error does not have any financial impact, it does break the intended protocol logic which dictates that NFTs will be returned automatically to their sellers when an auction has been settled.
The following test shows that settling an auction when more than 3 days have passed since the NFT listing does not return the NFT to the seller.
Run the test with forge test --mt test_settleAuction_DoesNotReturnNFTToSellerIfNoBids.
To address this logic error:
A.  add the 3 day auction duration logic in the contract:
See reported vulnerability H-3
B. Add an internal function that transfers the NFT back to the seller:
C. Integrate the _returnNFT function in the settleAuction logic. However, this first requires addressing the reported logic error as shown in H-3.
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.