If you want more cryptocurrency analysis, including full-length research reports, trading signals, and social media sentiment analysis, use the code "Publish0x" when subscribing to CryptoEQ.io to make your first month of CryptoEQ just $10! Or simply click the button above!
zkSync
zkSync v1
zkSync is an Ethereum ZK-rollup by Matter Labs founded in 2018 by Alex Gluchowski. In June 2020, Matter Labs released zkSync v1.0 on the Ethereum Mainnet, where users can deposit ETH onto the network and send payments between other zkSync accounts for much lower transaction fees. It’s a standard L2 ZK-rollup scaling solution because a smart contract holds all funds on Ethereum Mainnet, computation and storage are performed off-chain, and every batched/rollup block generates a Zero-Knowledge Proof, which is verified by L1.
However, because zkSync uses SNARKs (PLONKs specifically and discussed more below), it’s slower than its STARK counterpart used by Starkware and relies on a trusted setup at genesis. That means the entirety of the zkSync ecosystem is dependent upon a trusted ceremony conducted in 2019. The good news is that the system is 100% secure if even one participant is honest.
The ceremony included 200+ well-known and public crypto figures, including Matter Labs, Vitalik Buterin, Ethereum Foundation, Consensys, Argent, and many others. The trusted setup and future zkSync v1 protocol are secure if at least one participant is honest. Therefore, it’s likely this trusted setup isn’t an issue and wasn’t compromised. Additionally, zkSync is unable to move or steal user funds.
zkSync 2.0
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). 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. Developers will still be able to deploy their Solidity code as is. This reduces any friction from deploying onto zkSync. For users, zkSync 2.0 offers instant withdrawals and objective finality limited only by batch frequency.
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.
zkSync Current Centralization and Risks
There’s currently strong centralization around the security council in the zkSync ecosystem. Matter Labs has stated it intends to eventually decentralize the security council with a future governance token (airdrop). zkSync’s on record that there’ll be a token in the future, and ~67% of the supply will be distributed to the community.
Although the zkSync multi-signers have shared economic interests in the project’s success, contracts can be upgraded anytime via the 9/15 multi-sig. Matter Labs claims “the probability of bugs is significantly higher than a malicious collusion between the Matter Labs team and 9/15 members of the security council.”
zkSync Security Council 2.0. Source: CollectiveShift.io
Roadmap and token
While there's a lot of promise and enthusiasm surrounding zkSync, plenty remains ahead for the team. Per the zkSync roadmap, Matter Labs is working to decentralize zkSync 2.0 by implementing its independent proof-of-stake (PoS) consensus mechanism. However, as a reminder, the overall security of zkSync won't be solely reliant on this new consensus mechanism since the final verification of state transition proofs is still done on the L1.
To release this new PoS system, Matter Labs must introduce a new zkSync token and two new specialized roles: Validators and Guardians. Validators produce the blocks and generate the proofs, while the Guardians’ role is to ensure the rollup remains censorship-resistant.
To do this, Guardians will maintain the state on zkPorter by confirming the data availability of zkPorter accounts. If there's any failure of data availability, the Guardians will get slashed (economic penalty). Users in a Guardian-led system can always exit the system with their data, so long as at least one-third of participating validators remain honest.
A critical feature of the zkSync PoS system is that, unlike in alt-L1s or sidechains, Guardians can't steal funds, only freeze the zkPorter state. And in doing so, they freeze their stake. Even if this were to occur, due to the ZKR design, users would still be able to withdraw their funds. Conversely, ORs that are successfully attacked can lose user funds. This is a significant advantage of the zkPorter system.
Resources
- Website
- Explorer
- Bridges: zkSync bridge, ZigZag exchange’s bridge, and LayerSwap, LayerSwap user guide
- OKx (exchange) withdrawals (not live yet)
- Direct fiat onramp using Argent wallet and Ramp
- Analytics dashboard
- Fees paid to L1
