The Admin/Owner of the FjordAuctionFactory can create a new auction by calling createAuction(). During the creation process, the owner transfers auction tokens to the newly deployed auction contract. Users can bid and unbid before the auctionEndTime. However, if the totalBids amount is zero at the end of the auction, all the auction tokens become stuck in the contract and cannot be recovered.
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordAuctionFactory.sol#L52
The above function allows the owner of the FjordAuctionFactory to create an auction and transfer totalTokens (the auction tokens) to the deployed auction contract.
https://github.com/Cyfrin/2024-08-fjord/blob/main/src/FjordAuction.sol#L193
The auctionEnd() function determines the total claimable tokens for each bidder based on their bids. If totalBids equals zero, the function is designed to transfer the auction tokens back to the owner as a recovery mechanism. However, the issue arises because the owner of the FjordAuction is the deployer, which in this case is the FjordAuctionFactory.
Consequently, the transferred tokens are sent back to the AuctionFactory, where they become stuck with no way to recover them
Auction token will stuck in the contract
Manual
Instead of transferring the tokens back to the FjordAuctionFactory contract, they should be sent to the actual owner of the FjordAuctionFactory who created the auction.
An auction with 0 bids will get the `totalTokens` stuck inside the contract. Impact: High - Tokens are forever lost Likelihood - Low - Super small chances of happening, but not impossible
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.