Layer2 TPS, Gas costs, and System Scalability: how do we solve the problem? 18th May

Today’s ZKSwap status: As of 18:00 GMT on May 18th, 2021

  • TVL $382 million
  • Liquidity $167 million
  • Transaction 5982 (24 hrs transactions)

To provide an easy-to-use Layer 2 system, ZKSwap solves the problems of Layer 2 TPS, GAS costs, and system scalability. Today, we’d like to share a bit more details of how do we make it happen.

(1)Layer-2 TPS:

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.

(2) 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 Layer1 and transactions initiated on Layer2. ZKSwap uses off-chain storage for Layer2 transactions while ensuring the security of Layer1 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 tries 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 the product’s long-term development and can realize an infinitely scalable Layer 2 system.

3)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.

ZKSwap is a layer2 dex based on the ZK-Rollup technology and using the AMM model. And You can find us here🥰:

ZKSwap Official Website:


ZKSwap Forum:

ZKSwap Twitter:

ZKSwap Official Telegram group:

ZKSwap Discord:

ZKSwap Medium:

ZKSwap Github page:

ZKSwap Reddit:

ZKSpace ( is an all-in-one layer2 platform, featuring ZKSwap, ZKSea, and ZKSquare.