The FjordAuction contract when created through the AuctionFactory, inncorrectly assigns ownership to the factory contract address instead of the intended owner (i.e the factory owner). This ownership flaw can cause loss of funds and lack of proper control over individual auctions.
In the FjordAuction contract, the owner is set in the constructor:
The AuctionFactory creates new FjordAuction contracts using:
As a result, msg.sender in the FjordAuction constructor is the AuctionFactory contract address, not the factory owner or the user who initiated the auction creation.
Which means that this incorrect ownership becomes problematic in scenarios such as when no bids are placed:
In this case, tokens would be transferred to the AuctionFactory contract instead of the intended owner.
The factory owner loses direct control over individual auctions, as they are not set as the owner. Also in scenarios where funds should be returned to the auction creator (e.g., no bids placed), the funds will instead be sent to the factory contract which may become irretrievable.
Also, aany future functions added to FjordAuction that rely on onlyOwner modifiers would be unusable, as the true owner cannot call them.
Manual review
These are just my personal suggestions that I think will work:
Firstly, consider modifyiing the FjordAuction constructor to accept an explicit owner address:
Then update the createAuction function in AuctionFactory to pass the factory owner as the auction owner:
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.