The full article can be found here.
zkSync 2.0 (zkEVM Era)
zkSync's zkEVM is one of the most anticipated projects heading into 2023. In April 2021, the ZkSync team announced zkSync 2.0 and its zkPorter technology, which aims to improve upon v1 and introduce the first zkEVM (EVM-compatible). Beyond the composability benefits, it also aims to provide ~$0.01 transactions by moving transaction data off-chain (Validium-style) and offering 20,000 transactions per second (TPS). So far, as of Q1 023, it has deployed its "Baby Alpha" mainnet with the full mainnet launch expected in H1 2023. Over 100 projects are looking to launch on it once live.
zkSync's emphasis on EVM compatibility is a crucial design decision, one that other ZK rollups, like current industry-leader Starkware, chose not to pursue. Beyond simply aiming for EVM compatibility, zkSync also looks to align itself more closely to Ethereum in other respects as well, including maintaining open-source libraries, pricing gas in ETH, and supporting Solidity.
The team has also prioritized security, conducting seven independent security audits, three internal audits, and two public security contests. zkSync also has an ongoing bug bounty program.
zkSync is compatible with the EVM at the language level. This means that zkVM compiles EVM languages, such as Solidity, into a VM that is compatible with SNARK. ZkSync achieves EVM compatibility by translating Solidity, the primary smart contract language on Ethereum, to Yul. Yul is an interim language that can be turned into bytecode for many virtual machines. The Yul code is then recompiled with the LLVM compiler framework into a proprietary, circuit-compatible set of zkEVM-specific bytecode.
This introduces a compiler risk into the protocol but also eliminates the need for validity proofs across the EVM execution steps, which should help when trying to decentralize the prover/protocol in the future. In terms of security, a bytecode-level zkEVM is the optimal solution but it comes with its own complexities and issues for developers. zkSync asserts that ~99% of L1 Solidity code may be deployed immediately to zkSync 2.0 without modification.
zkSync 2.0 supports EVM programming languages, such as Solidity, Yul, Vyper, and Rust and Zinc (2022). While Zinc is zkSync’s own specific “optimized” programming language, it isn’t required.
zkEVM Compiler. Source: Matter Labs
Another feature of zkSync’s zkEVM is the dynamic fee architecture. In an L2 rollup, the transaction cost is based on two values: (1) the computation cost required to complete the transaction and generate the validity proof, and (2) the amount of L1 gas required to finalize the transaction. zkSync 2.0 aims to give users more control over both aspects.
A significant portion of the overall transaction cost associated with rollups comes from part two: the data published to the L1 to ensure data availability. High congestion on the Mainnet will increase the rollup costs as well. However, zkSync 2.0 has added an option that restricts the amount of gas consumed per byte of calldata delivered to L1 to ensure the transaction won’t be conducted above a certain threshold. With this, transaction fees are predicted based on the anticipated system resources required and charged based on the actual system resources used.
zkPorter
Finally, one of the core visions for zkSync v2 is an off-chain data availability solution dubbed ‘zkPorter.’ This solution is intended to complement the rollup component of zkSync 2.0, meaning rollup contracts and accounts will be able to interact with zkPorter accounts and vice versa. Off-chain data availability in zkPorter will be secured by so-called ‘guardians’ who stake zkSync tokens and sign blocks to confirm data availability in zkPorter accounts. With their stakes on the line, guardians are motivated to ensure there are no data availability failures. Moreover, Matter Labs claims that zkSync’s proof-of-stake is significantly more secure than PoS in alternative scaling solutions, such as sidechains, because guardians can't steal funds.
zkPorter is the internal consensus mechanism for data availability within zkSync 2.0, enabling large TPS numbers. zkSync 2.0 can handle ~1,000 to 5,000 TPS as a standard ZKR, but zkPorter can accommodate ~20,000 to 100,000 TPS (depending on the complexity of each transaction).
However, when using zkPorter, the user relies on zkSync's internal consensus mechanism. This requires the user to trust Matter Labs and rely on a far less secure or decentralized rollup solution that leverages L1’s consensus mechanism.
The good news is that users can choose either option based on their preferences and the trade-offs. Each user can choose their amount of security. zkPorter will offer negligible cost but lower security for trivial transactions, and the ZK-rollup mode offers maximum security.
Both parts will be composable and interoperable: contracts and accounts on the ZK-rollup side will be able to seamlessly interact with accounts on the zkPorter side and vice versa. Off-chain data availability in zkPorter will be secured by parties called “guardians.”
Guardians stake zkSync tokens and sign blocks to confirm data availability in zkPorter accounts. With their stakes on the line, guardians are motivated to ensure there are no data availability failures. As a result, zkPorter’s off-chain DA system is more decentralized for zkPorter as DA is guaranteed by this network of guardians incentivized by the zkSync native token rather than a centralized "DAC.”
The primary difference between zkPorter and Starkware’s Volition is that a user must choose with each zkPorter account whether to produce transactions with off-chain data availability, while in Volition, a user can choose for each transaction within an account.
