1. Layer2 Scaling
For those of you who may not be as familiar with the topic, layer2 is usually an application layer that sits on top of layer1 chains like Ethereum to enable limitless scalability. Layer2 brings much-needed scalability to the blockchain ecosystem by moving transactions off of the main chain to achieve greater efficiency, resulting in higher throughput, quicker transactions, and lower fees.
While all layer2’s aim to help solve the scalability piece of the blockchain trilemma, the way in which layer2’s accomplish this can vary. For example, the two most widely used methods are zero-knowledge roll-ups and optimistic roll-ups, but I’ll expand in more detail later.
The reason layer2’s have become a big trend in crypto is that blockchain scalability is a challenge that impacts everyone. It limits a developer’s ability to design and build applications and products capable of scaling with widespread adoption. For end-users, it creates a poor user experience that’s plagued with slow transactions and high fees.
If blockchain is to bring mainstream audiences into the new Web3 economy, scalability is the biggest challenge that it needs to address, and layer2’s are at the forefront of this movement.
2. Layer2 Market
In exploring layer2 projects and their value propositions, Ethereum is perhaps the best example of a layer1 ecosystem that’s seeing exponential growth in layer2 activity.
As more and more users enter the Ethereum ecosystem following a surge in retail interest in DeFi, GameFi and NFTs, the Ethereum network has become increasingly congested. Coupled with the rise in ETH prices, gas fees have become incredibly costly, effectively pricing out many new users. Simple transactions like token swaps and NFT purchases can now cost up to hundreds of dollars in fees per transaction during peak times, so the layer1 network alone is no longer a sustainable or scalable option for high frequency and high volume applications like marketplaces and decentralized exchanges. High gas fees are a major problem for the network.
This is where layer2s come in. Over the past year, we’ve seen massive growth in the Ethereum layer2 ecosystem with projects like Arbitrum and Optimism gaining more adoption as developers seek more efficient ways to scale transactions. Our layer2 DEX, which enables seamless cross-chain swaps with extremely low fees, is also gaining a lot of traction. Layers2’s like ours are solving a fundamental problem with layer1 ecosystems, which isn’t limited to Ethereum but equally applicable to all layer1 chains.
Layer2s have become foundational to the broader blockchain and Web3 ecosystem, and demand for layer2s is on the rise. Perhaps one of the best indicators of layer2 adoption is the Total Value Locked or TVL. TVL reflects how much asset value is locked and deployed in the layer2 ecosystem. A growing layer2 TVL is a sign that more users are moving their assets to a layer2 application rather than transacting on layer1. Using Ethereum as an example again, Ethereum’s layer2 TVL is now nearly $7 billion, a more than 900% increase in the last 90 days. Ethereum’s largest layer2 chain Arbtitrum now has $2.6 billion in total value locked. Even our platform ZKSwap has over $200 million in TVL.
And while the anticipated release of Ethereum 2.0 and its migration to PoS consensus over PoW aims to solve some of the network’s underlying scalability issues, layer2 adoption will continue on an upward trend. This is due to the fact that while the Ethereum 2.0 roadmap offers scalability, the base layer scalability for applications is part of the last phase, which is still years away. At the recent Shanghai International Blockchain Week, Ethereum founder Vitalik confirmed that layer2 is “the future of Ethereum scaling and the only safe way to scale Ethereum while preserving decentralization that is so core to the blockchain.”
3. ZKRollups
While Layers 2's are on the rise, they’re not all designed the same. Most Layer2 protocols utilize one of two roll-ups as a scaling strategy: ZK roll-ups, which is what ZKSwap uses; and optimistic roll-ups. The two have similar goals of scaling transactions off-chain without compromising security but they take different approaches.
But first, a quick primer on roll-ups. A roll-up is an off-chain aggregation of transactions inside a smart contract, which reduces fees and congestion by increasing the throughput of the blockchain. These roll-ups can take Ethereum from the current 15 transactions per second, or TPS, to thousands of TPS. Within the smart contract, users can transact with security guarantees their transactions will not be misused and they will settle to the main chain at some point in the future. It publishes just enough data on-chain so that any observer can reconstruct the account balance and detect invalidity.
When comparing ZK to optimistic roll-ups, ZK is much more complex as a technology. From a high level, ZK roll-up is a layer2 scaling solution in which all funds are held by a smart contract on the main chain, while it performs computation and storage off-chain where the validity of the side chains is ensured by zero-knowledge proofs. This makes it ideal for token transfers and other specialized applications. Optimistic roll-ups on the other hand offer an easier way to migrate existing dapps and services with a reasonable degree of security and scalability tradeoff, which is fine for scaling general-purpose smart contracts.
Without going into too much detail, we believe that ZK roll-ups offer the highest level of scalability and security, which is crucial for anything involving asset transfers like our decentralized exchange. This is a sentiment echoed by Vitalik. He recently stated that in the long-term, ZK roll-ups, which were more complex but had strong security, were likely to be the preferred.
4. Emerging Use Cases - Solving Scalability with ZKSwap
After briefly touching on Layer2 and ZKRollup technology, let’s take a look at the emerging use case. ZKSwap is a layer2 DEX employing ZK roll-ups to enable seamless token swaps across multiple chains like Ethereum, Binance Smart Chain, OKChain, and Huobi ECO Chain.
By using a ZK roll-up architecture, our DEX bundles hundreds of token swaps into a single transaction for greater efficiency and lower gas fees. On ZKSwap, user transactions are verified and stored off-chain on layer2 until withdrawals are requested. Liquidity providers and users pay gas fees only when they deposit or withdraw tokens from the Ethereum layer1.
This allows users to trade on ZKSwap with little-to-no gas fees, which greatly reduces user friction and empowers users to trade more freely. Because transactions happen in real-time on layer2, fees are only paid at layer1 withdrawal. This means users can make dozens of trades without incurring exorbitant gas fees and with the confidence of knowing their assets are safely secured by the layer1 contract.
Transactions made on ZKSwap utilize the strong consensus security of the underlying layer1 blockchain whilst maintaining the privacy of zero-knowledge proof and requiring no gas fees. This solution is ideal for users or institutions looking to perform high-volume trades across a wide range of assets. We believe asset security is just as important as scalability so our platform has been fully audited by ABDK, Certik, and SlowMist.
With the recent release of our V2, we further improved our user experience by shortening the withdrawal time from the ZKSwap layer2 to a supported layer1 like Ethereum. We also introduced an Unlimited Token Listings feature that enables users to list any ERC-20 token or create any token pair. Additionally, ERC-20 token and stablecoin transactions on ZKSwap are free and settled in real-time.
In addition to support for all token standards, ZKSwap V2 optimizes branch circuits to improve efficiency and support editing two balances within one account. Layer2 to layer1 token withdrawal speeds have also increased to create a more seamless user experience.
With V2, we wanted to ensure that users not only have a frictionless user experience but also participate in a more expansive DeFi ecosystem that allows anyone to list and swap thousands of new tokens with ease. By leveraging layer2 technology, we’re aiming to make DeFi more accessible to the masses by eliminating unnecessary gas fees and network congestion, which are two of the biggest barriers to DeFi adoption of layer1 chains like Ethereum. We’re helping solve for scalability and usability by offering a more efficient solution for the network and its users.
5. Layer2 NFTs & ZKSwap Roadmap
Beyond the DEX features, ZKSwap looks to introduce NFT features, cross-chain interoperability, and more exciting layer2 products.
Layer2’s can be used to scale any type of application from NFT marketplaces to decentralized gaming but they’re becoming more prevalent for DeFi protocols because of the sheer volume of transactions and the importance of asset security.
This is especially true for decentralized exchanges (DEXs), which allow users to trade freely without the usual limitations imposed by centralized exchanges. While DEXs offer true P2P exchange of wealth in a fully decentralized environment, they can also struggle with poor user experience and be a major source of user frustration.
Without layer2 scaling, single chain DEXs on layer1’s like Ethereum can become quite costly for active traders. Every trade is treated as a standalone transaction, so each trade must be settled on the layer1 chain. This means a user must pay gas fees on every single transaction, even if a series of transactions are needed to make the desired trade. During times of extreme volatility and trading volume, the layer1 network can become congested, not only driving gas fees up but also slowing down transaction times. This lack of scalability creates a poor user experience that can reduce a trader's profit and arbitrage opportunities.
The scalability challenge for DEXs is even more prominent when attempting to support cross-chain swaps. For instance, swapping an ERC-20 token for an asset on Binance Smart Chain would require several layers of transactions to achieve the end result, which would result in unnecessarily high transaction costs without a layer2 solution. That’s why when we set out to build a cross-chain DEX, we made the decision to incorporate ZK roll-ups to improve the user experience with quicker, more efficient transactions.
With many of the details still yet to be unveiled, the upgraded version of ZKSwap is set to be an innovative alternative to some of the existing DeFi platforms.
Moving forward, the team has plans to meet the needs of users by further expanding NFT-related functionality and including batch mining, verification, mystery box auctions, bidding, and much more.
The team is also looking to implement better cross-chain interoperability between different Layer 2’s on Ethereum, BSC, Solona, etc, providing users with even faster and cheaper cross-chain services.
Last but not least, ZKSwap will be working on more features and solutions for improved capital utilization and release a version of ZK-Rollups that is fully compatible with EVM in order to allow Dapp developers to join the ecosystem and build the future of ZKSwap together.
With many of the details still yet to be unveiled, the upgraded version of ZKSwap is set to be an innovative alternative to some of the existing DeFi platforms.