Currently, there are two types of Rollup SDKs, ZK and OP, mainly based on Arbitrum Orbit, OP Stack, ZK Stack, and Polygon CDK. This article provides a comprehensive comparison and introduction of these four solutions. Among them, Polygon CDK has shown tremendous potential due to its scalability, security flexibility, and cost advantages.
Whether it’s the transition from OP Stack to Polygon CDK with Manta or the fair launch of ZKFair, Polygon CDK empowers projects to handle a massive Total Value Locked (TVL) and ecosystem. We believe that ZK Rollup is the endgame for long-term rollup scalability. Polygon CDK is gradually dominating the market by leveraging its advantages, such as modularity, customizability, multiple data availability solutions, and low entry barriers. Combined with the impressive performance of the flagship project ZKFair, we consider Polygon CDK to be a potential optimal solution among the current ZK Rollup SDKs.
1. Overview of Rollup SDKs
From the perspective of underlying technology implementation, Rollup SDKs can be categorized into OP-Rollup SDKs, which use Optimistic Fraud Proofs to maintain security, and ZK-Rollup SDKs, which rely on zero-knowledge proofs to establish on-chain trust. The OP-R SDK was initially proposed by Optimism, introducing the concept of OP Stack. In March 2023, Arbitrum launched the Orbit solution. Following closely, ZK-R SDKs emerged, with representative solutions such as ZK Stack from zksync and Polygon CDK introduced by Polygon.
1.1 Arbitrum Orbit
Arbitrum Orbit is designed to allow modifications of the Arbitrum Nitro codebase. It features a perpetual and recursive license, permitting the creation of Orbit chains that can host other chains under the same license conditions. Orbit chains can settle to various Arbitrum networks but are not designed for post-deployment network switching. It supports both AnyTrust and Rollup chain types, catering to different security and cost requirements.
Picture source: https://koreablockchainweek.com/blogs/kbw-blog/arbitrum-101
Like the paragraph shows, the goal of Arbitrum Orbit is to allow developers to build “Arbitrum’s Layer 2” or even Layer 3. Developers have the option to choose between the Arbitrum rollup (where all transaction data is published on the settlement layer) or the AnyTrust Chain (where transaction data is maintained by the DAC Data Availability Committee, releasing data availability proofs DACerts to the settlement layer, similar to the Validium approach). They can customize aspects such as Gas Token and economic models. Meanwhile, Arbitrum is also promoting Stylus, enabling developers to use Orbit to build rollups based on both EVM and WASM VM simultaneously. Arbitrum Orbit users have the flexibility to choose to build their L3 network based on Arbitrum One or Arbitrum Nova, with the settlement layer positioned on Arbitrum Layer 2. This implies that transaction fees on the L3 will revert to the Arbitrum protocol’s Layer 2. If one wishes to construct an L2 based on Ethereum as the settlement layer, obtaining a code license authorization from Offchain Labs or Arbitrum DAO is required.
1.2 OP Stack
OP Stack comprises software components that form the infrastructure of the Optimism mainnet. OP Stack operates on the Bedrock iteration, facilitating the launch of optimistic Rollup networks and supporting the proposed Optimism Superchain, a network of interconnected layer 2s. Its architecture includes the Ethereum Virtual Machine (EVM) for the execution layer, a single sequencer module for transaction processing, and various layers for data formatting, settlement, and governance.
After the recent upgrade of OP Stack to the Bedrock version, the cost of a single transaction has been reduced by more than 70% through optimized transaction compression strategies. Simultaneously, handling multiple transactions within the same L2 block has been implemented, reducing the size of state data. The various components, when broken down, make development more convenient. This is where the competitive edge of OP Stack lies.
Picture source: https://docs.optimism.io/stack/explainer
In its SuperChain planning, all rollups utilizing OP Stack will be consolidated into a standardized OP chain. Chains can communicate directly through the Cross Chain Messaging Protocol, sharing a common Ethereum cross-chain bridge. Additionally, sequencing will be handled by the same sequencer network across these chains.
1.3 ZK Stack
The ZK Stack is a modular, open-source framework that is both free and designed to build custom ZK-powered L2s and L3s (referred to as Hyperchains), based on the code of zkSync Era. Developed under open-source licenses, ZK Stack is freely accessible, contributing to increased accessibility and community participation. Hyperchains built with this framework seamlessly connect in a trustless network, ensuring low latency and shared liquidity for enhanced interoperability. Leveraging the reliability of zkSync Era, ZK Stack provides a secure foundation, and its emphasis on community contribution and ownership offers some support for the decentralized ecosystem. The sovereign nature of the framework gives creators a certain degree of autonomy over their Hyperchains, contributing to a somewhat decentralized and potentially sustainable system. Additionally, ZK Stack is suitable for various use cases, including gaming, social networks, and enterprise applications, providing some tailored solutions for specific needs. Through its asynchronous connectivity option, ZK Stack becomes one of the tools for building somewhat secure, customizable, and interoperable decentralized blockchain.
Picture source: https://x.com/zerokn0wledge_/status/1673436051199922176?s=20
The zkSync era overcomes the fragmentation of cross-network liquidity, and as a pioneer, Hyperchain leads this ultra-scalable unified liquidity network and sets an example for others.
However, while ZKStack is powerful, it is not a one-size-fits-all solution. For traditional DeFi dapps or NFT projects, deploying on an existing Hyperchain such as zkSync may be more efficient and provide synchronization combinations with other protocols.
1.4 Polygon CDK
Polygon CDK is an open-source and modular codebase designed to simplify the complex process of building and launching ZK-powered Layer 2 (L2) chains for Ethereum. This kit enables developers to design networks according to their specific requirements, offering a core modularity that enhances flexibility. The use of zero-knowledge proofs ensures cryptographic security and near-instant finality for transactions. By deploying chains using CDK, developers launch ZK-powered L2s that are automatically interoperable, connected to a shared ZK bridge, forming the value layer of the internet.
Picture source: https://polygon.technology/blog/introducing-polygon-chain-development-kit-launch-zk-l2s-on-demand-to-unlock-unified-liquidity
The developers can tailor the chain’s execution environment, opting for zkEVM, selecting the “validium” mode, and choosing a centralized sequencer. Customizations extend to data availability with a local DAC, adjusting the posting time of ZK proofs, and specifying the token for gas usage. Remarkably, despite these customizations, the NFT Chain seamlessly interoperates and shares liquidity with other Polygon chains. CDK’s modularity ensures flexibility without compromising scalability or fracturing liquidity. The Interop Layer, a core technical component of Polygon 2.0, plays a pivotal role, accepting ZK proofs, aggregating them, and posting the proof and updated chain states to Ethereum, ensuring near-instant finality and cross-chain execution. Polygon’s cutting-edge ZK technology, such as zkEVM, guarantees that chains developed using CDK remain future-proof, benefiting from ongoing advancements. Security in CDK-deployed chains relies on cryptography, offering a more secure, interconnected, and infinitely scalable Value Layer without the need for complex social requirements or incentives.
2. Top Performer: A Deep Dive into Polygon CDK
2.1 Scalability and Compatibility
With Polygon CDK, developers can directly deploy a rollup that is fully equivalent to the EVM, allowing seamless migration for EVM developers into the ecosystem.Simultaneously, Polygon CDK achieves a high level of modularity by breaking down the various components of the rollup into independent services. For instance, the syncer is responsible for synchronizing blocks between Layer 1 and Layer 2, the prover generates proofs, the sequence verifies transactions and packages blocks, and the RPC service provides external access. Rollup creators can scale specific services according to their needs.Security and Flexibility
With Polygon CDK, it is possible to create a stage 0 level rollup where the L2 state root is submitted to L1. Simultaneously, the rollup’s state can be reconstructed based on all the data on L1. Additionally, L1 contracts will verify the legality of zk proofs, ensuring that all state changes in L2 are entirely legitimate.
Polygon CDK inherently supports a dedicated data availability layer and a Data Availability Committee, ensuring reliable data availability even when choosing Validium. Polygon CDK supports various parameter customizations, allowing developers to choose between zk-rollup and Validium modes to build their own L2. It also supports customization of parameters such as Gas Token, Gas fee, proof submission frequency, batch size, etc.
2.2 Performance and Cost
Polygon CDK achieves fast zero-knowledge proof generation through Recursive STARK and Polygon Zero. With optimized hardware settings, it can reach over 2000 TPS, far exceeding the throughput of the Ethereum mainnet. Simultaneously, it allows for the configuration of more frequent validity proofs, enabling L1 to rapidly verify the state of L2, providing L2 with quick finality.
Rollup allows customization of gas token and gas fee collection rules, empowering developers to freely reduce the costs for rollup users. Additionally, the maintenance costs of rollup depend on the size of the data submitted to L1, with zkSNARK proofs being smaller, resulting in lower maintenance costs. According to official data, the average gas fees per transaction on Polygon Zkevm are only 0.000294 ETH.
3. Cases of Polygon CDK
3.1 ZKFair
Polygon’s ZK proving system, based on mathematical proofs, offers a stronger security model compared to OP Stack’s socio-economic incentive-oriented fraud proofs. Moreover, Polygon CDK’s modular and sovereign framework offers unparalleled flexibility in development, a feature leveraged by ZKFair for its tailored blockchain solutions. Furthermore, Polygon CDK’s focus on interoperability and shared liquidity is critical for blockchain networks to thrive. It allows for seamless integration with Ethereum and other Polygon chains, tapping into a vast user base and liquidity pool. While each SDK has its strengths, Polygon CDK’s combination of modularity, advanced security, interoperability, and flexible cost-performance balance positions it as a compelling choice in the Rollup SDK landscape.
ZKFair’s decision to employ Polygon CDK aligns with its objectives of scalability, performance, and economic flexibility, essential for an innovative project in blockchain technology.
Utilizing the customizable parameters provided by Polygon CDK, ZKFair has deployed a Rollup with the stablecoin USDC as the Gas Token. Taking advantage of CDK’s configurable gas fee, ZKFair has implemented a customizable gas adjustment solution, achieving fair distribution of governance tokens. This marks the successful launch of the first L2 based on Polygon CDK, with its Total Value Locked (TVL) growing from 0 to $160 million within three days. In the first two weeks online, the L2 saw over 450,000 active addresses and processed over 5 million transactions.
With the modular design of Polygon CDK, ZKFair plans to migrate its Data Availability (DA) layer from the Data Availability Committee (DAC) to Celestia. The integration with Celestia’s modular Data Availability (DA) layer for data scaling significantly reduces gas costs in the ZKFair ecosystem, providing a more cost-effective and user-friendly blockchain experience compared to other solutions.
3.2 Manta’s Transition from OP Stack to Polygon CDK
Manta’s transition from OP Stack to Polygon CDK underscores its quest for enhanced user experience, especially in terms of faster withdrawal settlements. The zkEVM technology in Polygon CDK, offering rapid settlements and robust security through ZK proofs, distinctly outperforms the Optimistic Rollups of OP Stack.
Another significant reason for Manta’s move was the integration with the broader Polygon ecosystem. The shift enables Manta to utilize the shared liquidity of the Polygon network, facilitated by trustless ZK bridges, enhancing ecosystem integration.
4. Conclusion
The exploration of various Rollup SDKs in this report underscores the dynamic and diverse nature of blockchain technology. While each SDK – Arbitrum Orbit, OP Stack, ZK Stack, and particularly Polygon CDK – contributes significantly to the blockchain ecosystem, there’s a discernible trend towards the adoption of Polygon CDK for projects seeking scalability, security, and efficiency. This preference is exemplified by Manta’s transition to Polygon CDK for its enhanced user experience and ZKFair’s strategic choice for its robust security and flexibility.
Polygon CDK, with its ZK technology, interoperability, and cost-effective solutions, emerges not just as an innovative tool but as a comprehensive solution for modern blockchain challenges. It bridges the gap between aspirations and practicalities, offering a platform that aligns with the growing needs of the blockchain community. This makes Polygon CDK not just an SDK but a catalyst for the next wave of blockchain innovation, propelling projects like ZKFair into new frontiers of performance and scalability. In the evolving tapestry of blockchain technology, Polygon CDK is a standout thread, weaving together efficiency, security, and accessibility to paint a future that is not only technologically advanced but also inclusively progressive.