FjordAuction lacks proper error handling for token transfers and doesn't account for potential transfer restrictions in the auctionToken. This may lead to stuck tokens and failed distributions most especially if the auctionToken implements transfer restrictions like blacklisting.
The claimTokens function in the FjordAuction contract performs a token transfer without checking for its success:
If the auctionToken transfer fails (e.g., due to a blacklist or other transfer restrictions), the function will not revert. This results in the user's bid being set to 0 without receiving tokens, effectively losing their claim to the auction proceeds.
One may ask how this affects the protocol. Now, if a blacklisted user participates in the auction and the distribution of tokens fails due to the blacklist, the auction tokens could become stuck in the contract. This means the protocol loses control over these assets. Also the auctionEnd function might not be able to complete its execution if it can't distribute tokens to all participants. This could leave the auction in an incomplete state.
Bear it in mind that USDC & USDT implement blacklisting feature to block suspicious users. This can become an issue if one of the approved holders is blacklisted by these tokens. The token transfer to these users will fail and will also brick the distribution system because the blacklisted user is never cleared.
USDC implements a blacklist function and these accounts cannot receive USDC:
Users may lose their rightful claim to auction tokens if the transfer fails. Also tokens can become permanently stuck in the contract if transfers to certain addresses are restricted.
Manual review
Implement a pull payment pattern for token distribution. Also consider implementing a recovery mechanism for stuck tokens, allowing the contract owner to rescue tokens in case of failed transfers. Ans lastly, consider using SafeERC20 from OpenZeppelin for safer token transfers.
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.