Since the formal introduction of Ethereum in 2014, the network has exploded with products that allow users to transact directly with one another, without relying on a third party.
One of the most common use cases is that of a decentralized exchange (DEX), an idea that dates back to Vitalik Buterin’s unveiling of Ethereum in 2014. Examining the history of how DEXs have evolved can help elucidate where DEXs are headed and how they will compete with centralized exchanges.
What’s in a DEX?
DEXs come in a variety of forms, but share one common quality: non-custodial. DEXs use smart contracts to manage funds on-chain, so users never have to trust a third party with their money.
However, the exchange part of a DEX – the way buyers and sellers find each other – can vary widely from one implementation to another. When thinking about the future of DEXs, it’s helpful to first understand their past.
The earliest Ethereum DEXs, like EtherEx and OasisDex, built a traditional central limit order book (CLOB) exchange entirely out of Ethereum smart contracts. Developers and users quickly discovered that order management and trade execution are not well suited for a blockchain. In particular, the placing and cancelling of orders by market makers, and the interaction of traders with the on-chain order book, were expensive and error prone due to the high costs and latency of on-chain transactions.
Off-chain order books
In mid-2016, a new exchange, EtherDelta, innovated on this model by bringing the order book off-chain. This design eliminated the cost of order creation and reduced the latency and gas costs of placing an order.
While it was a major improvement, users still incurred costs for canceling orders – a fee which prohibited market makers from providing liquidity at scale. Additionally, takers submitted their own trades to the network, creating on-chain “trade collisions,” with multiple takers competing for the same order. On peak days, up to 30% of trades failed due to these on-chain collisions.
Although the first iterations of DEXs faded over time, they were innovative, forward-thinking, and laid the groundwork for models in use today.
Off-chain execution, on-chain settlement
Improving upon the earliest DEX models, the next generation of DEXs, including IDEX and DDEX, explored a hybrid approach. This design moved both order books and trade execution off-chain. With off-chain execution, users match their own orders but submit them to the exchange, which executes the trade and relays the order to the network for settlement. This approach eliminates the issues of on-chain trade collisions, gas fees for canceled orders, and front-running. This model served as the dominant trading model for almost two years.
However, this design is not without flaws. Without a matching engine, trade execution suffers, and gas settlement costs and network congestion remain problematic. Identifying these drawbacks hints at even more user-friendly DEX models in the near future.
While this design was garnering the most users and volume, a novel DEX model in Uniswap and Automated Market Makers (AMMs) joined the fray.
The rise of automated market makers
The AMM design is a creative response to the limits of hosting an order book on-chain. As we’ve discussed, many of the early CLOB DEXs struggled due to the fact that it’s both expensive and slow for users to update their orders using a blockchain.
Uniswap responded by removing the order book altogether, replacing it with a simple on-chain formula.
This architecture ultimately allowed Uniswap to achieve phenomenal growth. The “always on,” permissionless liquidity made it a great solution for other applications to build on top of. The fully-decentralized architecture has led to a resurgence of ICOs in the form of Uniswap direct listings, as projects can easily deploy their own liquidity pool to jumpstart trading of a new asset. The liquidity pool structure also makes it easy for non-technical users to commit capital and earn a passive reward from trade fees and liquidity mining.
See also: What Is DeFi?
In spite of these numerous benefits, experts speculate that AMMs in their current form are a mere stepping stone in the path of DEX design, and many question their long-term viability. As a rule, these products provide a less flexible version of market making than their centralized counterparts, and will lag in markets that require sophisticated analytics and human intervention.
Despite the many advantages of the Ethereum network, it’s clear that the traditional CLOB exchange doesn’t work well when operating on a decentralized network with such high latency and low throughput. As a result, DEX development will primarily continue down three paths: new types of AMMs, CLOBs on faster chains, and upgraded hybridized models.
New AMM models
AMMs have played an important role in DEX development, addressing key performance issues by removing the order book altogether and pricing assets using a static, on-chain function. Uniswap deployed the first example of these, the constant product function, which creates a specific type of pricing curve. Competitors like Curve have experimented with different functions, in this case choosing one that is better suited for assets where the market expects the price to be equal, such as stablecoins, or different types of wrapped bitcoin.
As these products evolve and address more specific use cases, they will likely be in demand given their on-chain availability and ease of liquidity provision. However, it is unlikely that they supplant CLOBs as the dominant form of trading, as fundamentally they are a less flexible form of exchange than CLOB.
Instead of adapting to the network’s constraints, new projects like Serum are attempting to move to a different network where the constraints aren’t as severe. By using a more performant underlying network, one with higher throughput and faster consensus times, the team hopes to eliminate the UX issues that plague V1 order book DEXs.
However, at its core, trade matching and execution is a problem of consensus to determine who came first, which trades should to execute and in which order. A decentralized network, which by design has to come to consensus across a number of different nodes, can never compete at the same level of their centralized counterparts.
Hybridized models, like IDEX 2.0, aim to combine the power and performance of a centralized exchange, with the security of decentralized custody and settlement. By pairing the high-performance trading engine of a centralized exchange with the on-chain custody of a DEX, users can get the same trading experience they know and love without having to put their funds at risk.
DEXs have come a long way. From clunky on-chain approaches in the earliest days of 2014 to today’s wide variety of options, each evolution in DEXs has come closer to delivering a product capable of both performance and security. Regardless of what flavor they come in, the future will see DEXs challenge centralized exchanges by finally separating the custody from the exchange altogether.
It’s been several years since the first iteration of crypto exchange, but systemic issues remain, creating multi-million-dollar problems for traders. Just this week, a hacker drained Kucoin of approximately $150 million in crypto assets. That was closely followed by the U.S. Commodity Futures Trading Commission (CFTC) and the Department of Justice (DOJ) issuing a number of criminal charges against BitMEX for AML and KYC negligence.
All these issues stand as a backdrop to the ongoing battle between CEX and DEX environments. Regulatory and security concerns punctuate the growing need for traders to maintain custody of their assets and comply with regulators. Where CEXs often provide convenience for traders, they often come with security/seizure risk. DEXs, while more absolute in terms of asset control and security, offer little in terms of regulatory oversight.
The leader in news and information on cryptocurrency, digital assets and the future of money, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups. As part of their compensation, certain CoinDesk employees, including editorial employees, may receive exposure to DCG equity in the form of stock appreciation rights, which vest over a multi-year period. CoinDesk journalists are not allowed to purchase stock outright in DCG.