Contract Deployment Vulnerability in zkSync L2 Environment
##Summary
The deployToken function, designed for contract deployment on zkSync L2, has been identified with a critical incompatibility issue. This stems from zkSync's unique contract deployment requirements, which are not met by the current implementation.
The function dynamically deploys contracts using provided bytecode at runtime. However, zkSync's compiler requires knowing the full bytecode at compile time for correct operation.
zkSync utilizes the hash of contract bytecode for deployment, contrasting with Ethereum's model. This requirement ensures that the bytecode of all deployable contracts is known before deployment, which is not the case in the deployToken function.
Deployment Failure: Any attempt to deploy contracts through this function on zkSync will result in failure, as the bytecode is not pre-known to the compiler.
Operational Breakdown: The factory pattern used in deployToken is ineffective under zkSync's architecture, leading to a breakdown in the intended functionality of the contract.
Refactor deployToken to include the bytecode of deployable contracts within the contract. This ensures the compiler knows the bytecode in advance.
Perform a comprehensive compatibility review to ensure all aspects of the contract align with zkSync's unique operational model.
To ensure successful deployment and functionality on zkSync L2, significant modifications to the deployToken function are required. Adapting to zkSync's deployment method is essential for the contract's effective operation in this environment.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.