DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Transfer of auctionToken may fail

Vulnerability Details

In the FjordAuction contract, standard transfer is used for the auctionToken, which can be any ERC20 token.
The transfer occurs in auctionEnd and claimTokens as seen below

function auctionEnd() external {
// ...
if (totalBids == 0) {
auctionToken.transfer(owner, totalTokens);
return;
}
//..
}
function claimTokens() external {
// ...
auctionToken.transfer(msg.sender, claimable);
}

This is problematic because:

  • Some tokens don't revert on failure but return false.

  • Not all ERC20 tokens return a boolean value for transfer

Impact

The transfers could fail silently for certain tokens, leading to a situation where the auction ends or tokens are claimed, but the actual token transfers doesn't occur.

Tools Used

Manual Review, foundry

Recommendations

Use openzeppelin's or solmate's SafeTransferLib for the ERC20 auctionTokens.
In auctionEnd

- auctionToken.transfer(owner, totalTokens);
+ auctionToken.safeTransfer(owner, totalTokens);

In claimTokens

- auctionToken.transfer(msg.sender, claimable);
+ auctionToken.safeTransfer(msg.sender, claimable);
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.