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

Solidity version 0.8.23 may not work on `Arbitrum` chain due to `PUSH0` opcode

Summary

According to the documentation, the contract VotingBooth.sol is intended to be deployed on the Arbitrum network using solidity version 0.8.23:

Solc Version: 0.8.23
Chain(s) to deploy contract to:
Arbitrum

The project uses the solidity version ^0.8.23 and the contract will be deployed on Arbitrum. The latest solidity version is 0.8.23, but the problem with compiling is that Arbitrum is NOT compatible with solidity version 0.8.20 and later.

Vulnerability Details

The compiler for Solidity 0.8.20 switches the default target EVM version to Shanghai, which includes the new PUSH0 opcode. This opcode is not yet implemented on some L2s including Arbitrum, meaning contracts deployed on those chains will be non-functional. The contract VotingBooth.sol uses a solidity version 0.8.23 and after deploying on Arbitrum the contract will be unusable.

Impact

Corrupted or non-functional contracts when deployed on Arbitrum.
Here is a link to the Arbitrum documentation:
https://docs.arbitrum.io/for-devs/concepts/differences-between-arbitrum-ethereum/solidity-support

Tools Used

Manual Review

Recommendations

Use the latest compatible with Arbitrum solidity version that is 0.8.19.

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.