The FjordAuctioncontracts are deployed from the FjordAuctionFactorycontract via the createAuctionfunction here: https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuctionFactory.sol#L52-L66
Then the auction creater transfers the auction tokens to the new auction contract as seen below in the function.
The FjordAuctioncontract is initialized as ```
as seen here: https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L134
Interestingly, the FjordAuctioncontract sets the msg.senderas the owneras `
This effectively ensures that the FjordAuctionFactorycontract is the ownerof the newly deployed auction contracts.
Now, in the event an auction ends and auctionEndfunction is called and there is no bids in the auction such that totalBids == 0then the auction tokens initialized in the auction contract is sent to the owneraddress which is the FjordAuctionFactorycontract as seen here: https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L193
The FjordAuctionFactorycontract on the other hand has no mechanism to withdraw any tokens sent to it. This effectively locks these auction tokens sent to the factory contract forever.
In auctions where zero bids are submitted, the auction tokens will be locked in the factory contract with no mechanism to withdraw it.
Consider implementing a withdraw mechanism in the Factory contract to withdraw tokens.
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.