MorpheusAI

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

Lack of approve Return Value Check in L1Sender Contract

Summary

The L1Sender contract has a vulnerability where it fails to check the return value of the approve function when interacting with ERC-20 tokens. This may lead to potential issues if the approval fails, and the contract does not handle this scenario appropriately.

Vulnerability Details

In the L1Sender contract, specifically in lines 69, 76, 91, and 95, there is a call to the approve function without checking the return value. The approve function in ERC-20 contracts returns a boolean indicating the success or failure of the approval. Failing to check this return value may result in unexpected behavior if the approval fails.

Impact

The impact of this vulnerability is primarily related to the approval mechanism for ERC-20 tokens. If the approve function fails, it may lead to unexpected behavior, potentially causing the contract to be unable to perform certain actions that require token transfers.

Tools Used

No specific tools were used for this analysis. The vulnerability was identified through manual code review.

Recommendations

It is recommended to enhance the security of the L1Sender contract by checking the return value of the approve function and handling the case where the approval fails. This can be achieved by using safer approval patterns, such as those provided by the TransferHelper.safeApprove method from the Uniswap v3 periphery library or the SafeERC20.forceApprove method from the OpenZeppelin SafeERC20 library.

Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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