MorpheusAI

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

Usage of Transferfrom/Transfer in SwapRouterMock.sol/GatewayRouterMock.sol

Summary

Usage of TransferFrom & Transfer can have a huge potential risk, some tokens are accepted in the ERC20 environment but do not implement the correct standard, such as USDT which does not return a value, when these tokens are used and called it will not match the required signature

Vulnerability Details

https://github.com/Cyfrin/2024-01-Morpheus/blob/07c900d22073911afa23b7fa69a4249ab5b713c8/contracts/mock/SwapRouterMock.sol#L9-L10
https://github.com/Cyfrin/2024-01-Morpheus/blob/07c900d22073911afa23b7fa69a4249ab5b713c8/contracts/mock/GatewayRouterMock.sol#L15

Impact

This can inevitably lead to transactions being able to pass whilst they should fail, and can ultimately end up in a loss of wealth or undesired behavior from the system

Tools Used

Manual review

Recommendations

Make sure to implement SafeTransferFrom & SafeTransfer

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.