← Protocols
Polygon CDK
01Description

Agglayer Chain Development Kit (formerly Polygon CDK) for launching ZK-powered L2s that plug into the Agglayer for unified liquidity and cross-chain messaging. Multi-stack: ships a zkEVM (cdk-erigon) configuration and a CDK-OPGeth (OP Stack + ZK) configuration, both natively integrated with Agglayer pessimistic proofs.

02Best for
  • 01ZK rollups settling to Ethereum
  • 02AggLayer-connected L2s with shared liquidity
  • 03OP Stack chains that want ZK fast finality (CDK-OPGeth)
  • 04permissioned / institutional appchains
  • 05EVM-equivalent zkEVM execution (cdk-erigon)
03Install
  • # Spin up a local CDK devnet with Kurtosis
  • kurtosis run --enclave cdk github.com/0xPolygon/kurtosis-cdk --args-file .github/tests/combinations/fork12-cdk-erigon-rollup.yml
04Environment variables
VariableScopeDescription
CDK_RPC_URLClientRPC endpoint for the CDK chain (issued by your RaaS or self-hosted node).
CDK_CHAIN_IDClientChain ID assigned to the CDK chain at deploy time.
AGGLAYER_API_URLServerAgglayer endpoint used by the bridge service to submit pessimistic proofs.
05Prompt snippet
Use Polygon CDK to deploy a ZK L2. Pick a stack — `cdk-erigon` (zkEVM execution client) or `cdk-opgeth` (OP Stack with SP1/Plonky3 fast-finality proofs) — then run the Kurtosis package `github.com/0xPolygon/kurtosis-cdk` to bring up the L1 contracts, sequencer, prover (zkProver / SP1), and the AggKit bridge service that publishes pessimistic proofs to Agglayer. Connect the dapp via viem with `defineChain({ id: process.env.CDK_CHAIN_ID, rpcUrls: { default: { http: [process.env.CDK_RPC_URL] } } })`. Bridges and unified liquidity flow through the Agglayer Unified Bridge contracts on L1 — call `bridgeAsset(destinationNetwork, destinationAddress, amount, token, forceUpdateGlobalExitRoot, permitData)` rather than running a custom canonical bridge.
06Gotchas
  • Two stacks live under the same brand and are not interchangeable: `cdk-erigon` is a zkEVM Type-3 execution client, `cdk-opgeth` is OP Stack + ZK validity. Tooling, RPC quirks, and upgrade cadence differ — pick at deploy time and stick with it.
  • Agglayer connection is opt-in but requires running the AggKit bridge-service alongside the sequencer and posting pessimistic proofs; without it your chain is isolated and cross-chain messaging via Agglayer will not work.
  • The default sequencer is centralized (operated by you or a RaaS like Conduit/Caldera) — design for liveness incidents and force-include / force-exit paths via the `PolygonRollupManager` on L1.
  • ZK proving costs and latency are non-trivial: cdk-erigon proofs land in tens of minutes; cdk-opgeth via SP1/OP Succinct targets sub-$0.005/tx but is still maturing. Budget L1 proof verification gas in your unit economics.
  • Custom gas tokens are supported but break many wallets and indexers (balance UIs assume ETH). Verify wallet, explorer, and bridge UI support before launching with a non-ETH gas token.
  • Polygon zkEVM mainnet is itself sunsetting in 2026 in favor of Agglayer-connected CDK chains — do not target zkEVM (chain 1101) for new deployments; target a CDK chain or another Agglayer member.
07Alternatives