Polygon CDK: The endgame for L2 scaling solutions
Announced this summer, Polygon 2.0 aims to converge all of Polygon’s scaling innovations under one blanket to solve the dual problems of ‘Scalability’ and ‘Fragmented Liquidity’ that have been plaguing not only Ethereum but the Web3 ecosystem, once and for all!
Central to Polygon 2.0 vision is the Polygon Chain Development Kit (CDK) that enables new chains to launch as zk-powered L2s. The modular architecture of CDK allows developers to pick and choose different components of a blockchain as per their own unique use case. The CDK not only removes the headache of managing blockchain infrastructure for developers but also provides them access to unified liquidity of all Polygon 2.0 chains and Ethereum from day one.
In this article, we will cover Polygon’s year-and-a-half-long innovation around ZK (zero knowledge), and how it fructified into CDK, a state-of-the-art modular codebase that allows anyone to deploy ZK-powered L2s on Ethereum – making Web3 truly scalable for the first time.
Let’s dive in!
TL;DR
Polygon 2.0 vision is the convergence of Polygon’s zk-prowess into a protocol architecture that delivers ‘Unlimited Scalability’ and ‘Unified Liquidity’.
Polygon CDK fulfills this vision by allowing anyone to launch zk-powered L2s (CDK chains) that can seamlessly communicate with all other Polygon 2.0 chains and Ethereum.
The Interoperability Layer is the secret sauce that enables instantaneous communication among Polygon 2.0 chains.
All CDK chains use zk-rollups making them more secure and much faster than any other sidechains and L2s.
CDK's use case is not limited to new app chains, it can easily on-board existing sidechains or L2s – making possible an infinitely scalable ecosystem of zk-chains with shared liquidity.
CDK is blowing up! Within a month and a half of launch, there are 15 confirmed chains and more than 70+ chains ready to become CDK chains.
The Billion-Dollar ZK Bet
With the launch of new scalability solutions such as optimistic rollups, zk-rollups, and validiums, Polygon decided to zero in on a technology that freed it from the constant need to upgrade its PoS chain or FOMO into the latest scaling innovations. The technology in question was zk-proofs, which would allow Polygon to securely power all its scaling innovations together.
With this insight, a new goal was set in 2021 – to establish Polygon as the industry leader in ZK technology and the key contributor to ZK Research and Development.
To realize this goal, Polygon dedicated $1 billion from its treasury to become a ZK powerhouse. The plan included acquiring top ZK projects and teams along with developing innovative ZK-based scaling solutions.
The first acquisition was of Hermez, a zk-rollup-focuse team that was onboarded to solve for the scalability of Ethereum. This was quickly followed by the acquisition of Mir, another team that was working on ZK-based scaling solutions. Mir was later rebranded to Polygon Zero. The acquisitions were pivotal, not only from a technology perspective, but also for the inclusion of highly skilled teams, including pioneers in zk-rollups like Jordie, David, Brandon, and Daniel, who joined the ranks at Polygon.
These acquisitions combined with the announcement of Polygon Miden, another scaling solution helped Polygon to approach the challenge of scaling Ethereum from different angles. The culmination of efforts from these teams made possible the new Polygon vision now known as Polygon 2.0.
Polygon 2.0: A multi-chain ecosystem with a single-chain experience
Polygon 2.0 aims to converge Polygon’s zk-prowess into a protocol architecture that delivers ‘Unlimited Scalability’ and ‘Unified Liquidity’ at superfast transaction speeds. This is achieved by upgrading the protocol architecture to a unified, highly scalable network of ZK-powered L2s using zk-rollups and Validium.
Figure 1: Polygon 2.0 Tech Stack
Before we dive into CDK, let’s understand how CDK chains fit into the Polygon 2.0 stack.
An ecosystem of zk-powered chains
How do you achieve infinite scalability? By connecting the ‘Polygon ecosystem of zk-powered chains’ with ‘zk-powered CDK chains’ that can be added on demand. Web3 for the first time has a truly scalable ecosystem of interconnected chains.
Figure 2: Polygon 2.0 – Inter-connected Chain Ecosystem
How do you achieve unified liquidity? All Polygon public chains and all CDK chains are connected by the Interoperability Layer of Polygon 2.0, enabling them to communicate seamlessly with each other. This means, that all CDK chains will not only be able to leverage the liquidity of the Polygon ecosystem but Ethereum as well. This is over $25 billion in assets instantaneously accessible for any new chain that enters the CDK ecosystem.
Apart from enabling scalability and liquidity, zk-proofs have additional benefits such as:
Increased privacy, as it allows a party to prove the authenticity of a transaction without revealing additional details to anybody.
New use cases, the above benefit makes possible projects that were difficult to imagine due to comparatively weaker privacy.
Enhanced security, as zk-proofs are generated only when a transaction is verified cryptographically.
More scalable, more secure, and cheaper, as it can execute very large computations off-chain and verify them on-chain, in turn reducing cost due to reduced usage of Ethereum block space.
Interoperability Layer – The linchpin of the ecosystem
The X-Factor of the Polygon 2.0 ecosystem is its Interoperability layer (Interop). This layer is responsible for the seamless communication amongst all the Polygon 2.0 ecosystem chains. By doing so, users can transact between any chain in the ecosystem at almost instantaneous speeds – A single-chain experience delivered!
Figure 3: Interoperability Layer in Operation
How is the single-chain experience made possible? Placed within the Interop layer is an ‘Aggregator’ – tasked with batching transactions and validity proofs across all Polygon 2.0 chains and then submitting them to Ethereum. Batching transaction data and zk-proofs from multiple transactions into one reduces load on the network and allows for instantaneous transaction speeds, making seamless communication possible.
Another benefit of transaction batching is that it reduces the need for block space on Ethereum. Not only does this decrease gas expenses, but with more chains entering the ecosystem, it results in a cumulative drop in gas costs due to a larger number of transactions in a batch.
Data availability – Enabling customized options
Polygon 2.0 provides two options for data availability: zkEVM or Validium. The distinction between the two approaches is in the location where each stores its transaction data. Off-chain data storage allows faster transactions and on-chain storage provides more security. Developers get to make the trade-off depending on their project's needs.
Figure 4: Polygon 2.0 Data Availability Options
In zkEVM, both the bundled transaction data and zk-proofs are stored on Ethereum. This approach offers full Ethereum security along with the benefits of zk-proofs. On the other hand, in a Validium, transaction data is stored off-chain on a separate database.
The zkEVM approach provides greater security as it leverages Ethereum to secure both the transaction data and zk-proofs. On the other hand, a Validium allows for faster transactions and cheaper fees due to off-chain (not on Ethereum) data storage. Both approaches are vital for a developing zk-ecosystem. Projects that require higher security like identity protocols or legal protocols, can leverage zkEVM. On the other hand, projects such as NFT marketplaces that have a high number of transactions can go for the Validium approach as its users will benefit from lower fees and faster transaction speeds.
Validium security vs sidechains security? Despite being a little less secure than a zkEVM, Validium chains provide greater security than any sidechain or a non-Ethereum L1. This is because a Validium is additionally secured by Ethereum’s security (800K+ validators) as it stores immutable transaction records in the form of zk-proofs on Ethereum!
How does off-chain data storage work? CDK chains that opt for Validium leverage the PoS Validium chain for off-chain data storage. In Validium, the reliability and accessibility of off-chain data is guaranteed by the Data Availability Committee (DAC). In essence, the DACs are a consortium of nodes, that ensure data accessibility even if any individual CDK chain goes offline. More on this here.
Now that we understand how the Polygon 2.0 ecosystem operates and how it provides a secure and future-proof stack of technologies for CDK chains to be deployed on. Let’s dive into how CDK chains will fulfill Polygon’s vision of freely creating and exchanging value!
Polygon CDK: Bootstrapping a ZK-powered Web3!
At the core of Polygon 2.0 vision lies, Polygon CDK, an open-source chain development kit that enables anyone to deploy their ZK-powered L2s that seamlessly connect to all other chains in the ecosystem.
The Polygon 2.0 vision of scaling Ethereum is driven on the back of an interconnected web of zk-powered L2 chains that can be added on demand, and CDK is the open-source and modular codebase that makes this possible.
Figure 5: CDK Chains – Possible Web2 & Web3 Partnerships
CDK not only allows for the deployment of new zk-L2 chains but also enables existing L1 & L2s to enter the Polygon zk-ecosystem. The latter makes sense as both zkEVM and Validium are more secure than these sidechains/ L2s. By leveraging CDK, these projects will not only be able to upgrade their security to zk-proofs but will also be able to provide superfast transaction speeds for their users. Even projects that require the highest level of security can launch their own private chains and benefit from unified liquidity.
Let’s check under the hood!
CDK Modular Architecture
For such a powerful technology, CDK architecture is not only simple to understand but is equally simple to implement for developers. Utilizing CDK, developers can either initiate new Ethereum L2s or transition any existing L1 chains to zk-powered L2. With in-built modularity, it has a customized configuration on every component of the chain. Further, it frees developers from the burden of managing blockchain infrastructure.
Table 1: CDK Stack — Modular and Fully Customizable
The CDK architecture has four key components (table 1), with each offering its own customizations, allowing developers to design the most efficient L2 chain as per their use case. The CDK chain can optimize for speed or security as per the mode selected – zkEVM or Validium.
Let us build our own hypothetical chain to understand the flexibility that comes with being a CDK chain.
Table 2: CDK Stack — Hypothetical NFT project
Hypothetical Example: An NFT project (Bingo) with millions of users wants to migrate to Polygon 2.0.
Problem statement: Bingo has a large user base and does millions of dollars in transactions daily but is plagued by slow transaction speeds and architectural problems that come with being a non-zk L2.
CDK stack: Bingo can move its chain into Polygon’s zkEVM execution environment, choose ‘Validium’ mode, and opt for a centralized sequencer. For data availability, it can leverage a local DAC. This selection will enable Bingo to leverage zk-security, faster transaction speeds, and cheaper gas due to the Validium mode and a centralized sequencer (PoS). Further, Bingo can customize the time between posting subsequent zk-proofs to Ethereum allowing further control over gas fees. Lastly, Bingo can deploy its own custom token to be used as a gas fee.
To summarize, the benefits of implementing a CDK chain for developers are:
Modularity: Designed with a high level of modularity, developers can pick and choose the components that best suit their needs.
No friction (Bootstrap): Developers are not required to hold, stake, or use their native tokens for utilizing the network creating a frictionless deployment experience.
Fastest rollup tech: ZK-proofs have faster finality and withdrawal times when compared with week-long delays by fraud proofs utilized in optimistic rollup L2 solutions.
Unified liquidity: Any interconnected chain has automatic access to the liquidity of all other Polygon 2.0 chains and one-click access to the entire liquidity of Ethereum (TVL > $25B).
Security: Developers have access (optional) to a decentralized set of PoS validators, ensuring the resilience and credibility of the network.
Community-owned: In line with the value of decentralization, CDK empowers the development community to govern their projects by implementing its own frameworks.
Permissionless Sovereignty: Developers can leverage open-source technologies to build ZK-chains giving them the ability to build their project's unique design along with governance.
Why CDK triumphs over other Ethereum-Centric Rollup Frameworks
Deploying a zk-powered L2 on Ethereum has never been easier! CDK not only simplifies deployment but also outperforms existing rollup solutions in both speed and security. Let's check the challenges with other rollup frameworks before we compare CDK with other Ethereum-centric rollup frameworks.
Fragmented liquidity.
Limited interoperability with significant security and speed concerns.
Inefficient proving systems, such as fraud proofs, significantly delay finality.
Non-Ethereum solutions are unable to leverage Ethereum’s liquidity and security.
L3 solutions that settle on L2 and then L2 on L1 increase complexity (and risk).
Table 3: Comparison – Ethereum-centric rollup frameworks
Instead of comparing the frameworks on each individual component, let us try to answer the question – which Ethereum-centric rollup framework offers the best architecture?
Rollup tech: Frameworks that offer zk-rollups are better than ones that offer optimistic roll. Let’s dig in!
Optimistic rollups use fraud proofs to bundle off-chain transactions before submitting them to Ethereum. Fraud proofs consider all submitted off-chain transaction data to be valid by default. Hence, the name Optimistic rollups.
zk-rollups use validity proofs to bundle and execute transactions off-chain. Validity proofs are cryptographic assurances that provide proof that the submitted transactions are authentic. In other words, a validity proof is only generated for a transaction if it is valid.
Key advantages of zk-rollups (ZKRs) over fraud proofs (ORs)
Instant finality: Validity proofs achieve finality superfast, in comparison, ORs can have a delay in case of a disputed transaction. We are talking minutes vs a week!
More secure: Validity proofs preemptively provide cryptographic evidence of transaction authenticity. Fraud proofs are designed to detect and prevent fraudulent activity once the transaction has happened, making them reactive.
Lower fees: zk-rollups using Validium mode only store validity proofs on Ethereum. In contrast, fraud proofs require storing complete transaction data along with the fraud proofs, resulting in increased Ethereum block space usage and higher gas costs.
This simple argument makes Polygon CDK better than both the Optimism and Arbitrum Frameworks as they both use Optimistic Rollup technology. Another advantage of CDK chains using Validium over these two frameworks is better security. Frameworks that scale by adding new L2 & L3s without the security of zk-proofs are at additional risk, as each new layer introduces potential attack vectors.
The only other Ethereum scaling framework that utilizes zk-proofs is zkSync’s - ‘zkPorter’.
Like Polygon CDK Validium, zkPorter also utilizes off-chain data availability to provide cheaper and faster transactions. Both the approaches use PoS mechanism to secure off-chain transaction data. However, taking transaction data off Ethereum just for speed is a foolish endeavor. The framework needs to ensure the resulting security compromises are well taken care of by the PoS validators that secure the off-chain data.
This leads us to the big question – Polygon CDK vs zkPorter – who has a more trustworthy PoS mechanism?
Polygon PoS chain has 100+ Validators (including giants like Google Cloud) and ~24,000 delegators with a combined stake of around ~$1.8 billion. Alongside, the PoS chain handles – 4 million Monthly Active Wallets, a network of thousands of dApps, 3 million+ average daily transactions, and about $5 billion in secured assets. This makes the Polygon PoS chain and its validators a time-tested and trustworthy combination.
In comparison, zkPorter utilizes ‘Guardians’ to ensure off-chain data availability in zkPorter. The Guardians stake zkSync tokens and sign blocks to confirm data availability. However, zkPorter Guardian is still under development. Even with a year-end launch, zkPorter will still need several years to catch up with the scale and reliability already offered by the Polygon PoS chain validator set.
Today, Polygon CDK Validium is the best stack for scaling Ethereum that solves the trilemma of Decentralization, Security, and Scalability most efficiently.
What now? – How Polygon CDK will supercharge Web3 growth!
Using the modular stack, almost all current Web3 projects can benefit from CDK in one way or another. CDK is the first solution in the market that can onboard the entire Web3 ecosystem on Ethereum by application of bleeding edge scaling solutions.
Let’s explore potential CDK use cases in the Web3 ecosystem.
Table 4: Polygon CDK – Current Web3 use cases
Apart from the current use cases, the major revolution CDK unlocks is the ability to bootstrap a zk-powered L2 on Ethereum at close to zero cost and in under 10 minutes. Furthermore, access to the combined liquidity of all Polygon 2.0 chains (zkEVM, Miden, PoS Validium + Ethereum > $25B) and a single chain experience across all CDK chains, will make launching and sustaining new Web3 ideas a hell lotta easier!
Polygon CDK is the much-awaited solution that can fuel the growing blockchanization of the world!
Conclusion
CDKs modular architecture in combination with zk-proofs unlocks ‘scalability’ and ‘unified liquidity’ in Web3 like never before. With benefits such as low fees, faster finality, no development cost, and ease of deployment, we can be sure that the future Web3 landscape will be on interlinked zk-chains. This very well makes possible a scenario where 90% of all transactions could be zk-powered in the next 2-3 years.
The project that first cracks the challenge of creating an interconnected ecosystem of zk-powered L2s will enjoy a strategic edge, similar to Ethereum's longstanding dominance in the L1 space. Such a project will benefit greatly from the network effects of unified liquidity. This means that new app chains will automatically favor a zk-ecosystem with the maximum liquidity.
Apart from being first to market, Polygon has the best zk team in Web3 (Hermez, Zero, Miden), is well funded, and is backed by a healthy treasury to support the R&D required to keep the Polygon 2.0 ecosystem on top. Combine this with little to no competition for Polygon in the modular zk-chains landscape, the only challenge that remains for Polygon is how efficiently can they execute this opportunity!
Addressing the question of execution, I will leave you with some numbers since CDK's announcement two months ago – 15 confirmed projects (including Immutable, IDEX, Palm Network, Aavegotchi, among others) and buzz about 100+ chains in the pipeline for deployment!