Huobi ETH Watch: DEX on Layer 2

    2021/02/08 20:11 Maggie Li huang Created with Sketch.
    198

g4sKijRckA6Pknw44iKyVfCG1MByzttj3KaPAHXz.png

Guest: Xin—Huobi Investment

Guest: Alex Lee—ZKSwap Head Developer 

Guest: Joe—ZKSwap Community Manager

Host: Flying Jack—Huobi Community Manager

Huobi Global Telegram group: https://t.me/huobiglobalofficial

Flying Jack:

Hello everyone! Welcome to the Huobi Global Telegram AMA. We will be discussing about Dexes on Layer 2. I am sure everyone would be eager to learn more about Dexes on Layer 2 tech.

Its a great honour and privilege to welcome Xin from Huobi Investment and Alex Lee, ZKSwap Head Developer and Joe ZKSwap Community Manager.

Before beginning the session, could you please introduce yourself to our community?

Joe:

Hi I am joe from ZKSwap. nice to be here! thanks!

Xin:

Im Xin from Huobi Investment, build blockchain infrastructure.

Alex Lee:

I am Alex, lead dev at ZKSwap. But most of the community are aware that our team ZKSwap team is anonymous for regulatory concerns. There are about 20 team members at ZKSwap with rich experience in the blockchain industry. Many team members joined the blockchain industry in 2013 and began to vigorously research zero-knowledge proof in 2018. We have deep field expertise in zero-knowledge proof and smart contract development.

Flying Jack:

Thanks for introduction.

Can you tell us in brief about Dexes on Layer 2 technology.

Alex Lee:

Yes sure. First with the crazy gas fee, it’s a no brainer for layer2.

As of now there are multiple technical routes for layer2, zk-rollups, optimistic rollups, state channels etc. We chose zk-rollups for its fund security and scalability, e.g. almost instant withdrawal from layer2 to layer1.

Among the zk-rollup solutions, there are also schemes with quite different implementations, e.g Matter Labs (zkSync 1.0 only supports transfers), StarkWare (from StarkEx to StarkNet), Loopring (currently only supports trading and Transfer), Hermez (currently only supports transfer), etc.

ZKSwap is one of the pioneering teams that successfully supporting token transfer and AMM model token swap on layer2. This solution allows ZKSwap to achieve real-time swap and transfer with zero gas fees, unlimited scalability, removing the constraint from the Ethereum’s TPS, and block confirmation time.

Based on the team’s deep optimization of the ZK-Rollup Plonk Scheme, ZKSwap’s TPS can be over 100. It means the entire ZKSwap system can handle nearly 10 million transfers and swap transactions every day. Subject to the computation speed of SNARKs and the native chain TPS, the TPS of most other layer2 solutions is lower than 10

Haha, zero-knowledge could be hard to understand and I won’t delve into the tech details. But layer2 dex is inevitable. ZKSwap is confident we are only to be one of the leading players because we have achieved a lot in terms of gas fees, scalability and layer2 TPS.

Flying Jack:

Since ZKSwaps inception in August 2020, it has created many buzzwords in the industry. From pioneering in the layer 2 defi sector by launching the ZK-Rollups+AMM model, introducing zero-knowledge community mining to massive testnet incentive programs. From your perspective, can you summarize ZKSwap in a few sentences?

Alex Lee:

Yeah absolute.

ZKSwap is a layer2 dex based on AMM using ZK-Rollups technology. This solution allows ZKSwap to achieve real-time swap and transfer with zero gas fees, unlimited scalability, removing the constraint from the Ethereum’s TPS, and block confirmation time.

We are a considerably new team but most of our devs are OG in the industry with strong field expertise in zero-knowledge proof and smart contract development. We have made great progress and innovation along with way. 

What makes ZKSwap unique lies in our talent pools and continuous innovation. Restricted by the global regulatory uncertainty, the early development of ZKSwap is in Stealth Mode.

Regarding innovation, the upcoming version of ZKSwap fully implements Uniswap on Layer-2. The transaction capacity of ZKSwap is about 100 times that of Uniswap, while the gas cost is only 1/100 of that of Ethereum layer1. A small step for us, a big step for the industry.

Although there are many layer2 products on the market, most of them are not production-ready, and the user experience is relatively poor. ZKSwap will bring a safe, efficient, and smooth DeFi experience on Layer-2.

Flying Jack:

Thats very interesting

At present, ZKSwap has just completed the final stage of the testnet. It is said that this is the fifth version of the testnet. Can you briefly summarize the challenges encountered during the development of the testnet and what achievements have been achieved?

Alex Lee:

When developing ZKSwap, there are indeed many difficulties. ZK-Rollups are very challenging, someone call it moon-math. We have overcome the following challenges when developing an easy-to-use layer-2 dex based on ZK-Rollup technology, including layer2 TPS, gas fees and system scalability.

Two factors affect layer-2 TPS, a. in ZK-Rollups solutions, with more complicated logic, it requires bigger circuits. Therefore, one rollup can contain fewer transactions; b, The zero-knowledge proof takes longer to generate. ZKSwap has optimized circuits for AMM transaction scenarios and currently contains more than 200 transactions in one block. At the same time, the ZKSwap team customized the GPU accelerated version for PLONKs to generate SNARKs. At present, ZKSwap’s transaction TPS can reach over 100. To put into perspective, ZKsync’s TPS is currently lower than 10, or even less than 5. Based on ZKSync, ZKSwap has achieved a 10-fold increase in TPS. With high TPS users will have a smooth experience.

Another challenge is gas fee. There are also two factors affecting gas fees on ZKSwap: a. Transaction data on-chain; b. on-chain block state verification. There are two types of transactions: transactions initiated on L1 and transactions initiated on L2. ZKSwap uses off-chain storage for L2 transactions while ensuring the security of L1 transaction data. Any user can compare whether the transaction data in each block is consistent with the data on-chain at any time. At the same time, ZKSwap optimizes the logic of block data going on-chain and try to upload multiple blocks at once. For the first time, the ZKSwap team adopted multi-block aggregation verification technology, allowing multiple blocks to be verified on the chain at once. The GAS cost is greatly reduced through the above optimization, and the system has huge scalability. The zero-knowledge proof aggregation technology lays a solid foundation for its long-term development and can realize an infinitely scalable Layer 2 system. This solves a great pain-point for the industry.

A third challenge is the design of the off-chain state Merkle tree.

The design of the state tree under the chain requires many considerations: a. The number of supported accounts and the number of tokens b. The status of AMM is simple to update c. The circuit scale. Based on a deep understanding of AMM’s state update logic, the ZkSwap team adopts a unique token design that can support larger accounts and the number of tokens while maintaining a certain circuit scale.

By solving all this, it’s really a small step for us the big step fo the industry. We are very happy that we’ve contributed some foundational work to the industry.

Flying Jack:

With the DeFi boom, weve seen growth in lending, assets, and DEXes. A lot of new products have emerged. From your perspective, what do you think about the development of the entire DEX track?

Alex Lee:

Yeah that’s a great question.

The development of DEXes has also gone through several phases.

In the early phase between 2013 to 2015, there were already some DeFi products in the industry, including BTC-based decentralized exchanges of colored coins, BitShare-based DEX, and NXT’s decentralized exchange, all order-book DEXes. That period marks an early exploration of defi. As for why early DEXes failed to get traction, it should be because the industry was too early back then with not enough assets or users.

The second phase was between 2015 to 2019. With Ethereum smart contracts, some smart contract-based order-book DEXes appeared, such as IDEX and EtherDelta.They met users’ demand for fund security and private transactions but did not bring fundamental changes to the industry.

The second phase was between 2015 to 2019. With Ethereum smart contracts, some smart contract-based order-book DEXes appeared, such as IDEX and EtherDelta.They met users’ demand for fund security and private transactions but did not bring fundamental changes to the industry.

The third phase of DeFi was between 2019 to late 2020. The rise of AMM modeled DEX spearheaded by Uniswap has brought a huge impact and growth to the blockchain industry. Unlike the order-book model, with the AMM model, liquidity is sustained in the pool and hence less likely to have low liquidity. The AMM model is a truly disruptive innovation of the trading model. However, bottlenecks on layer1 such as transaction capacity, and gas price are unsolvable in layer1 DEXes.

We believe that the fourth phase of DeFi is layer2 DEXes with the AMM model. Because ZKSwap is based on the ZK-Rollup technology, funds in layer2 are as secure as the underpinning layer1, but the transaction capacity and efficiency are 100x that of layer-1, while the transaction cost is only 1/100 of layer-1. Therefore, we believe that ZKSwap is the next-generation DEX and we are ahead of the curve. DEXes will exceed CEX in both the asset classes and the final trading volume.

It’ll be inevitable.

Flying Jack:

Rightly said.

With the rising gas fee, more and more users are looking at layer-2. And many projects have chosen ZK-Rollups, e.g., Matter Labs (zkSync 1.0 only supports transfers), StarkWare (from StarkEx to StarkNet), Loopring (currently only supports trading and Transfer), Hermez (currently only supports transfer), etc. What do you think are the similarities and differences between ZKSwap and them?

Alex Lee:

There is a table uses four technical designs to categorize current product offerings in layer-2. But even under one technical route, there are different schemes with huge differences.

M0IaXyRezo9uxIa7CfzuiNupAeWRnQpyEKXXM9Wu.png

One major difference is definitely that we chose ZK-Rollups, because we favor solutions that ensure fund security through zero-knowledge proof

Assuming the same fund security, another major difference between ZKSwap and other layer2 DEX lies in its layer-2 system's scalability. A layer-2 system's scalability depends on two factors, TPS and on-chain cost, which are mutually restrictive.

On top of that, ZKSwap has done in-depth research in layer2 and has made many engineering implementation innovations, including the GPU optimization of the Plonk algorithm, aggregating transactions, and system scalability, which we believe will have a great impact on the whole industry.

Flying Jack:

Liquidity is crucial for DEXes. With the AMM model, liquidity providers can obtain stable profits from market-making. How does ZKSwap plan to attract liquidity and trading volume?

Alex Lee:

Yes, right on.

Trading volume is significant to ZKSwap, to all DEXes matter of fact, which essentially depends on user sizes.

ZKSwap aspires to attract users with smooth user experiences. Also, ZKSwap will host a large-scale airdrop to Uniswap, Sushi, and possibly more DEX users after it goes live to encourage existing DeFi users to try DeFi on layer2.

On top of that, ZKSwap will host multiple community mining activities after the mainnet launch, aiming to attract and retain users.

Flying Jack:

ZKSwap is estimated to launch on Ethereum mainnet on Feb 8th, 2021. How to ensure the security of the mainnet? What functions will be available when the mainnet is online?

Alex Lee:

The mainnet version of ZKSwap has successfully passed the security audits of ABDK, Certik, and SlowMist.

ZKSwap has conditions to launch on the mainnet. The team will deploy layer1 smart contracts and Layer2 systems step by step to the Ethereum mainnet this week while observing its operation on the Ethereum mainnet. At present, the team is still doing the final test. The launch date will base on our test results.

After the main network goes online, it will support the real-time free transfer and swap of ETH and ERC20 tokens on layer-2, and the system TPS can reach 100. And layer-2 token transfer and swap cost 0 gas fee. ZKSwap will support transfer and swap for 30 tokens in the first batch and soon support more than 100 tokens. Token listings and liquidity pools will eventually be open to community voting.

Flying Jack:

What is the mid-term and long-term plan for ZKSwap?

Alex Lee:

That’s a great question.

Our mid-term plan is to cooperate with more exchanges and wallet service providers to use ZKSwap’s layer-2 standard; to support free transfer for all ERC20 tokens, including stable-coins, and to support private transfer and swaps. Our long-term plan is to abstract the technology of ZKSwap and builds a layer-2 protocol; to support more DeFi projects, and use ZKSwap technology to build future DeFi on Layer 2.

Flying Jack:

One layer-2 solution rules them all or multiple layer-2 solutions? What about layer-2 composability?

Alex Lee:

We think there will be multiple layer-2 solutions coexisting in the future, and the market size of Layer 2 will be at least 20%-30% of Ethereum because eventually, all users will use layer-2 solutions.

The process of user migration from layer-1 to layer-2 is the process of layer-2 value discovery.

With multiple layer2 solutions, defi composability will be another crucial factor.

There are two solutions for layer-2 composability. One is that all transactions return to Layer1 first and then interacts. For example, ZKSwap supports layer-2 LP token withdrawal to Layer1; then its composability is the same as defi products on layer-1.

Another solution is that projects using the same layer-2 standard will be composable. At present, there are already several projects willing to use the ZKSwap solution; these projects can interact with each other. With the programmability of layer-2 (supporting virtual machines or common modules), the composability and interactivity of layer-2 solutions will also be greatly improved.

Flying Jack:

Thank you so much Xin, Alex, Joe and all Huobians for taking part in this very engaging AMA.

Due to time constraints, many questions couldn't be answered. If anyone has more questions or feel that their previously asked questions need to be answered, please tag Xin, Alex or Joe they would definitely be more than willing to answer all the questions.

    Adapted from: Executive editor: 李萍萍
声明:本文由入驻金色财经的作者撰写,观点仅代表作者本人,绝不代表金色财经赞同其观点或证实其描述。
    News ranking
Not found
Feed
back
TOP

Copyright © Cointime Copyright notice

https://t.me/cointimeus