1. Why did we develop a layer 2 DEX?

Since 2019, the blockchain industry has undergone tremendous changes, as DeFi is rapidly emerging. As of February 25, 2021, the total value locked (TVL) in DeFi protocols has topped 60 billion U.S. dollars. With vigorous development of on-chain assets and continuous transfer of assets from off-chain to on-chain, we firmly believe that the TVL in DeFi protocols will soon exceed 100 billion U.S. dollars. These on-chain assets all have the need for fast, frictionless, trust-free, and real-time exchanging, which has led to the rise of numerous new decentralized exchanges (DEXs).
But these DEXs face several pain points:
  1. 1.
    The gas cost is usually as high as dozens of dollars, which hinders transactions by new users.
  2. 2.
    Every transaction and every operation need to wait for at least one block confirmation, which means poor real-time performance.
  3. 3.
    Limited by TPS on Ethereum, the transactions per second and transaction capacity have a low ceiling.
EdgeSwap is a new swap protocol based on ZK Rollup technology. Through ZK Rollup technology, all ERC20 tokens are transferred to layer 2. Based on continuously generated zero-knowledge proofs, the consistency of the state between layer 1 and layer 2 is guaranteed, so that all exchanging takes place on layer 2, which takes zero gas cost and is in real time (no need to wait for one block confirmation). Moreover, EdgeSwap features unlimited scalability, which eliminates the limitations of TPS and block confirmation time on Ethereum, delivers a silky experience like CEX (Centralized Exchange), and allows users to control the security of their funds in real time.

2. Advantages of EdgeSwap over layer 1 DEX

Although layer 1 DEXs have made great progress, they still have very obvious shortcomings. In comparison, the biggest advantages of EdgeSwap are:
  1. 1.
    Low cost (0 GAS): Compared to the gas cost of tens of US dollars per transaction on Layer 1 (as the price of ETH increases, gas will get higher and higher), the gas fee per transaction is 0 on layer 2 EdgeSwap, greatly saving the transaction cost for users.
  2. 2.
    Fast speed (real-time exchange): On Layer 1, every transaction and every operation need to wait for at least one block confirmation, leading to poor real-time performance. In EdgeSwap, all transactions happen on layer 2, and users do not need to wait for the time of one block confirmation, achieving real-time transactions.
  3. 3.
    High TPS: Layer 1 is subject to the limitations of Ethereum TPS, and the number of transactions per second and transaction capacity have a low ceiling. By optimizing GPU and circuit proofs, EdgeSwap can achieve hundreds to thousands of TPS in a trust-free manner. If enough machines are added for scaling up, the theoretical TPS can reach about 6,000 TPS.

3. The differences between EdgeSwap and CEX

CEX has gathered a huge number of users and transactions. Compared with them, EdgeSwap has the following characteristics:
  1. 1.
    From the perspective of asset security: the CEX wallet stores all users’ funds. Due to the huge size of funds, it is easy to attract hackers. Once a hack occurs, almost all users suffer from losses. In EdgeSwap, however, users’ assets are not saved by the platform, but are managed by smart contracts. During the transaction, users' assets are not touched by the platform, as each operation is confirmed by traders signing with a private key and the exchanged assets are directly transferred to the layer 2 wallets.
  2. 2.
    From the perspective of asset control: In CEX, users’ assets are controlled by the platform, as users need to deposit their assets to the wallet of the trading platform. The asset custody of the centralized trading platform functions like a bank, that is, users deposit money in the bank, and the bank gives them an account to record the fund status. The bank has absolute control over the user’s funds. In EdgeSwap, users have complete control over their assets and EdgeSwap does not provide fund custody services, so it cannot control or transfer users' funds. As a layer 2 DEX protocol, EdgeSwap’s contract and circuit code have passed the security auditing of the three major auditors (ABDK, Certik, and SlowMist). The users own their private keys and assets are under their control.
  3. 3.
    From the perspective of the user registration process: In CEX, users register an account and set a password to access the platform. This process generally requires KYC, submitting the corresponding materials for review. In EdgeSwap, users access EdgeSwap by connecting to the Ethereum wallet, without the need of KYC, which is faster and more convenient.
  4. 4.
    From the perspective of transaction process: CEX transactions are completed through order book matching, while EdgeSwap is based on the automatic market maker (AMM) model, which has obvious advantages in users’ asset utilization efficiency and transaction depth. The transaction process is fully executed by the smart contract, without any third party acting as a matching intermediary.

4. Where is the user's funds hosted?

In EdgeSwap, users' assets are stored in smart contracts, not in the platform.
During the transaction, the platform does not touch the user's assets. The assets are completely controlled by the user as each operation requires the trader signing with the private key. Except for the user who owns the account’s private key, any third party cannot control and transfer the user's assets.
Even if the layer 2 network fails, any user of EdgeSwap can obtain data from the contract transaction records to restore the layer 2 state tree, and then generate a proof to withdraw funds from the system.

5. How to trade on EdgeSwap?

Connect your decentralized wallet to edgeswap.io, deposit assets to your layer 2 network account, and then start trading.

6. Can assets be transferred directly from EdgeSwap to the exchange address?

Not supported currently.
Since the exchange currently does not support EdgeSwap's layer 2 network transfer, please do not use the layer 2 transfer function to transfer assets between EdgeSwap and the exchange address.
In the future, we will promote interoperability with exchanges, establishing layer 2 asset transfer channels for real-time transfers.

7. Is withdrawal in EdgeSwap faster?

The withdrawal function has been optimized thanks to the recently completed EdgeSwap layer 2 upgrade. The withdrawal time from layer 2 to layer 1, which is processed by the smart contract on EdgeSwap, will be optimized to the greatest extent.
In the future, we will continue to upgrade our technology and products, providing better services and experience.

8. What is the current TPS of EdgeSwap? How to achieve scalability? Why is it said that because of the global consensus of Ethereum, TPS cannot be increased by spending any amount of money?

Compared with Ethereum's 10 to 20 TPS, EdgeSwap's current TPS is about 100 transactions per 15 seconds, which can reach more than 6,000 theoretically. Because all transactions occur in layer 2, EdgeSwap has unlimited scalability.
In the future, EdgeSwap will focus on the following to improve scalability:
  1. 1.
    Expand a large number of prover nodes.
  2. 2.
    Increase the chunk value of each block and the number of packaged transactions.
  3. 3.
    Optimize the circuit performance and the GPU.
In addition, EdgeSwap will also launch a Turing complete EVM based on ZK Rollup. Through EVM, diversified product functions can be created, and system scalability can be improved. Besides, more ZK ecosystem projects can be developed.
Ethereum's global consensus has a throughput limit, which depends on the block size and block out time. The larger the block, the shorter the block out time and the greater the throughput. However, larger blocks are not conducive to the decentralization of nodes, and reducing block out time increases the probability of chain forking. Simply increasing the block size or reducing the block out time cannot solve the problem, because it takes time to transmit and verify blocks. If the block is too large, the inconsistency of network nodes will be increased (more forks), which seriously affects safety.