From the early Bitcoin electronic cash system, to Ethereum represented by EVM and cross-chain projects such as Polkadot and Cosmos, to the rise of NFT, DeFi, and DAO, the crypto world has slowly transitioned from the barbaric era to the functional era with multiple application scenarios. The continuous development of the market is driving the continuous improvement of user demand. BSC/Solana/Avalanche, a low-cost, high-speed smart contract public chain, has attracted tens of billions of dollars in user managed assets, and Arbitrum/Optimism/Polygon's L2 blockchain, which aims to support Ethereum's expansion, is becoming an indispensable part of the blockchain infrastructure market.

We are experiencing an era of powerful infrastructure. With the maturity of these smart contract public chains, complex and high-performance financial systems such as DeFi can be applied.

The birth of DeFi has, in a sense, changed the situation of "strong protocol, weak application" in the industry. Its birth has brought new application value directions to crypto finance, and also provided an important reference for the future transformation of traditional financial models. In just less than two years, DeFi has developed a variety of models such as stablecoins, lending, DEX, derivatives, prediction markets, insurance, and payment platforms. Among these models, the DEX model is more successful because of its early innovative proposal of AMA (automated market maker mechanism), which brought it a huge traffic base, which makes it far ahead of other DeFi track protocols in terms of market value.

DEX has obvious advantages over traditional exchanges: it can achieve minimal slippage transactions, AMM market-making mechanism, liquidity mining mechanism, etc., which greatly improves users' trading efficiency and trading experience. Because it has advantages that CEX does not have, DEX is currently a very important part of the entire crypto ecosystem.

Overview of DEX Ecosystem

The birth of DEX can be traced back to Counterparty in 2014, when the platform provided the innovative function of Counterparty DEX, and all Counterparty tokens could be traded on the DEX based on the Bitcoin network. Then OasisDEX on Ethereum launched the first on-chain matching and settlement, becoming the early source of liquidity for platforms such as Uniswap and DYDX. After OasisDEX, mature spot-based DEXs such as Uniswap, SushiSwap, and Curve, as well as derivative contract-based DEXs such as DYDX and Kujira, and OrderBook DEXs such as D5 Exchange with low slippage, aggregated liquidity, and multi-chain transactions, gradually emerged. After several years of ups and downs, DEX has evolved into four branches, which are mainly divided into the following categories based on the current categories:

Classification of DEX

Name of DEX

AMM Spot

Uniswap、SushiSwap、Curve、Balancer、QuickSwap.....

Aggregator

1inch、Dodo、D5 Exchange、Matcha、ParaSwap、CowSwap....

Derivatives

GMX、Gains Network、DYDX、Perp.....

Order Book

DYDX、D5 Exchange、Kujira、HyperliquidX.....

Main representatives of each DEX track:

(1) AMM spot: DEX that provides spot exchange transactions; representatives: Uniswap, SushiSwap

Uniswap: As the leader of DEX, Uniswap has occupied the king position for a long time, and its trading volume can reach half of the DEX market share. The reasons for its success are firstly the success of the AMM mechanism and secondly the wealth effect brought by uni. Uniswap has gone through different stages from V1 to V3. From solving the limitations of constant product market makers at the beginning, to optimizing automatic market makers, and then to improving the capital utilization of range prices, thereby maximizing LP returns. Uniswap has achieved the greatest optimization at the technical level. Because of its extremely high product utilization rate, the average daily trading volume exceeds one million US dollars.

SushiSwap: As a "fork", SushiSwap could compete with Uniswap in market share when it was first launched, because it started liquidity migration and absorbed 50% of Uniswap's liquidity. However, it soon fell behind. SushiSwap is no different from Uniswap in terms of technical features. It continues the design of Uniswap and does not form a new model. It also adopted the exchange pool + AMM model in the early stage. Therefore, as a "shadow" existence, after strong players such as Uniswapv3 and Curve began to exert their strength, it is no longer in the discussion of the top 10 DEXs. By comparing the transaction volume, the gap between SushiSwap and Uniswap is huge. SushiSwap is now facing the problem of increasing loss of liquidity and insufficient innovation in product models.

(2) Stablecoin: mainly serves stablecoin (USD type) asset transactions; representative: Curve

Curve: Compared with spot DEXs such as Uni and Sushi that focus on volatile asset transactions, Curve provides extremely stable and efficient stablecoin (USD) transactions. It supports users to trade stablecoins with low slippage and low transaction fees, greatly reducing the pressure of impermanent loss on LP users. The core design of Curve is the swap curve of stablecoins. This swap curve is smoother in the range near 1:1, so Curve can achieve lower fees than CEX for small transactions, which is one of the main reasons why it can attract users. Although it also uses AMM, compared with Uni and Sushi, it has established a series of unique and innovative mechanisms to encourage LP to provide liquidity. Curve's business capabilities in stable counterparty assets are ahead of the industry.

(3) Aggregator: A DEX that improves trading efficiency by aggregating the liquidity of major decentralized exchanges; representative: 1inch

1inch: 1inch is the earliest DEX that aggregates the liquidity of decentralized exchanges. It helps traders improve trading efficiency by finding the best token exchange rate. At the same time, 1inch is also the best DEX aggregator. 1inch uses the Pathfinder algorithm to help users find the best trading path within 1 second, greatly improving the user's exchange speed. 1inch supports users to choose the lowest gas fee or choose a path with higher overall returns to meet the various needs of users. Although it can provide users with better quotes, in order to maintain this advantage, 1inch needs to continuously gather more liquidity and reduce gas costs.

(4) Derivatives: DEX that provides derivatives trading; representative: DYDX

DYDX: DYDX, which uses the StarkWare expansion solution, not only provides lightning-fast transaction speeds comparable to CEX, but also adopts CEX's OrderBook model. In the early days, DYDX attracted a large amount of liquidity by introducing multiple liquidity providers, designing transaction mining, and liquidity provider reward models. For a period of time, its trading volume exceeded Uniswap. In order to improve the efficiency of product and asset use, DYDX uses the off-chain OrderBook and on-chain order settlement model, so the trading experience is also closer to CEX.

Existing problems and directions for DEX advancement

Judging from the data reports, DEX's TVL has long accounted for more than 50% of the DeFi market. Without the support of DEX, DeFi will not be able to rotate the giant ship of the crypto market. However, there are pros and cons. Although DEX provides users with safe financial services under the concept of decentralization, it also has more prominent problems. At the beginning of the DEX outbreak, the most criticized problems for DEX users were poor transaction depth, impermanent loss and slow speed.

Transaction volume problem: Compared with giants such as Binance, Coinbase, and FTX in CEX, the current DEX transaction volume is relatively small. The most intuitive problem of transaction volume is the lack of transaction depth, which is caused by a combination of factors. Compared with professional market makers in CEX, the depth of DEX can be said to be completely defeated. Although it has done very well in some currencies, there is still a big gap in overall depth compared with CEX.

Trading experience issues: In terms of trading experience, DEX does not require the KYC of traditional centralized exchanges, and the assets are managed by themselves, which ensures their privacy and asset security. However, the disadvantages of DEX are also obvious, such as impermanent loss and slippage. Secondly, due to the lack of trading depth, traders have to face higher trading slippage than on CEX. These all bring potential losses to traders and are also obstacles to the development of DEX. However, with the birth of on-chain OrderBook DEX such as D5 Exchange, under the support of the GMPB+GPML innovative model, impermanent loss and trading slippage have been greatly improved. Traders can place orders accurately according to their needs, and chart K-line trading can make each price transaction clear and transparent, and the trading experience is smoother.

Asset usage issues: DEX relies on smart contracts to match transactions between users. Smart contracts are completely decentralized and not supervised by centralized parties. This means that traders can deploy enough funds to exploit loopholes in the protocol, and no one can intervene to prevent it from happening. The Mango incident is the best negative example. Hackers used tens of millions of dollars to consume $116 million in liquidity. Secondly, DEX will cause slow transactions and expensive gas fees due to network congestion, which to some extent reduces the user's capital efficiency. DEX guarantees the user's transaction sovereignty and ensures the security of the user's transaction assets under the premise of broadening the user threshold. Most DeFi entrepreneurs are innovating solutions to improve the applicability of DEX. There are some obvious problems, such as the DEX that meets the platform for reasonable transactions of various currencies. There is no DEX yet. Uniswap is not suitable for the transaction of long-tail DeFi assets, while Curve is more suitable for stablecoin transactions. DEXs that use off-chain transactions, such as DYDX, can provide CEX trading experience, but there are security risks. Therefore, the current DEX market has long lacked a product with both CEX trading experience and good depth.

Competition in the diversified DEX track intensifies, and innovation becomes the key

Where there is a market, there will be competition. The same is true for competition in DEX. Whether in the spot, aggregator or derivative futures field, strong DEX will occupy a place in the market, which is reflected in optimizing transaction efficiency, user experience and model innovation.

Optimizing transaction efficiency represents DEX developed on an efficient smart contract public chain, such as the well-known PancakeSwap on BSC and QuickSwap on Matic, which can ensure users' transaction efficiency and save their transaction costs when dealing with different network environments. Of course, there are also many old-fashioned DEXs, including UniswapV3, SushiSwap, DODO, Bancor, etc. Many DEXs are deployed on the L2 network to improve the transaction efficiency of the platform. The purpose of doing this is also to ensure that they can remain competitive in user trading experience.

In terms of trading experience, since the initial DEX basically adopted the automatic market maker mechanism (AMM), and many users were accustomed to trading through chart K-line and OrderBook models, in order to cater to user needs, OrderBook-type DEX emerged. Although this type of DEX is a decentralized model, it provides a user experience that is no less than that of CEX, such as D5 Exchange, DYDX and MESprotocol.

Which one is more suitable for DEX, AMM or OrderBook?

Generally speaking, the first thing a DEX solves is its liquidity problem. Because there is no market maker model, it is necessary to motivate each liquidity provider to become a market maker to expand the size of the liquidity pool to ensure fair prices. The biggest advantage of AMM is that it can still be traded even in a market with insufficient liquidity, and AMM enables traders to always get quotes regardless of the number of valid orders submitted to the trading platform. However, the disadvantages are also very obvious, that is, low capital efficiency, high slippage risk of large orders, and impermanent losses faced by liquidity providers.

OrderBook relies on traders to submit a list of buy and sell orders on a given trading pair, allowing traders to buy or sell assets at a specified price, and relying on market makers to provide liquidity by placing a list of limit orders on both sides of the transaction. Market makers will receive fee rebates to incentivize them to provide liquidity. OrderBook has always been an ideal choice for liquid markets and the best choice for displaying market prices and large orders. It can reduce slippage risks and is widely accepted by institutional and individual traders. It is obvious that OrderBook can do better on DEX.

But which model to choose has a lot to do with the environment in which the project is located and its business direction. DYDX chose the OrderBook mechanism because it was deployed on Ethereum in the early days and needed to use the OrderBook model to improve order settlement and transaction performance. For D5 Exchange, which also uses OrderBook, the AMM mechanism DEX will only be applicable to stablecoin transactions. If it wants to become a core facility in the Ethereum ecosystem, it still needs to adopt an order book and needs to solve how to run the order book on the chain. The breakthrough of D5 Exchange is that it has successfully run the order book on the Ethereum mainnet with its unique OrderBook model and algorithm. We believe that what D5 Exchange is currently doing is forward-looking for the future DEX in the choice of mechanism model;

D5 Exchange’s core concept and technical direction on OrderBook

(1) GMOB+GPLM trading engine

First, D5 Exchange abandoned the CLOB model (matching engine) and created a new order book model - Grid Maker Order Book (GMOB). Based on this model, D5 Exchange created the Grid Price Linear Movement (GPLM) algorithm to handle transaction execution and settlement. The GPLM algorithm can achieve the same level of resource consumption as the Constant Function Market Maker (CFMM) algorithm, effectively reducing the Gas consumption of D5 Exchange running on Ethereum.

Secondly, compared to the traditional OrderBook, which is a limit order mode, D5 Exchange uses Maker orders, which allows buy orders and sell orders to exist above and below the market price. Of course, Maker orders can also be placed at the current price. If the current market price changes, it may be traded. The Maker order may not be as expected when placing an order at the market, and it will not have much impact even if the user places the wrong order. Also, because D5 Exchange is an on-chain order book, Gas is consumed when placing an order. It is worth mentioning that the GMOB model is an on-chain transaction based on L1, which is a huge improvement compared to many DEXs that are L2 or even off-chain matching.

(2) Aggregation of internal and external liquidity to ensure sufficient liquidity

From the perspective of liquidity, D5 Exchange is not an exchange in the traditional sense. Even without market makers, D5 Exchange can still run perfectly. The sufficient liquidity of D5 Exchange can ensure that users have a deep trading experience. Gridex integrates the liquidity of UniswapV2 V3 and Curve externally and provides the best exchange rate. It has its own Maker order internally. Even without market makers, Gridex's internal and external liquidity ensures that as long as users have buying and selling demands, its liquidity will always exist. D5 Exchange supports placing orders at any price, and when the market is in extreme conditions, it can be traded at extreme prices. This ensures the effectiveness of the transaction.

(3) Completely decentralized “centralized trading experience”

Compared with DYDX and EtherDelta, which adopt the method of maintaining OrderBook off-chain to achieve on-chain settlement, D5 Exchange chooses to deploy the order book on-chain and realize the two-way matching trading mode on-chain and off-chain at the same time. By introducing OrderBook to provide intuitive trading icons, excellent liquidity depth, lossless transactions and low Gas fees, D5 Exchange provides a trading experience that is no less than CEX. Secondly, D5 Exchange adopts the L0 layer Gridex multi-chain protocol, which will support users who trade on D5 Exchange to choose supported networks and improve asset exchange efficiency.

(4) Grid mechanism meets different token trading environments

D5 Exchange uses the Grid mechanism, which is designed to help different token trading situations. The Maker order of D5 Exchange must be included in a specific Grid. Grids are divided into three types according to the granularity of the unit price range (called resolution). Grids are suitable for different token types from small to large. For example, for transactions between stablecoins, the volatility itself is very small, and choosing a grid with finer granularity is more conducive to fast transactions; for trading pairs with high volatility, Makers prefer a coarser granularity Grid to obtain better commission income; the market will prompt users to place orders in the appropriate Grid. In essence, it is a balance between order transaction efficiency and commission income ratio.

Future innovation direction of DEX

The D5 Exchange model provides a good solution to the current DEX drawbacks. In the future, DEX will be more inclined to develop around user trading sovereignty and how to improve the depth of liquidity. The current application of OrderBook provides DEX with the applicability of traditional CEX, and AMM provides a non-regulatory and censorship-free solution for the trading liquidity pool. Coordinating the relationship between liquidity, trading efficiency, and capital return will be the main direction of future DEX development.