20,000 USDC
View results
Submission Details
Severity: medium

Use safeTransfer/From instead of transfer/From

Summary

Use safeTransfer/From instead of transfer/From

Vulnerability Details

Tokens not compliant with the ERC20 specification could return false from the transfer function call to indicate the transfer fails, while the calling contract would not notice the failure if the return value is not checked.

It has more than 40 instances, so I will just add one relevant GitHub link.

Tools Used

Manual review

Recommendations

Use the SafeERC20 library implementation from OpenZeppelin and call safeTransfer or safeTransferFrom when transferring ERC20 tokens.

Support

FAQs

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