# zkSync Era — ZK Rollup for Scalable Ethereum Smart Contracts > zkSync Era is a Layer 2 zero-knowledge rollup on Ethereum that provides EVM-compatible smart contract execution with lower gas costs and higher throughput while inheriting Ethereum's security through validity proofs. ## Install Save in your project root: # zkSync Era — ZK Rollup for Scalable Ethereum Smart Contracts ## Quick Use ```bash # Set up a zkSync development environment npx zksync-cli create my-project --template hardhat_solidity cd my-project npm install npx hardhat compile npx hardhat deploy-zksync --script deploy.ts # Or interact via cast cast send --rpc-url https://mainnet.era.zksync.io "function()" --private-key $PK ``` ## Introduction zkSync Era is a Layer 2 scaling solution for Ethereum built by Matter Labs. It uses zero-knowledge proofs (ZK rollups) to batch thousands of transactions off-chain and post a single validity proof to Ethereum, achieving lower gas costs while inheriting Ethereum's security guarantees. Unlike optimistic rollups, ZK rollups provide instant finality once the proof is verified on L1. ## What zkSync Era Does - Executes EVM-compatible smart contracts at a fraction of Ethereum mainnet gas costs - Generates zero-knowledge proofs (SNARKs) that cryptographically verify transaction validity on Ethereum - Supports native account abstraction so every account can have custom validation logic - Enables Hyperchains (ZK Stack) for deploying custom ZK-powered Layer 2 and Layer 3 chains - Provides paymaster contracts that allow gas payment in any ERC-20 token or sponsored transactions ## Architecture Overview zkSync Era processes transactions in a sequencer, executes them in the zkEVM, and generates SNARK proofs in a prover pipeline. The sequencer orders transactions and produces blocks. The prover compiles execution traces into zero-knowledge circuits and generates proofs. These proofs are submitted to the L1 verifier contract on Ethereum, which validates correctness. State diffs and calldata are posted to Ethereum for data availability. ## Self-Hosting & Configuration - Run a local development node with `npx zksync-cli dev start` for testing - Deploy contracts using Hardhat with the `@matterlabs/hardhat-zksync` plugins - Use `zksync-cli` for bridging assets, checking balances, and interacting with contracts - Configure custom networks in Hardhat config pointing to Era mainnet or testnet RPC endpoints - Set up a ZK Stack Hyperchain using the `zk_inception` tool for custom L2/L3 deployments ## Key Features - Zero-knowledge proofs provide cryptographic transaction validity without revealing execution details - Native account abstraction makes every account a smart contract with custom authentication logic - Paymaster support enables gasless transactions or gas payment in any ERC-20 token - ZK Stack allows deploying sovereign ZK rollup chains that settle to Ethereum - EVM compatibility through zkEVM lets existing Solidity contracts deploy with minimal modifications ## Comparison with Similar Tools - **Optimism/OP Stack** — uses fraud proofs with a 7-day challenge period; zkSync uses validity proofs for faster finality - **Arbitrum** — optimistic rollup with lower proof overhead; zkSync provides cryptographic guarantees instead of game-theoretic security - **StarkNet** — ZK rollup using Cairo language; zkSync Era supports Solidity via zkEVM - **Polygon zkEVM** — another ZK rollup with EVM equivalence; zkSync uses a different proof system and compiler approach - **Scroll** — ZK rollup targeting full EVM equivalence; zkSync offers native account abstraction and paymasters ## FAQ **Q: Is zkSync Era EVM-compatible?** A: Yes, with caveats. Solidity and Vyper contracts compile via zkSync's custom compilers (zksolc/zkvyper). Most contracts work, but some EVM opcodes behave differently in the zkEVM. **Q: How do zero-knowledge proofs help with scaling?** A: ZK proofs compress thousands of off-chain transactions into a single proof verified on Ethereum. This reduces gas costs while maintaining L1 security. **Q: What is native account abstraction?** A: Every account on zkSync Era is a smart contract by default, enabling custom signature validation, multi-sig, session keys, and social recovery without ERC-4337. **Q: What is ZK Stack?** A: ZK Stack is the modular framework for deploying custom ZK-powered chains (Hyperchains) that settle to Ethereum. Each chain can customize its data availability, sequencer, and token. ## Sources - https://github.com/matter-labs/zksync-era - https://docs.zksync.io/ --- Source: https://tokrepo.com/en/workflows/asset-3069e3e1 Author: AI Open Source