MorpheusAI

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

`collectFees` Function Not Included in `IL2TokenReceiver` Interface

Summary

The L2TokenReceiver smart contract implements a collectFees function that is intended to collect fees from Uniswap v3 liquidity pools. However, this function is not declared in the IL2TokenReceiver interface, which the contract purports to implement.

This inconsistency can lead to integration issues with other contracts or services that rely on the IL2TokenReceiver interface for interaction.

Vulnerability Details

The IL2TokenReceiver interface is expected to declare all public and external functions that the implementing contract provides. The absence of the collectFees function declaration within the interface means that any external contract or service attempting to interact with the L2TokenReceiver contract through the IL2TokenReceiver interface reference will not be able to call the collectFees function, even though it is implemented by the contract.

Impact

The primary impact of this issue is on interoperability and contract composability. Contracts or services that use the IL2TokenReceiver interface to interact with instances of L2TokenReceiver will not recognize the collectFees function, potentially breaking functionality or leading to the development of incorrect or inefficient integrations.

Tools Used

Manual review

Recommendations

  • Update Interface: Add the collectFees function declaration to the IL2TokenReceiver interface to ensure consistency and correct interfacing. The declaration should match the function signature in the L2TokenReceiver contract.

    Example update to the interface:

interface IL2TokenReceiver {
// Existing function declarations...
function collectFees(uint256 tokenId_) external returns (uint256 amount0_, uint256 amount1_);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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