Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

Compiler Version Incompatibility with Layer 2 Networks: Deployment Issues on Arbitrum

Summary

The protocol employs Solidity compiler version 0.8.23, yet it aims for deployment on Arbitrum, a Layer 2 (L2) network. However, this introduces bytecode complications involving the PUSH0 opcode, which is incompatible with Arbitrum. The recommended solution is to either revert to Solidity compiler version 0.8.19 or incorporate evm_version = "paris" in the foundry.toml configuration file to ensure compatibility with Arbitrum.

Vulnerability Details

The issue lies in the bytecode generated by Solidity compiler version 0.8.23, specifically with the PUSH0 opcode, causing deployment failures on L2 networks like Arbitrum. This arises due to the lack of support for PUSH0 on certain L2 networks.

Impact

Deployment failures on Arbitrum or other L2 networks pose a significant hindrance to the protocol's successful launch. The incompatibility may affect the functionality and accessibility of the protocol on these networks.

Tools Used

  • Manual Review

Recommendations

To address the problem, the recommended course of action is to downgrade the Solidity compiler version to 0.8.19 or insert evm_version = "paris" in the foundry.toml configuration file. This ensures alignment with L2 networks like Arbitrum, avoiding deployment failures and ensuring the protocol's compatibility.

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

PUSH0 not supported for solidity solidity ^0.8.20

Support

FAQs

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