ZKSwap: the Next Generation DEX based on zk-Rollup technology

ZKBase
ZKBase
Published in
4 min readSep 22, 2020

--

ZKSwap is a layer-2 token swap protocol based on zk-Rollup technology. Developed by L2Lab, ZKSwap protocol will soon be launched on the Ethereum testnet. In the near future, L2Lab will also launch a layer-2 DEX swap standard.

The DeFi Mania

To the “farmers” who have seen the frenzy of liquidity mining and food emoji tokens, the market seems to have calmed down for days. DeFi has evolved at a swift pace. The market has witnessed the emergence of several unicorn projects, while most of the rest only have incremental innovation in tech or governance.

defipulse.com

The top ten DeFi projects on Ethereum have solidified their rankings, seizing over 99% of the Total Value Locked on all the DeFi protocols. There is a growing challenge for new projects to compete for liquidity. The market has gotten complacent with incremental innovations or team drama. A new phase for DeFi is dawning, setting the stage for more concrete innovations.

Looking back at the DeFi mania, there have been some bubbles for sure, but quality DeFi products have emerged and will stay. Such real innovation is seeded years before the market notices it, and is seldom swayed by the market hype. Among them, Automated Market Maker(AMM) modeled DEX has definitely become a new cornerstone for DeFi.

Innovation and Bottlenecks

Unlike the order book model often used by centralized crypto exchanges, AMM uses the constant product formula to determine token prices. And arbitrageurs are incentivized to narrow the price gap when there is a divergence between the DEX price and the external price. AMM model removes intermediary.

For mainstream trading pairs like ETH — USDT, the AMM model will see a comparatively small slippage because of the high liquidity. For less liquid trading pairs, trading will be executed, but it is likely to have high slippage. Nonetheless, AMM is a tried and tested venue for the token exchange.

AMM modeled DEXes like Uniswap has gained huge market traction. However, they still face drawbacks like high gas fees, slow confirmation, and blockchain congestion, which have turned away many users. A recent example would be Uniswap airdrop. Because many users were claiming their airdrop at the same time, they had to wait for hours for the transaction to be confirmed. And the gas fee for one transaction was about 30 USD. Those bottlenecks reside in the scalability issue of underpinning public blockchains.

zk-Rollup: A Layer-2 Scalability Solution

There has been a lot of research on scalability solutions, among which zk-Rollup has seen rapid development and is production-ready. It can be used to solve the scalability issue on Etherum, providing a fast user experience with low gas fees. Comparing with other scalability solutions, zk-Rollup does not require users to stay online, and the users can retrieve funds from the smart contract within a short time.

Built by L2Labs, ZKSwap users zk-Rollup to move ERC20 tokens to layer-2. It uses continuous zero-knowledge proof to verify the consistency between the mainchain and layer-2. All exchange transactions execute on layer-2 in real-time, without the need for the one-block confirmation time and hence little gas fees. The solution is also highly scalable, removing the bottleneck from the underpinning blockchain. With zk-Rollup, DEXes can provide a smooth user experience as centralized exchanges while allowing users to have full custody over their funds.

Self-custody is a crucial feature of decentralized exchanges. It allows users to have full ownership and access to their funds. On ZKSwap, users control their private keys. All transactions are still verified onchain. The blockchain can calculate and get the status based on the root node hashes of the layer-2. Unlike state channels, this solution does not need the users to stay online. The Prover collects the transaction request(with signatures), processes the request, calculates the process, and submits the layer-2 state delta and corresponding proof onchain for verification. The Prover cannot tamper with any of the data and has no access to the user’s funds.

ZKSwap: a Layer-2 Tolen Swap Protocol based on ZK-Rollup and layer-2 DEX Standard Coming Soon

ZKSwap uses zk-Rollup technology to provide a smooth user experience with fast confirmation, low-cost, and high-efficiency. It is how the next generation decentralized exchange should be.

L2Lab will soon launch the ZKSwap protocol on the Ethereum testnet. In the near future, L2Lab will launch a layer-2 DEX swap standard. All existing DEXes can seamlessly integrate ZKSwap and benefit from its layer-2 token swap protocol.

ZKSwap Official Website: https://zks.org/en

ZKSwap APP: https://zkswap.app

ZKSwap Twitter: https://twitter.com/ZKSwapOfficial

ZKSwap Discord: https://discord.gg/ZRxS8fYTDv

ZKSwap Github page: https://github.com/l2labs

ZKSwap Official Telegram group: https://t.me/zkswapofficial

ZKSwap Official WeChat Account Admin:

--

--

ZKBase
ZKBase

ZKBase (https://zks.org) is an all-in-one layer2 platform, featuring ZKSwap-DEX, ZKSea-NFT, ZKSquare-payment and ZNS-DID.