Book a free call

What Is zkSync and How Does It Work?

zkSync is an Ethereum Layer 2 network that uses zero-knowledge proofs to make transactions faster and cheaper while keeping Ethereum's security.

Hertiv engineering teamReviewed by a senior engineer
9 min read
What Is zkSync and How Does It Work?
On this page

Short answer

zkSync is an Ethereum Layer 2 scaling network built by Matter Labs that uses zero-knowledge proofs to process transactions off-chain and settle them on Ethereum. It is a validity rollup, often called a ZK rollup: it batches many transactions together, proves they are correct with cryptography, and posts that proof to Ethereum, so users get lower fees and faster confirmations without giving up Ethereum's security.

What is zkSync?

zkSync is an Ethereum Layer 2 scaling network built by Matter Labs that uses zero-knowledge proofs to process transactions off-chain and settle them on Ethereum. The main network, zkSync Era, is a general-purpose chain where developers can deploy smart contracts and users can trade, lend and play, much as they do on Ethereum mainnet, but with lower fees.

The problem it solves is Ethereum's cost and speed. Ethereum mainnet handles a limited number of transactions per second, so when demand is high, fees rise and simple actions become expensive. A Layer 2 moves the work off the main chain and only uses Ethereum for settlement and security, which keeps the cost down.

zkSync Era opened to all users in March 2023, after an earlier phase for registered projects. It uses ETH as its gas token, chain ID 324, and the explorer at explorer.zksync.io. The network is EVM-compatible, which means contracts written for Ethereum mostly work on zkSync with little change, and wallets such as MetaMask can add it as a custom network.

DetailzkSync Era
TypeZK rollup, Ethereum Layer 2
Built byMatter Labs
Chain ID324
Gas tokenETH
Mainnet openedMarch 2023
Smart contractsYes, EVM-compatible
Explorerexplorer.zksync.io

There is also a governance token, ZK, which launched in June 2024. Holding it does not give ownership of Matter Labs or a claim on fee revenue; it is used in the network's governance system. For most users, the token is beside the point. What matters is the network: cheaper transactions that still settle on Ethereum.

How does a ZK rollup work?

A ZK rollup works by executing transactions off-chain, bundling them into a batch, and submitting a zero-knowledge proof to Ethereum that the batch is correct. Ethereum checks the proof rather than re-running every transaction, which is what makes the system both fast and secure.

The flow has four steps. First, users send transactions to the rollup, where a sequencer orders them and executes them. Second, the rollup compresses the batch and its data. Third, it generates a validity proof, a piece of cryptography that shows the transactions were executed correctly without revealing every detail. Fourth, it posts the proof and the compressed data to Ethereum, where a smart contract verifies the proof and the batch becomes final.

The key property is that an invalid batch cannot pass verification. If the sequencer tried to include a transaction that breaks the rules, the proof would fail and Ethereum would reject the batch. That is the difference from older scaling designs that relied on someone noticing fraud after the fact. With a validity rollup, the proof itself guarantees correctness.

Fees fall because the cost of the proof and the data posted to Ethereum is shared across the whole batch. A single transaction on Ethereum pays for its own execution and storage; a transaction on a rollup pays a small share of a batch that holds hundreds of transactions. The saving is biggest for simple actions such as transfers and swaps, which is why these networks suit frequent, small transactions.

Withdrawals take longer than deposits, because moving funds back to Ethereum waits for the proof to be verified and the batch to settle. That delay is usually measured in hours rather than days, but it is worth knowing before you bridge a large amount you might need quickly.

zkSync Era vs zkSync Lite

zkSync Era and zkSync Lite are two different networks from the same team, and Era is the current general-purpose network. Lite was the earlier, simpler chain, built mainly for payments and token transfers, with no general smart contracts. Era is the full network, with a custom virtual machine that runs smart contracts.

FeaturezkSync ErazkSync Lite
PurposeGeneral-purpose apps and contractsPayments and simple transfers
Smart contractsYes, EVM-compatibleNo
Mainnet openedMarch 20232020
Gas tokenETHETH
Best for todayApps, DeFi, NFTs, gamingLegacy payments only

If you are starting a new project or moving funds, Era is the network to use. Lite served its purpose when ZK technology was new and smart contracts on a rollup were not yet practical, but it has been overtaken by Era for almost every use case. Check which network an app or a bridge is pointing at before you send anything, because the two networks do not share balances.

Era is also the base for a wider ecosystem. The ZK Stack is the software framework Matter Labs released for building new ZK chains, and the Elastic Network is the name for the set of chains built with it. Era itself is one chain in that ecosystem, and the one most users and developers will meet first.

How do you use zkSync?

You use zkSync by adding the network to a wallet, bridging funds from Ethereum, and then using apps on Era the same way you would on mainnet. The steps are short, but the first transfer should always be small.

  1. Add the network to your wallet. In MetaMask, add a custom network with the name zkSync Era Mainnet, the RPC address mainnet.era.zksync.io, chain ID 324, the currency symbol ETH, and the explorer explorer.zksync.io. Some wallets list Era by default.
  2. Bridge a small amount first. Use the official bridge or a well-known third-party bridge to move a small amount of ETH from Ethereum to Era. Check the fee and the expected time before confirming.
  3. Wait for the funds to arrive. Bridging to Era usually takes minutes. Do not start a second transfer until the first one is confirmed in your wallet.
  4. Use an app on Era. Connect the wallet to a decentralised exchange, a lending app or an NFT marketplace on Era, and approve transactions as usual. Fees are paid in ETH.
  5. Keep a record of what you bridged. Note the amount, the bridge used and the time, so you can trace the transfer if anything goes wrong.

Native account abstraction is one of Era's distinctive features. On most EVM chains, an account is either a wallet controlled by a private key or a contract. On Era, accounts are smart contracts by default, which lets apps offer features such as paying gas in a token other than ETH, social recovery, or spending limits.

Paymasters are the mechanism that lets an app sponsor gas for its users, so a new user can try an app without holding ETH first. For the basics of keeping any wallet safe, see how to secure a crypto wallet.

How do developers build on zkSync?

Developers build on zkSync by writing contracts in Solidity, compiling them with the zkSync toolchain, and deploying them to Era much as they would on Ethereum. The network is EVM-compatible rather than EVM-identical, so most Ethereum tooling works, with a few differences to check.

The main difference is the compiler. Era runs its own virtual machine, EraVM, so contracts are compiled with the zkSync compiler rather than the standard Solidity compiler.

In practice, most teams use the Hardhat or Foundry plugins for zkSync, which handle the extra step, and the majority of Solidity code compiles without changes. A few low-level operations behave differently, so the docs list the differences and the test suite should run against Era itself, not only against a local Ethereum node.

Account abstraction changes what apps can do. Because every account is a smart contract, a developer can build wallets with built-in rules: daily spending limits, two-key approval, or gas paid in the app's own token through a paymaster.

That is useful for consumer apps, where asking a new user to buy ETH before they can try anything is a real barrier. If you are planning a product on Ethereum's ecosystem, Ethereum development covers the wider choices, including when a Layer 2 is the right fit.

Testing follows the usual pattern: a local node or the Sepolia testnet for Era, then a small deployment on mainnet with limited funds, then a wider launch. The testnet for Era uses chain ID 300, and its faucet supplies test ETH. Contracts should also be verified on the explorer, so users can read the code before interacting with them.

Costs for developers are mostly the same as on Ethereum: deployment and contract calls cost gas, paid in ETH, but at Era's lower rates. The bigger cost is usually the audit, which a ZK rollup does not remove. A contract that is wrong on Era is wrong in the same way it would be wrong on mainnet.

Example (hypothetical): trading on Era instead of mainnet

Example (hypothetical): a user makes 20 token swaps a month. On Ethereum mainnet, assume each swap costs $8 in fees, which is $160 a month. On zkSync Era, assume each swap costs $0.30, which is $6 a month. The saving is $154 a month, or $1,848 over a year, before the cost of moving funds onto Era.

Moving funds costs a bridge fee. Assume the bridge charges $5 and the transfer takes 10 minutes. The user pays that once, then trades cheaply for the rest of the year. The numbers are assumptions, not prices, and real fees move with network demand, but they show why frequent small trades favour a low-fee chain.

The same arithmetic can point the other way. If the user trades once a month, the saving is about $7.70 a month, which may not be worth the extra steps, the bridge risk, and the wait to withdraw. The right chain depends on how often you transact, not on which fee is lower in isolation.

What are the common mistakes?

The most common mistakes are sending funds to the wrong network, trusting a bridge without checking it, and assuming a low fee means a token or app is safe.

  • Mixing up Era and Lite. The two networks do not share balances. Check the network name in your wallet and in the app before every transfer.
  • Bridging a large amount first. Always send a small test amount, confirm it arrives, and only then send the rest. A failed bridge transfer is far easier to fix when it is small.
  • Using an unknown bridge. Bridges hold funds while a transfer is in flight, and they have been a frequent target for attackers. Use the official bridge or one with a long, public track record.
  • Approving unlimited spending. Approving a token once can let an app spend it indefinitely. Review approvals from time to time and revoke the ones you no longer need.
  • Trusting new tokens on looks. A polished website and a low fee do not make a token legitimate. Check the contract, the liquidity and who controls it.
  • Forgetting withdrawal time. Moving funds back to Ethereum waits for proof verification, so do not bridge money you need within the hour.

Key takeaways

  • zkSync is an Ethereum Layer 2 that uses zero-knowledge proofs to batch transactions off-chain
  • Era is the current general-purpose network; it opened to all users in March 2023 with chain ID 324
  • A validity proof guarantees the batch is correct, so Ethereum checks the proof instead of re-running transactions
  • Native account abstraction lets apps sponsor gas and build wallets with spending rules
  • Always bridge a small test amount first and confirm the network is Era, not Lite

Frequently asked questions

What is zkSync Era?

zkSync Era is the main zkSync network: a general-purpose Ethereum Layer 2 built by Matter Labs that runs smart contracts and uses zero-knowledge proofs to settle transactions on Ethereum. It opened to all users in March 2023, uses ETH for gas, and has chain ID 324.

Is zkSync the same as Ethereum?

No. zkSync is a separate network that sits on top of Ethereum. It executes transactions off-chain and posts proofs to Ethereum, which checks them. It is EVM-compatible, so most Ethereum contracts and wallets work on it, but balances and apps do not carry across automatically.

What is a ZK rollup?

A ZK rollup, or validity rollup, batches many transactions off-chain and submits a zero-knowledge proof to Ethereum that the batch is correct. Ethereum verifies the proof instead of re-running every transaction, which keeps fees low while keeping Ethereum's security.

What is zkSync Lite?

zkSync Lite was the earlier, simpler zkSync network, built mainly for payments and token transfers without general smart contracts. Era replaced it as the main network for apps, DeFi and NFTs. If you are starting out, use Era.

How do I add zkSync to MetaMask?

Add a custom network with the name zkSync Era Mainnet, RPC address mainnet.era.zksync.io, chain ID 324, currency symbol ETH, and explorer explorer.zksync.io. Some wallets list Era by default, so check the network list before adding it manually.

Is zkSync cheaper than Ethereum?

Usually, yes, for the same action. Fees on Era are a small share of a batch that holds hundreds of transactions, so simple transfers and swaps cost far less than on Ethereum mainnet. Fees still move with demand, and bridging funds onto Era costs a separate fee.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building on Ethereum or a Layer 2? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Ethereum Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call