20,000 USDC
View results
Submission Details
Severity: medium

Using transfer/transferFrom on ERC20 tokens transfer

Summary

The transfer/transferFrom() method is used instead of safeTransfer/safeTransferFrom which is not recommended.

Vulnerability Details

OpenZeppelin’s documentation discourages the use of transferFrom(), use safeTransferFrom() whenever possible.
Some tokens do not implement the ERC20 standard properly but are still accepted by most code that accepts ERC20 tokens.

Impact

Some erc20 tokens like Tether (USDT)'s transfer() and transferFrom() functions on L1 do not return booleans as the specification requires, and instead have no return value. When these sorts of tokens are cast to IERC20, their function signatures do not match and therefore the calls made, revert.

Tools Used

Manual Code Review

Recommendations

Use OpenZeppelin’s SafeERC20's safeTransfer/safeTransferFrom over transfer/transferFrom when exercising.

Support

FAQs

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