MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: medium
Invalid

Use safeTransfer/safeTransferFrom consistently instead of transfer/transferFrom

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.

Details

It is good to add a checks the return value of token transfers by using OpenZeppelin’s safeTransfer/safeTransferFrom unless one is sure the given token reverts in case of a failure.
Failure to do so will cause silent failures of transfers and affect token accounting in contract.

Recommendations

Consider using safeTransfer/safeTransferFrom instead of transfer/transferFrom consistently.

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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