The FjordAuction contract incorrectly assigns ownership to the FjordAuctionFactory during deployment. This design flaw results in auction tokens being sent to the factory contract in the event of no bids, making the tokens irrecoverable. The issue arises because the FjordAuctionFactory is not equipped to handle or recover these tokens, leading to potential loss of funds.
The root cause of the vulnerability is that ownership of the FjordAuction contract is assigned to the FjordAuctionFactory contract instead of an external account (EOA).
Found in src/FjordAuctionFactory.sol at Line 59
@>:
FjordAuctionis deployed byFjordAuctionFactory, which makesmsg.senderFjordAuctionFactory's address inFjordAuction's constructor
Found in src/FjordAuction.sol at Line 134
@>:
msg.senderisFjordAuctionFactoryaddress
This setup leads to a situation where, in case of no bids, auction tokens are sent to the factory contract.
Found in src/FjordAuction.sol at Line 193
@>: owner is
FjordAuctionFactorywhich is not equipped to handleauctionToken. In case of no bids, the returnedtotalTokensamount ofauctionTokenwill be stuck inside theFjordAuctionFactory
This vulnerability is critical because it results in the permanent loss of auction tokens when there are no bids. Since the FjordAuctionFactory is a contract and not an EOA, it cannot recover the tokens sent to it, leading to irreversible loss of funds.
Run: forge test -vvv --mc TestAuctionPOC --mt testAuctionEndWithNoBids
A PASS result confirms the auctionToken will be stuck inside auctionFactory permanently.
Foundry test
Forward the actual FjordAuctionFactory owner's address, which should be an EOA (externally owned account) to the FjordAuction contract. This ensures that the correct owner can recover the tokens if the auction receives no bids.
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.