How to bridge to zkSync
Ethereum, the leading blockchain for decentralized applications (DApps), faces a significant challenge with scalability. With increasing user adoption, transaction fees have skyrocketed, hindering mainstream usage. ZkSync has emerged as a promising solution, aiming to address this issue while preserving Ethereum’s security and decentralization.
What is zkSync?
ZkSync is a zero knowledge (ZK) rollup scaling solution built on top of the Ethereum blockchain. It leverages ZK-proofs, a cryptographic technique, to process transactions off-chain (layer 2 or L2) while inheriting Ethereum’s security features (layer 1 or L1).
ZkSync is the brainchild of Matter Labs, a team of passionate blockchain engineers and entrepreneurs. Alex Gluchowski, co-founder and CEO of Matter Labs, is a prominent figure in the Ethereum community recognized for his contributions to scaling solutions. The team’s strong technical expertise and dedication to decentralization are critical drivers behind zkSync’s success.
ZkSync’s development is further bolstered by a consortium of renowned investors, including Andreessen Horowitz, Sequoia Capital and Balaji Srinivasan. These heavyweight backers provide crucial financial resources and strategic guidance, propelling zkSync’s growth trajectory.
Here’s how zkSync works:
- zkSync bundles multiple transactions into a single batch, significantly reducing gas fees per transaction.
- Transactions are processed efficiently on the layer 2, alleviating the burden on the main Ethereum network.
- zkSync generates cryptographic proofs (ZK-proofs) proving the validity of the processed transactions without revealing their details. These proofs are then submitted back to the Ethereum mainnet for verification.
This approach offers several advantages:
- Scalability
- Lower fees
- Enhanced privacy
- Security.
ZkSync boasts significantly faster transaction processing compared to layer 1s, potentially handling thousands of transactions per second. By batching transactions, zkSync drastically reduces gas fees, making it a cost-effective option for users. ZK-proofs conceal transaction details while verifying their validity, offering a degree of privacy on the public blockchain.
ZkSync inherits Ethereum’s security as the validity proofs rely on the underlying blockchain’s consensus mechanism.
What sets zkSync apart?
ZkSync stands out in the L2 scaling landscape due to its unique features. ZkSync was among the first ZK-rollups to launch a mainnet, giving it a head start in terms of user adoption and development. Unlike some ZK-rollups, zkSync avoids the use of a trusted setup (Application-Specific Trusted Setup or AS-TST), eliminating a potential centralization point.
AS-TST is a setup process for certain cryptographic systems, often ZK-proofs, where a trusted group generates secret parameters essential to the system’s security, but these parameters cannot be used to break the cryptography itself.
ZkSync also utilizes a novel approach called “Fractal SNARKs” to generate validity proofs, enabling them to scale efficiently with an increasing number of transactions. These innovations have attracted significant interest from the developer community, positioning zkSync as a frontrunner in the race for scalable Ethereum.
Since its mainnet launch in November 2020, zkSync has witnessed impressive growth. As of May 2024, zkSync has processed millions of transactions, showcasing its real-world utility. The value of crypto assets locked within zkSync has grown steadily to over $150 million across 107 native protocols, indicating user confidence in the platform. A thriving developer ecosystem is emerging around zkSync, with numerous DApps and projects integrating with the platform.
What is the difference between zkSync and Starknet?
Using ZK-rollup technology, zkSync prioritizes general-purpose smart contracts and interoperability with existing Ethereum tooling. In contrast, StarkNet is a separate L2 scaling approach using zk-STARK proofs, offering superior scalability but needing Cairo, a particular programming language for smart contracts.
Why build on zkSync?
ZkSync unlocks exciting use cases that are challenging or expensive to implement on L1. ZkSync’s low fees and fast transaction processing make it ideal for blockchain-based games requiring frequent microtransactions. Decentralized finance (DeFi) protocols can leverage zkSync to offer low-cost, high-speed financial services, attracting a broader user base.
Driven by degens in the crypto community, the nonfungible token (NFT) market thrives on efficient transactions. ZkSync facilitates a cost-effective platform for minting and trading NFTs. These use cases highlight zkSync’s potential to revolutionize various blockchain applications by addressing scalability bottlenecks.
Moving assets between L1 (Ethereum mainnet) and L2 (zkSync) is a crucial step for users to participate in the zkSync ecosystem. However, bridging introduces an additional layer of complexity and potential risks.
Here’s a detailed breakdown of the bridging process and the associated considerations:
How do cros-schain bridges work? A step-by-step guide
Most cross-chain bridges use these basic steps to move assets across chains.
Step 1: The user selects the asset and amount they wish to transfer from Ethereum to zkSync.
Step 2: The bridge locks the user’s chosen tokens in a smart contract on the Ethereum mainnet.
Step 3: An equivalent amount of tokens is minted on zkSync, representing the locked assets on L1.
Step 4: The user receives the newly minted tokens on zkSync, which they can then use within the zkSync ecosystem.
The reverse process (transferring assets from zkSync back to Ethereum) follows a similar principle, with the bridge burning the zkSync tokens and unlocking the corresponding assets on the Ethereum mainnet.
Bridging options for zkSync
Several bridge solutions facilitate asset movement between Ethereum and zkSync.
- Matterport: Developed by Matter Labs, the team behind zkSync, Matterport is a secure bridge designed specifically for zkSync. It leverages a network of validators to ensure the safe transfer of assets and offers a user-friendly interface.
- Generic bridges: Bridges like Synapse can also be used to transfer assets between Ethereum and zkSync. These bridges often support a wider range of tokens but might involve additional fees and potential security risks due to their generic nature.
The image below from DefiLlama shows how much money has been bridged to and from zkSync.
An exhaustive list of bridges for zkSync can be found on DefiLlama.
While many of these are options to bridge into zkSync, users must do their due diligence before using them. There are several risks to using bridges, which are highlighted later in the article.
How to bridge to zkSync using Matterport (zkSync’s official bridge)
To bridge to zkSync using Matterport, follow these steps:
- Visit the bridge interface: Access Matterport’s bridge interface via https://portal.zksync.io/.
- Connect your wallet: Connect a supported Ethereum wallet, such as MetaMask or Coinbase Wallet.
- Select assets and amounts: Choose the token you wish to bridge from Ethereum to zkSync and input the desired amount.
- Approve the transaction: In your wallet, approve the transaction, which generally includes paying an Ethereum gas fee.
- Wait for confirmation: Depending on network congestion, the bridging process may take some time. Once confirmed, your assets should appear in your zkSync wallet.
How to bridge to zkSync using generic bridges
To bridge to zkSync using generic bridges, follow these steps:
- Visit the bridge website: Go to the website of your chosen bridge — e.g., Synapse.
- Connect wallets: Connect your Ethereum wallet and create or connect your zkSync wallet if needed.
- Select networks and token: Choose “Ethereum” as the source chain, “zkSync” as the destination, and the token you want to transfer.
- Input amount and approve: Enter the desired amount and approve the transaction in your Ethereum wallet (paying gas fees).
- Cross-chain transfer: The bridge will handle the transfer to your zkSync wallet. This may involve multiple steps and fees.
What wallet supports zkSync?
Several wallet options are available to hold funds and interact with applications on the zkSync network. Popular choices include:
- MetaMask (a widely used Ethereum wallet that also supports zkSync)
- Argent (a mobile-first wallet focusing on security and user experience).
The official zkSync portal also offers a built-in wallet, and hardware wallets like Ledger provide enhanced security for significant holdings. When choosing a zkSync wallet, consider factors like ease of use, security features, support for specific DApps within the zkSync ecosystem and whether you prefer a mobile or browser-based experience.
Does Coinbase Wallet support zkSync?
As of May 2024, zkSync is not supported natively by Coinbase Wallet. This implies that you are unable to use your Coinbase Wallet to directly deposit or withdraw money from the zkSync network. To move funds from Ethereum — which Coinbase Wallet supports — to your zkSync wallet, you will need to use a bridge.
Does Trust Wallet support zkSync?
Unfortunately, Trust Wallet does not directly support zkSync. However, using Trust Wallet, you could utilize a bridge to interact with DApps or transfer assets from a supported network (like Ethereum) to the zkSync network.
Risks associated with blockchain bridges
While bridging offers a convenient way to move assets, it also introduces certain risks to consider. Bridges rely on smart contracts, which can be susceptible to hacks or exploits if not properly secured. It’s crucial to choose bridges with a proven track record that undergo rigorous security audits.
Some bridges employ centralized custodians to hold the locked assets during the transfer process. This introduces a single point of failure and potential censorship risks. Opting for decentralized bridges with distributed validator networks mitigates this risk.
When using liquidity pools within bridges, users might experience impermanent loss if the price of the bridged asset fluctuates significantly between the locking and unlocking stages. Understanding the risks involved in liquidity pools is essential.
Bridges have notoriously been crypto’s Achilles’ heel and have been exploited by hackers. The Ronin Bridge hack and the Wormhole bridge hack in the past few years resulted in the loss of hundreds of millions of dollars worth of crypto assets.
Mitigating risks associated with blockchain bridges
Here are some tips to minimize the risks associated with bridging assets:
- Users should try to choose established bridges with a strong security record and undergo regular audits by reputable security firms.
- It is critical to familiarize oneself with the specific functionalities of the chosen bridge, including fees, supported assets and potential centralization risks.
- If using liquidity pools within a bridge, users must be aware of impermanent loss risks and monitor asset prices to minimize potential losses.
- Users must avoid transferring more assets than they plan to use immediately on any new protocols to minimize exposure to bridge risks.
By following these practices, users can make informed decisions when bridging assets and participate in the zkSync ecosystem with greater confidence.