sherlock-audit / 2024-04-titles-judging

1 stars 1 forks source link

maushish - The project may fail to be deployed to chains that do not support the `PUSH0` opcode. #340

Closed sherlock-admin3 closed 2 months ago

sherlock-admin3 commented 2 months ago

maushish

medium

The project may fail to be deployed to chains that do not support the PUSH0 opcode.

Summary

Vulnerability Detail

As clearly mentioned in the readme file image Contracts will be getting deployed to multiple chains out of these chains zkSYNC doesnt support PUSH0 opcode yet. Due to which the bytecode generated by the contracts will not be compatible with the zkSync chain. This could also become a problem if different versions of Solidity are used to compile contracts for different chains. The differences in bytecode between versions can impact the deterministic nature of contract addresses, potentially breaking counterfactuality.

Impact

Explained above

Code Snippet

As of now Optimism, Arbitrum, supports PUSH0 opcode. here you can check the evm opcodes https://github.com/sherlock-audit/2024-04-titles/blob/main/wallflower-contract-v2/src/TitlesCore.sol#L2

Tool used

Manual Review

Recommendation

remove the support of zkSync for now or use 0.8.19.

Duplicate of #238