Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1 KB

077.md

File metadata and controls

30 lines (19 loc) · 1 KB

Slow Ocean Seahorse

Medium

CREATE opcode works differently in the zkSync chain

Summary

zkSync mainnet chain has differences in the usage of the create opcode compared to the EVM.

According to the mentioned details, the protocol can be deployed in zkSync mainnet.

Ethereum, Arbitrum, Rari Chain, zkSync Mainnet, Base, Polygon, OP Mainnet.

Vulnerability Detail

The zkSync Era docs explain how it differs from Ethereum.

Check the description of CREATE (zkSynce Era Docs) and it is also stated that Create cannot be used for arbitrary code unknown to the compiler.

Impact

zkSync uses a different compilation and deployment process than Ethereum. Deployment might fail.

Code Snippet

https://github.com/sherlock-audit/2024-11-tally/blob/main/staker/src/extensions/GovernanceStakerDelegateSurrogateVotes.sol#L45

Tool used

Manual Review

Recommendation

use create2 instead.