Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

Unsafe use of transfer and transferFrom functions

Summary

the use of transfer and transferFrom functions for ERC20 token transfers. These functions, while widely used, can lead to unexpected failures and incompatibility with certain tokens due to their reliance on ERC20 standards that are not consistently followed by all tokens.

Vulnerability Details

The protocol uses unsafe transfer and transferFrom functions in Swan::transferRoyalties` Swan::purchase

Impact

If the transfer fails (e.g., due to insufficient balance, allowance issues, or non-standard return values), transfer and transferFrom may not revert, causing the contract to continue under the assumption that the transfer was successful.

Tools Used

Manual Review

Recommendations

Replace instances of transfer and transferFrom with safeTransfer and safeTransferFrom from OpenZeppelin’s SafeERC20 library.

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

[KNOWN] - Low-35 Unsafe use of transfer()/transferFrom() with IERC20

Support

FAQs

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