
How Does a Decentralized Exchange Work?
Even though centralized exchanges (CEXs) dominate the world of crypto trading, decentralized exchanges (DEXs) are gaining prominence. DEXs are different in the very approach they’re based on: they’re aimed at eliminating intermediaries and utilize smart contracts in peer-to-peer trading. Thanks to that, decentralized exchanges can offer faster and cheaper trades.
DEXs might have different infrastructures. We’ll talk about the several models they use and new aggregation tools meant to address the disjointed liquidity issue.
Decentralized vs. Centralized Exchanges
Crypto exchanges are responsible for billions of dollars worth of assets that circulate in trading on a daily basis. As the market is exponentially growing, so do exchange platforms: they expand their functionality responding to trader demand and offer asset custody and new trading tools.
Traditional, centralized bitcoin exchanges offer their services through an intermediary: the whole idea of centralization means that there’s a third party who allows users to buy and sell crypto and can act as a custodian storing users’ crypto funds. By contrast, decentralized exchanges don’t rely on any intermediary. It doesn’t come as a surprise that DEXs are gaining popularity, as disintermediation is a fundamental principle of blockchain in general that is praised by crypto enthusiasts. To enable trading, DEXs use smart contracts that make transactions possible without the involvement of any third party.
Given their nature, DEXs use a non-custodial framework. These platforms can’t store and protect users’ funds, which is absolutely great for those who want to have full control over their assets and access to their crypto wallets. However, it comes with several risks. For instance, user’s private keys can be lost or stolen, or, in case of a user losing capacity or dying, there’s no possibility of accessing their keys. Another risk associated with decentralized exchanges is that they are not subject to Know-Your-Customer or Anti-Money Laundering requirements. These are standardized regulations that centralized exchanges must comply with and they guarantee that certain security measures are followed.
The rapidly expanding DEX market can be divided into several categories. Platforms differ in how they use order books, liquidity pools, and other mechanisms of decentralized finance (DeFi), such as aggregation tools.
Order Book
Decentralized cryptocurrency exchanges have evolved in many ways. Their first generation employed order books, just like centralized exchanges. Order books store all active purchasing and selling orders for each particular digital asset, and the gap between two prices defines the market price. On DEXs that use order books, this information can be kept on-chain contrary to user funds that are stored in wallets off-chain. Many decentralized platforms have a focus on a particular financial product. For example:
- The ViteX exchange uses on-chain smart contracts to match transactions. The platform keeps order books and exchange fee redemption on-chain. Given that every exchange activity is public here, there’s a lower risk of data tampering.
- The Nash exchange uses conventional book orders but offers a greater speed of transactions by efficiently matching the orders.
- The dYdX protocol allows asset borrowing, which lets users earn passive income with the crypto they store on this exchange.
Swaps
The next generation of decentralized exchanges no longer relies on order books. Normally, they use liquidity pool protocols to set the pricing for each asset. The name “swap” comes from the process of instant exchange between user wallets. DEXs of this type are ranked by the total value locked (TVL) or the value of assets kept in their protocol’s smart contracts. Here are some examples:
- The Uniswap platform enables users to swap any Ethereum-based asset. Thanks to its highly accessible liquidity pools, the platform allows anybody to lend and borrow crypto.
- The Curve is a decentralized exchange that also uses a liquidity pool. What’s unique about it is that it focuses on stablecoin trading and features an algorithm that optimizes trading pairs to provide users with little slippage and fees.
- DODO is a liquidity protocol as well. Contrary to other similar platforms, this one ensures adequate liquidity through its Proactive Market Maker (PMM) algorithm.
- The Kyber protocol facilitates peer-to-peer swaps through smart contracts that can be used on any blockchain, not only Ethereum.
- The Gnosis protocol has a unique mechanism—ring trades—that shares liquidity across all available orders. Prediction-market tokens and other tokenized assets are the best choice for a platform like this one.
Decentralized Exchange Aggregators
Although the features of decentralized exchanges offer a high level of security and autonomy to traders, they can create problems when it comes to large volumes of assets. Liquidity is disjointed across many platforms, and this can deter institutional investors or large-volume traders. As a solution, DEX aggregators have developed strategies to deepen asset liquidity pools across centralized and decentralized crypto exchanges. Their approaches include, for example:
- The 1inch platform pools liquidity from several DEXs to reduce slippage. Minimization of slippage, in its turn, makes the capital available to a trader at the best possible price.
- The DiversiFi protocol pools liquidity from not only from decentralized exchanges but from centralized as well.
The Evolution of DEXs
Centralized exchanges account for the biggest part of crypto market activity and guarantee security and regulatory oversight for traders. By contrast, the rise of DeFi has paved the way for the development of decentralized crypto exchange protocols and aggregation tools which provide a greater level of autonomy and faster trades at a lower cost. The DEX market is actively evolving and incorporating new tools and mechanisms.