Overview of ZK Rollup-based Order Book DEX DeGate: Supports Limit Orders and Grid Trading
Author: Karen, Foresight News
The dominant position of Ethereum's vast ecosystem will remain unshakable for a long time in the future. The DEXs built on it, especially those adopting the AMM model, have developed rapidly in the past two years as the cornerstone of the DeFi ecosystem, becoming an indispensable part of users' lives. However, issues such as high Gas fees, inability to discover market prices, high slippage for large trades, and experiences that do not match CEXs have, to some extent, determined the developmental ceiling of these DEXs.
To address this, most DEXs have begun exploring expansion to other public chains or Layer 2 solutions. Although this has greatly alleviated the problem of high Gas fees, inherent issues of the AMM mechanism, such as pricing, high slippage for long-tail tokens, impermanent loss, and lack of support for limit orders, remain difficult to resolve. A decentralized order book mechanism that matches buy and sell orders would be a perfect complement, as it can not only reduce slippage risk and be friendly to large trades but also easily support limit orders and grid trading, similar to CEX experiences.
Today, we will introduce DeGate, a decentralized order book protocol based on ZK Rollup, designed to address these pain points and needs. DeGate adopts an order book model similar to traditional CEXs, supporting limit orders and grid trading. Since it is also built on ZK Rollup, it first collects a large number of transactions off-chain, then batches and compresses them before adding them to the Layer 2 block, generating proofs, and finally verifying and settling the proofs on Ethereum.
What is DeGate?
DeGate is a zero-knowledge proof (ZK)-based order book DEX protocol that is trustless and supports permissionless token listings. On one hand, it inherits the security of Layer 1 within the Ethereum ecosystem, and on the other hand, it can significantly save Gas fees through ZK scaling solutions, with no fees for placing orders.
In the DeGate protocol, due to the use of ZK Rollup, relayers first collect a large number of transactions through off-chain circuit programs to generate SNARK proofs (representing changes in the state of the DeGate protocol). Then, DeGate uses immutable open-source smart contracts on the Ethereum main chain to verify this proof and update the state. The transaction logic is guaranteed by the circuit, and the data of asset changes is submitted to Layer 1 to ensure data availability. The Merkel tree root stored in the smart contract ensures the consistency of these asset changes with the circuit logic. In other words, transactions in the DeGate protocol can significantly reduce costs while sharing the security of the mainnet.
It is worth emphasizing that DeGate also provides limit orders and grid trading services similar to centralized exchanges. The "matching nodes" in DeGate's ZK Rollup can efficiently match orders placed by platform traders off-chain and periodically record transactions on Ethereum.
Since DeGate launched on the Ethereum testnet Rinkeby in mid-March, despite a cooling market sentiment in the second quarter, its registered accounts have exceeded 60,000.
Highlights and Innovations of DeGate
Supporting both limit orders and market orders is a key feature of DeGate as a ZK Rollup decentralized trading protocol, meeting users' diverse trading strategy needs. Market orders ensure that users can execute trades immediately at the best price or market price, while limit orders are more suitable for large orders, allowing users to set a specific price at which they wish to execute a trade, automatically triggering when the real-time price reaches the designated point, thus obtaining better entry or exit opportunities.
Grid trading is a quantitative trading feature added by DeGate, modeled after CEXs, and is another significant advantage compared to most DEXs. It allows users to set grid intervals to take advantage of volatile markets by buying low and selling high. If the grid interval parameters are set reasonably, users can continuously earn passive income, although they must also guard against one-sided market movements. From another perspective, grid trading will significantly enhance trading depth for DeGate. Currently, DeGate offers two modes for grid strategies: one-click creation and manual creation. The one-click creation mode will maximize the number of grids while ensuring that the asset quantity in each grid exceeds the minimum value based on the amount of assets the user wishes to invest.
In addition, DeGate, while supporting an order book model, also features complete decentralization, trustlessness, and permissionless token listings, allowing anyone to list any asset. This not only favors mainstream tokens but also alleviates the liquidity issues faced by long-tail tokens on other DEXs. Furthermore, the limit order and grid trading functionalities can activate the long-tail market while increasing order book depth.
To pursue complete decentralization, the DeGate protocol has no management authority. Once deployed, the code execution logic will be immutable. DeGate also truly realizes the trustless characteristic, as the assets deposited by users are non-custodial. Even in the worst-case scenario where the operator running the DEX based on the DeGate protocol goes offline or cannot provide services, DeGate users can enable "Exodus" mode by calling the contract code to retrieve their assets within 15 days. Additionally, DeGate will gradually decentralize its operators to reduce risks from individual operator nodes. Moreover, DeGate has completed a round of security audits.
Regarding the highly anticipated trading costs, DeGate has optimized both the Gas fees for account opening and trading, and does not charge fees for placing orders, only a small fee for market orders. DeGate's decision not to charge fees for placing orders also considers the importance of market depth and liquidity, aiming to attract more trading liquidity. In the future, the fee parameters for each trading pair will be determined by DeGate DAO voting.
For account opening and deposits, DeGate has created a deposit option that can save Gas. Deposits are made using simple transfers instead of contract calls, which can reduce one-time Gas fees by up to 75%. In terms of trading, DeGate adopts the Efficient Gas Saving (ESG) concept, which can significantly reduce Gas consumption through batch spot trading while maximizing the advantages of ZK Rollup.
DeGate states, "Essentially, the batch spot trading mechanism can intelligently bundle and compress multiple transactions before they are added to the DeGate Layer 2 block. Then, validity proofs are generated through encryption and submitted to the Ethereum mainnet. This mechanism can bundle up to 9 orders from multiple users into a Layer 2 transaction with a data length of 83 bytes."
Conclusion
In the current Ethereum ecosystem, SushiSwap, 1inch, ZigZag, and rhino.fi (formerly DeversiFi) have all supported limit orders. SushiSwap, which uses the AMM mechanism, allows users to deposit funds into BentoBox after placing limit orders to wait for execution. However, according to a report from Flipside Crypto, the number of limit orders on SushiSwap accounts for less than 0.25% of all transactions on the protocol, with only 0.045% of SushiSwap users having engaged in limit order trading. 1inch places limit orders into a central 1inch database through the 1inch UI, which are executed by takers when market prices match the limit orders. The order book trading protocol ZigZag based on zkSync does not support the creation of a token factory, so it only supports existing tokens in its UI.
Additionally, DeGate offers a trading experience closer to traditional CEXs, and its non-custodial asset storage is a key advantage compared to other competitors. There is no centralized authority that can access users' assets, and in the worst-case scenario, users can retrieve their assets within 15 days.
Regarding liquidity issues, DeGate stated in its latest AMA that it expects to launch liquidity mining activities simultaneously with the official mainnet launch, which will be combined with the decentralized grid trading functionality, allowing users to earn rewards while setting grid strategies for trading pairs.
In summary, the ZK Rollup solution and batch spot trading mechanism adopted by DeGate can significantly reduce Gas consumption. Coupled with the support for simple transfers for account opening and deposits and the absence of fees for placing orders, users can trade at low costs without sacrificing security and decentralization. Furthermore, the permissionless listing feature combined with limit orders and grid trading opens up possibilities for the long-tail market, which will ultimately feed back into DeGate.