Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: medium
Invalid

PUSH0 opcode is not supported in Arbitrum

Summary

Due to Arbitrum not supporting the PUSH 0 opcode introduced with Solidity version 0.8.20, contracts may be deployable but will be non-functional.

Vulnerability Details

The entire protocol has been developed using Solidity version 0.8.21. In doing so, we must verify that all the chains on which we aim to deploy support the Shanghai hard fork, which is associated with Solidity version 0.8.20 (where the PUSH 0 was added). An example of a chain that does not support this is Arbitrum.

Impact

Using Solidity 0.8.21 to compile the protocol's code could result in compatibility issues on blockchains that haven't implemented the Shanghai hard fork updates.

While it might appear feasible to compile the protocol using a lower version, such as 0.8.19, specifically for chains that don't support the latest updates (like Arbitrum), this solution can introduce variability. Utilizing various compiler versions for different chains risks inconsistencies, especially concerning the predictable generation of contract addresses.

Tools Used

Manual Review

Recommendations

Alter the Solidity compiler to version 0.8.19 or select a predetermined EVM version that ensures compatibility with all blockchains intended for the protocol's support.

Updates

Lead Judging Commences

hans 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.