The zkSync bridge is the official system of smart contracts that allows transferring assets between Ethereum and zkSync Era, a Layer 2 network developed by Matter Labs. Deposit transactions from Ethereum happen within minutes, while withdrawals to Ethereum take longer, several hours, due to a cryptographic proof generation process.
A ZK rollup is a type of layer 2 scaling solution used by zkSync Era, where the validity of each transaction is mathematically proven instead of assumed and then challenged by participants. This distinction underlies nearly every characteristic of the bridge's behavior, especially when compared with bridges on other layer 2 networks.
What Is the zkSync Bridge?
The zkSync bridge is the name for the pair of smart contracts of the zkSync protocol deployed on Ethereum and zkSync Era, which transfer assets between the two networks. Interaction with the system is performed using the official bridge portal by connecting a wallet and selecting an asset, an amount, and a direction.
zkSync Era is an EVM-compatible ZK rollup protocol, which means most of the smart contracts written in Solidity can easily deploy on it. All transactions are processed off the Ethereum blockchain, after which a validity proof of resulting state changes is created and submitted to Ethereum.
Why zkSync Doesn't Need a Long Challenge Period
Many Layer 2 networks like Arbitrum and Optimism use optimistic rollup designs, where transactions are assumed to be valid at first and participants have the chance to submit a fraud proof during the challenge period, usually seven days long. Withdrawals to Ethereum are finalized only after this period.
zkSync Era avoids a challenge period by proving the validity of transactions using zero-knowledge cryptography upfront, instead of waiting for fraud proofs to be submitted later. As soon as the validity proof of a transaction batch is verified on Ethereum, the state change, including withdrawals, is final. This is the fundamental reason why withdrawals from the zkSync bridge happen faster than from a typical optimistic rollup.
How the zkSync Bridge Works
Depositing from Ethereum to zkSync Era
Depositing is performed by locking assets on Ethereum and minting the equivalent amount of assets on zkSync Era.
-
The user calls the deposit function on the bridge contract on Ethereum, sending the asset to be transferred.
-
The bridge locks the asset on Ethereum and does not release it to anyone.
-
The zkSync sequencer collects the Ethereum transaction and processes a corresponding mint operation on zkSync Era.
-
The equivalent amount of assets is now available in the user's wallet on zkSync Era, usually within a few minutes.
Withdrawing from zkSync Era to Ethereum
The withdrawal process reverses the above procedure; however, there is an additional step due to how proofs are generated and validated.
-
The user calls the withdraw function on zkSync Era, burning the asset on that network.
-
It creates a message which will be later submitted from zkSync Era to Ethereum, confirming the burn of the asset.
-
The transaction, together with other transactions in the batch, is included in the validity proof and submitted to Ethereum.
-
After the proof is validated, and after zkSync's additional security delay passes, anyone can call the finalizeWithdrawal function on the Ethereum contract to release the funds.
Why Withdrawals Take Longer Than Deposits
While deposits require only one Ethereum transaction to be confirmed, withdrawals require the validity proof for the whole transaction batch to be created, submitted, and validated on Ethereum, plus the additional zkSync delay. Hence, withdrawals take longer than deposits.
This additional zkSync delay exists in order to give the network enough time to detect possible malicious activity, although the proof guarantees the mathematical correctness of the transaction. The exact duration of the delay is a governance-controlled parameter and has been decreasing over time as the protocol matures, but it usually adds several hours to the proof verification time.
Bridge Security and the Escape Hatch
Assets deposited through the zkSync bridge are stored in a smart contract on Ethereum and are protected by the same set of validators that protect the Ethereum network. No separate guardian network, multisig, or validator set is involved in the deposit and withdrawal process through the zkSync bridge, as it relies on the validation of the cryptographic proof on Ethereum instead of trusting a third party.
zkSync also has an escape hatch mechanism, which is designed to protect users in case the zkSync sequencer stops processing transactions or censors certain users. In this case, the user can submit a transaction to the layer 1 contract directly, forcing it to be processed on zkSync Era independently of the sequencer. This point is important for bridge deposits, as it guarantees that even a malicious sequencer cannot prevent the user from depositing his own funds.
Supported Assets and Fees
The zkSync bridge natively supports ETH as well as a wide variety of ERC-20 tokens. Due to the EVM compatibility of zkSync Era, most standard tokens that exist on Ethereum can be bridged without any custom implementation.
Using the native zkSync bridge does not impose any separate protocol fee; only gas costs on Ethereum and zkSync Era are charged. Deposits require Ethereum gas costs for the deposit transaction submission, while withdrawals require gas on zkSync Era to initiate the process and Ethereum gas later to finalize the withdrawal. There is no bridge fee imposed in either direction by the protocol.
zkSync Bridge Versus Third-Party Bridges
There are also several third-party bridges that allow connecting Ethereum to zkSync Era, and most of them use a different tradeoff from the zkSync native bridge.
-
Across, Orbiter Finance, and Layerswap allow using a network of relayers or liquidity providers that will provide the destination asset immediately, and will be repaid later, once the underlying transaction is settled, hence allowing users to receive funds within seconds or minutes instead of waiting for the native bridge's full withdrawal process.
-
The speed is achieved by a different security assumption, since the users are relying on the available liquidity of the relayer and on the bridge's verification process, rather than on Ethereum verifying the validity proof.
-
The native zkSync bridge remains the solution with the fewest added trust assumptions among all bridges, as it relies on Ethereum and zkSync's cryptography only, without the involvement of third parties providing liquidity or running independent infrastructure.
The choice between those options generally depends on how urgently the funds are needed and how much the user prefers to avoid relying on third-party infrastructure.
The Elastic Chain and ZK Stack Ecosystem
zkSync Era is not the only network developed on Matter Labs' technology. The ZK Stack is an open framework that lets developers launch their own ZK-powered chains, or ZK Chains, which will be connected with each other and with Ethereum through the Elastic Chain provided by Matter Labs.
Bridging assets within this ecosystem is performed through shared infrastructure, including a native token vault and a shared router contract on Ethereum, which allows transferring assets between ZK Chains, including zkSync Era, without implementing a separate bridge for each ZK Chain. This is a newer feature in comparison with the core zkSync Era bridge, and it reflects Matter Labs' idea of building a wide ecosystem of application-specific ZK Chains, rather than concentrating all of the activity on a single network.
zkSync Era Versus zkSync Lite
Matter Labs previously released the simplified version of the protocol, which was called zkSync Lite and supported basic token transfers and swaps but did not support general smart contracts. zkSync Era came as the general purpose version of the protocol, adding EVM compatibility and support for general smart contracts, which is why all new development in the ecosystem happens on Era.
This point is crucial when bridging, as the official zkSync bridge, referred to in all guides and integrations, works only between Ethereum and zkSync Era. zkSync Lite network also continues to operate and has its own separate bridging mechanism, but it is not receiving any development, and most wallets, exchanges and dApps now build only on Era.
Data Availability and Why It Is Important for Security
In addition to the validity proof, a ZK rollup protocol requires data availability in order to stay secure. zkSync Era posts this data on Ethereum together with the validity proof, which is the standard approach for a rollup and means it inherits Ethereum's security guarantees instead of depending on a separate committee to store or attest to that data.
The ZK Stack framework lets other chains built on it choose different data availability configurations, trading some security guarantees for lower costs. zkSync Era itself uses the more conservative rollup configuration, keeping transaction data on Ethereum, which is the reason why its native bridge is considered to inherit Ethereum-level security.
How to Use the zkSync Bridge
The bridging using the official zkSync portal is a simple process.
-
Connect a wallet, such as MetaMask, to the official zkSync bridge website.
-
Choose the asset and direction of the transfer, depositing to/from Ethereum or zkSync Era.
-
Submit the transaction and pay the gas fee on the source network.
-
Wait a few minutes for the funds to arrive in the destination wallet if depositing.
-
Wait for the proof verification and security delay to pass, and then complete the finalizeWithdrawal step to release the funds on Ethereum.
Risks and Practical Tips
Bridging always carries some risks, as it involves smart contracts and, for third-party bridges, additional third-party infrastructure outside of the protocol. However, the native zkSync bridge reduces much of this risk, being dependent on Ethereum and zkSync's cryptographic proofs only. Some tips still come in handy.
-
Test the transaction with a small amount when using a new wallet, a new bridge interface, or an untested network.
-
Check that the website used is the official zkSync bridge and not a phishing site, since fake bridge interfaces are a common phishing tactic.
-
Keep a small amount of ETH available on zkSync Era to cover gas for future transactions.
-
Remember that a withdrawal is not instant, and plan accordingly if funds are needed on Ethereum by a specific time.