DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Invalid

Not all L2 chains are compatible with EIP-5656.

Summary

EIP-5656: https://eips.ethereum.org/EIPS/eip-5656

This report describes a potential compatibility issue introduced in Solidity version 0.8.24 with the introduction of the new MCOPY opcode.

Vulnerability Details

Solidity version 0.8.24 introduces a new opcode, MCOPY, which optimizes memory copying. While this improves performance, there is a risk that not all chains and Layer 2 (L2) solutions will implement this opcode in the near future. This could lead to compatibility issues and reduced portability of smart contracts written using MCOPY.

These are some L2 files:

ReseedBarn.sol: https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/beanstalk/init/reseed/L2/ReseedBarn.sol#L5

BeanL1RecieverFacet.sol: https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/beanstalk/migration/BeanL1RecieverFacet.sol#L5

Impact

Smart contracts written using the MCOPY opcode may not function correctly or at all when deployed on chains or L2s that do not yet support it. This could result in unexpected behavior, potential security vulnerabilities, and hinder the deployment flexibility of such contracts.

Tools Used

Recommendations

Use an earlier version of Solidity prior to 0.8.24 that does not include the MCOPY opcode.

Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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