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

Solidity version 0.8.20 may not work on some L2s due to PUSH0

Summary

Solidity version 0.8.20 may not work on some L2s due to PUSH0.

Vulnerability Details

About reseed L2, sponsors confirm in discord:

L2: EVM equivalent L2s;
anything hardcoded in that relies on assumptions specific to eth mainnet would also be valid, regardless of L2. things like block time, gas costs, fee based ordering of transactions, available opcodes, etc.

Now beanstalk code is using 0.8.20. Not all L2s support PUSH0. Deploy solidity files using 0.8.20 on L2s which don't support PUSH0 will revert. Specific details is as follows:

L2 Support status Link
Arbitrum Yes https://docs.arbitrum.io/build-decentralized-apps/arbitrum-vs-ethereum/solidity-support#differences-from-solidity-on-ethereum
Optimism Yes https://docs.optimism.io/builders/node-operators/network-upgrades#canyon
Zksync No /
Blast Yes /
Base Yes /
Mode Yes /
Scroll Yes https://docs.scroll.io/en/technology/chain/differences
Linea No https://www.rollup.codes/linea
Polygon zkEVM Yes https://docs.polygon.technology/zkEVM/get-started/historical-data/?h=push0#20th-sep-2023
Mantle No https://docs.mantle.xyz/network/for-devs/solidity-support

Impact

Can't deploy the protocol.

Tools Used

manual

Recommendations

Don't reseed L2 which doesn't support PUSH0.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

Known - LightChaser

Support

FAQs

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