If an auction ends with no bids the auctioned tokens will be stuck in FjordAuctionFactory
because it is the owner of the FjordAuction
contract.
When the bidding time passes someone needs to call FjordAuction::auctionEnd()
to end the auction and enable users to claim their share of the auctioned token. The problem arises when there are no bids totalBids = 0
because then the tokens are transferred to the owner of the auction, however this owner is not the expected one. We can see below that when totalBids = 0
the auctioned tokens are transferred to the owner:
And if we look at the place where that owner is set we come to the constructor
of FjordAuction
contract:
This means that whoever deployed this auction contract will be the owner of it.
Now, the problem is that this owner is actualy the AuctionFactory
contract because it is the deployer of all the auctions as it can be seen in AuctionFactory::createAuction()
:
Because of this, the FjordAuction::owner
will be the AuctionFactory
contract and when an auction ends with no bids the auctioned tokens are transferred to the AuctionFactory
contract and they end up stuck there because that contract doesn't implement any functions that allow the withdrawals of such tokens.
Stuck tokens in AuctionFactory
. This means the actual owner of the auction is left with no tokens even when there are no bids.
Manual Review
In FjordAuction
set the owner
variable through the constructor arguments and to msg.sender
. It would look like this:
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.