Beginner FriendlyFoundryBridge
100 EXP
View results
Submission Details
Severity: low
Valid

Solidity version 0.8.20 might not work on all EVM-compatible chains and L2s due to `PUSH0` opcode

Summary

All files is scope have solidity version fixed to 0.8.20. This version uses PUSH0 opcode which is not yet available on all EVM-compatible chains and L2s.

Details

All contracts in scope have solidity version fixed to 0.8.20. This version of the compiler uses the new PUSH0 opcode which was introduced in the Shanghai hardfork. This is now the default EVM version in the compiler.

Thunder Loan is currently on Ethereum chain only but it might eventually be on other chains and L2s such as Arbitrum for example.

Arbitrum does not yet support PUSH0 opcode (issue already raised here) so Thunder Loan might be deployed there with malformed bytecode which could introduce many unknown issues.

Filename

  • src/L1BossBridge.sol

  • src/L1Token.sol

  • src/L1Vault.sol

  • src/TokenFactory.sol

Permalinks

Impact

Contracts might get deployed in malformed state and be completely unusable in other chains that do not yet support PUSH0 opcode.

Recommendations

Modify pragma in all in-scope contracts to exclude version 0.8.20. For example:

pragma solidity 0.8.19;

Tools Used

  • Manual Audit

  • Foundry

Updates

Lead Judging Commences

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

zksync lack support for PUSH0

Support

FAQs

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