A comprehensive guide on Polygon CDK and its deployment
Ghan Vashishtha
Ghan Vashishtha
Single New Blog Page
Single New Blog Page
Polygon CDK chain deployment guide

Building Zk-powered layer-2 chains can be complex. You will need extensive protocol-specific knowledge, the method of bootstrapping its components— sequencer, data availability layer, prover, etc, and other infrastructure-level operations. Polygon Chain Development Kit (PDK) tackles all these challenges with its significant emphasis on modularity and ready-to-use product suite consisting of a prover, customizable virtual machine, DA layer, and sequencer. For a detailed examination, let’s dive deeper into the concept of Polygon CDK through this comprehensive guide on the Polygon CDK chain and its deployment.

What is Polygon Chain Development Kit (CDK)?

Polygon Chain Development Kit (CDK) is a highly modular and fully open-source framework for seamless deployment of custom ZK-powered Polygon CDK chain deployment . Web3 projects building with Polygon CDK have the choice to tailor their chain based on their use case-specific requirements. This customization may include the choice of using virtual machine, prover, sequencer types, data availability solutions, operational mode (e.g. Validium), gas tokens, and more. Chains that are built using CDK are interconnected, which enables them to achieve benefits such as near-instant finality, massive scalability, and a unified liquidity pool. WIth all these attributes, Polygon CDK opens up multitude of opportunities for web3 projects.

Key factors for Polygon CDK’s adoption 

Polygon CDK is being adopted on a rapid scale for a variety of factors, including the infinite-scalability, customization facility, shared liquidity, and interoperability features. Below are some of the key factors that encourage web3 projects for Polygon CDK chain deployment:  

  1. Ethereum scaling: Polygon CDK chains are designed to scale Ethereum layer-1. The framework allow web3 projects to build their custom Zk-powered chains as Layer-2, and meanwhile it inherits the excellent security and data integrity from the Ethereum blockchain
  1. Inter-chain interoperability: All the CDK chains can interoperate with each other, share data, and asset via the native Zk-bridge. This interoperable infrastructure of Polygon CDK promotes a cross-chain future for dApps.
  1. Near-infinite scalability: All the chains deployed with Polygon CDK have the option to customize the TPS capacity of their chain, which can be multiplied further to achieve hyper-scalability without compromising on security since CDK chains are integrated with advanced cryptographic security. 
  1. Customization of business logic: CDK chains maintain full Ethereum equivalency. With that, they facilitate customization of gas limits, opcode compatibility, and technology integrations that allow projects to design their specific business logic using Polygon zkEVM
  1. Private appchains: Polygon CDK facilitates the creation of sovereign chains or appchains that can prioritize privacy options. For example, only authorized members can access the apps, post transactions on the ledger, or see the proofs. This way, projects can maintain confidentiality on their applications while still leveraging the decentralization attributes of blockchain.
  1. Support for extensive web3 services: CDK-based chains can easily port a range of web3 services. For example, you can use ZKrollups-as-a-service solutions to automate the deployment of some of your chain’s components, use centralized sequencers, data storage services, and web3 tools.
  2. Unified liquidity: Polygon CDK chain offers ‘unified liquidity’ feature to enable seamless transfer of assets and liquidity across various chains within the Layer-2 ecosystem. This concept tackles the issue of ‘walled garden’ from Polygon Network and offer a highly efficient digital economy. If you want to learn in-depth analysis of Polygon CDK’s approach of solving ‘Walled Garden’ issue and enabling interoperability to the chains— check our descriptive blog given below:

How Polygon CDK is solving ‘Walled Garden’ and interoperability issues in appchain ecosystems?

How to deploy a Polygon CDK Chain: the step-by-step process

This quick-start guide explains how to set up and deploy Polygon CDK-based chain. As we know, Polygon CDK is currently being tested and it will soon be ready for production-grade deployment. However, various CDK validiums have actively been deployed on testnet that can seamlessly transit to mainnet, once its available. 

Now, let’s deploy Polygon CDK chain. For this, you will need the following prerequisites.:

Prerequisites: 

  • Linux operating system (example, Ubuntu Server 22.04 LTS)
  • A minimum of 16GB RAM with 4-core CPU
  • AMD64 architecture system
  • Docker 
  • Docker compose 
  • Web3 wallet. E.g Metamask

Steps to deploy Polygon CDK-based chain

Step1: Downloading the necessary configuration files:

At first, download all the necessary CDK chain configuration files from repository. 

The repository will include the following main files:

  • Docker-compose.yml: Defines necessary containers for setting up your CDK chain. 
  • Config: Includes a range of commands that enable you to manage the CDK Validium node.
  • Makefile: Contains all key configuration files for CDK Validium.

Run the below command to clone repository and navigate across it:

git clone https://github.com/Snapchain/zkValidium-quickstart.git
cd zkValidium-quickstart

Now, create your .env file by coping from the demo:

cp .env.demo .env

Step:2 Deploying your CDK validium:

Once you clone the repository and set the working directory, its time to deploy the CDK Validium. For that, pull all the important Docker images and Docker Hub using the below command: 

docker-compose pull

Start the local CDK Validium:

make run

Check the status of containers to ensure all services work properly:

docker-compose ps

Step:3 Interacting with the Validium– testing it:

Kudos! Your Polygon CDK chain is now up and running on local host. Now, let’s test its functionalities.

  1. First, you need to verify the block explorer. To do this, navigate through the localhost:4001 where a page similar to below will appear.
  1. Add your network to any web3 wallet (like Metamask). Set the network to Ethereum mainnet—> go to ‘Networks’—> ‘Add network manually’. Provide details such as chain ID (add 1001), currency symbol (can be anything), RPC Url (http:://localhost:8123), and block explorer URL (http:://localhost:4001).
  2. Save the inputs and, switch to the local testnet.

Next, a default account will be created with private key and tokens. To check the balance on the wallet, you need to import this account. Upon this, the current balance will be shown. Now, you can use these tokens for various purposes such as sending to other addresses, creating transactions, paying gas fee, etc.

Step:4 Using the bridge

Polygon CDK comes with a native bridge with interactive UI. You can use this bridge to transfer funds between Layer-1 and Layer-2 chains.  To do this, you first need to add RPC URL to the wallet, and rest of the details like previous step. Next, connect your wallet and proceed. Once connected successfully, you can use this bridge to transfer funds from Ethereum mainnet to cdk-validum (CDK chain).

Projects building their custom Zk-powered L2 chain with Polygon CDK

Web3 projects– whether building from scratch or transitioning to Zk-powered chains, they are shifting to Polygon CDK on a huge scale. Below are some of the recent projects that are building on the CDK ecosystem: 

Manta: Manta Network is the latest project to shift to Polygon CDK, spinning its own Zk-powered Rollup— Mata Pacific zkEVM. With this transition, Manta aims to leverage strong security guarantees, few -seconds finality, modularity, and sovereignty offered by the CDK framework. Also, Manta plans to lap into the liquidity of various CDK chains using trustless ZK bridge that connects to Ethereum. This connectivity will further allow Manta to enable atomic swaps between L1 and L2 chains. Overall, Manta is building a highly scalable, customizable, and robust Rollup ecosystem with Polygon CDK. 

Astar Network: Astar Network is another latest project building its ZK powered custom L2 chain using Polygon CDK. The chain will implement better web3 strategies while guaranteeing increased security, scalability, and privacy. It will further allow Astar zkEVM to offer functionalities such as full EVM–equivalence, bridging of ETH from testnet to Astar zkEVM, token faucets, advanced block explorers, and a variety of customizable ZK-based features. 

Plena Finance: Plena finance— the leading DeFi project has recently announced that the platform is transitioning to a SuperApp– Plena crypto super app built with Polygon CDK. The app will provide a more intuitive and unified experience. For this, it accepts transaction fees in any token with CDK’s Account Abstraction feature, 30% cheaper transactions, custody of funds, quick wallet recovery, and superfast transaction confirmation. 

Other leading Polygon CDK projects include Immutable, Gnosis Pay, Wirex, Canto, Capx, AaveGotchi, and Idex.

Deploying a Polygon CDK chain on Zeeve: Try our 1-click Sandbox! 

Zeeve removes the complexity of Polygon CDK chain deployment with its one-click deployment interface that offers rich customization options for all kind of projects. With Zeeve, you do not need any hardware/software setup, node infrastructure, ZK components like DA layers, sequencer, or prover. That’s because Zeeve provides you ‘Sandbox environment’ where you can test and deploy your Zk-powered chain with few clicks.

The Sandbox comes with a highly optimized default CDK chain setup that you can use just the same or configure it as per your CDK chain’s requirements. The configuration options includes general configurations, blockchain-level configurations, zkEVM configurations, RPC configurations, infrastructure, and wallet management. Also, you will get a complete set of protocol-level components to integrate into your chain such as nodes, wallets, bridges, wallets, and data indexing tools. The whole process of deploying your Polygon CDK chain with Zeeve is very simple and easy to understand so that anyone- with or without technical knowledge can use it.

On top of this,  Zeeve monitors your Polygon CDK chain on critical parameters, maintaining its uptime and performance. The monitoring dashboard further produces real-time alerts to keep you updated. 

For more information on how Zeeve is simplifying the deployment and maintenance of Polygon CDK chains, connect with our blockchain experts. And, if you are working on a complex Rollup project— whether Zk or Optimistic, we are happy to address all your concerns. Drop us an email or schedule a one-to–one call with us

Share

Recent blogs
Join the Our Largest
community!

Be one of the 15,000+ innovators who
subscribe to our updates.

graphic (1)
Join the Our Largest
community!

Be one of the 15,000+ innovators who
subscribe to our updates.

Blog page graphic