When talking about cryptocurrency, enthusiasts associate the words decentralized exchange immediately. It has become a buzzword all over the internet as it usually gets involved in illicit acts such as cyber attacks and money laundering. But what really is a decentralized exchange? How is it different from a centralized exchange? Is it gearing towards mass adoption? If there are security issues, why are people still using the platform? By the end of this article, we will all discover the answers to these questions.
Defining Decentralized Exchange
A decentralized exchange, more commonly known as DEX, is a peer-to-peer marketplace where cryptocurrency traders make transactions directly without handing over management of their funds to an intermediary or custodian. These transactions are facilitated through the use of self-executing agreements written in code called smart contracts.
DEXs were created to remove intermediaries who are supposed to oversee and authorize trades performed within a specific exchange. Decentralized exchanges allow for peer-to-peer (P2P) trading of cryptocurrencies. Peer-to-peer refers to a marketplace that links buyers and sellers of cryptocurrencies. They are usually non-custodial, which means users keep control of their wallet’s private keys, which is also used to access their crypto balances. They will not be required to submit any personal information like names and addresses, which is great for individuals who are concerned about their privacy.
Innovations that solved liquidity-related problems such as automated market makers helped attract users to the decentralized finance (DeFi) space and largely contributed to its growth. DEX aggregators and wallet extensions fueled the growth of decentralized platforms by optimizing token prices, swap fees and slippage, all while offering a better rate for users.
How is Decentralized Different From Centralized?
Decentralized exchanges rely on smart contracts to allow traders to execute orders without an intermediary. On the other hand, centralized exchanges are managed by a centralized organization such as a bank that is otherwise involved in financial services looking to make a profit.
Centralized exchanges account for the vast majority of the trading volume in the cryptocurrency market because they are regulated entities that custody users’ funds and offer easy-to-use platforms for newcomers. Some centralized exchanges even provide insurance on deposited assets.
The services offered by a centralized exchange can be compared to those offered by a bank. The bank keeps its clients’ funds safe and provides security and surveillance services that individuals cannot deliver independently, making it easier to move funds around.
In contrast, decentralized exchanges allow users to trade directly from their wallets by interacting with the smart contracts behind the trading platform. Traders guard their funds and are responsible for losing them if they make mistakes such as losing their private keys or sending funds to the wrong addresses.
The customers’ deposited funds or assets are issued an “I owe you” (IOU) via decentralized exchange portals, which can be freely traded on the network. An IOU is essentially a blockchain-based token that has the same value as the underlying asset.
Popular decentralized exchanges have been built on top of leading blockchains that support smart contracts. They are built on top of layer-one protocols, meaning that they are built directly on the blockchain. The most popular DEXs are built on the Ethereum blockchain.
How Does a Decentralized Exchange Work?
There are several DEX designs, each offering different benefits and trade-offs in terms of feature-sets, scalability, and decentralization. The three most common types are order book DEXs, automated market makers (AMMs) and DEX aggregators, which the latter parse through multiple DEXs on-chain to find the best price or lowest gas fee for the user’s desired transaction.
DEX users are typically required to pay two types of fees — network fees and trading fees. Network fees refer to the gas cost of the on-chain transaction while trading fees are collected by the underlying protocol, its liquidity providers, token holders, or a combination of these entities as specified by the design of the protocol.
The main goal of DEXs is to have permissionless, accessible, end-to-end on-chain infrastructure with no central points of failure and decentralized ownership across a community of distributed stakeholders. This typically means protocol administrative rights are governed by a decentralized autonomous organization (DAO), made up of a community of stakeholders, which votes on key protocol decisions.
Order Book DEXs
Order Book DEXs work as a real-time collection of open buy and sell orders in a market. Order books allow an exchange’s internal systems to match buy and sell orders.
Fully on-chain order book DEXs have been historically less common in decentralized finance or DeFi as they require every interaction within the order book to be posted on the blockchain. This requires either far higher throughput than most current blockchains can handle or significant compromises in network security and decentralization. As such, early examples of order book DEXs on Ethereum had low liquidity and suboptimal user experience. Even so, these exchanges were a compelling proof of concept for how a DEX could facilitate trading using smart contracts.
With scalability innovations, on-chain order book exchanges becomes possible and now attract a considerable amount of trading activity. Additionally, hybrid order book designs have become more popular, where the order book management and matching processes take place off-chain while the settlement of trades occurs on-chain.
Automated Market Makers (AMMs)
Automated market makers are the most widely used type of DEX as they enable instant liquidity, democratized access to liquidity provision, and permissionless market creation for any token. An AMM is essentially a money robot that is always willing to quote a price between two (or more) assets. Instead of an order book, an AMM utilizes a liquidity pool that users can swap their tokens against, with the price determined by an algorithm based on the proportion of tokens in the pool.
Since they’re always able to quote a price for a user, AMMs enable instant access to liquidity in markets that otherwise may have lower liquidity. In the case of an order book DEX, a willing buyer has to wait for their order to be matched with the order of a seller — even if the buyer posts their order to the “top” of the order book close to the current price, the order may never execute.
In the case of an AMM, the exchange rate is determined by a smart contract. Users can get instant access to liquidity, while liquidity providers (depositors into the AMM’s liquidity pool) can earn passive income via trading fees. This combination of instant liquidity and democratized access to liquidity provision has enabled an explosion of new tokens being launched through AMMs and unlocked new designs that focus on distinct use cases, such as stablecoin swaps. If you’d like a more detailed exploration of AMMs, read this post covering how AMMs work.
While most current AMM designs deal with cryptocurrencies, AMMs could also be used to facilitate swaps of NFTs, tokenized real-world assets, carbon credits, and much more.
Some popular AMM DEXs include Bancor, Balancer, Curve, PancakeSwap, Sushiswap, Trader Joe, and Uniswap.
DEXs are here to stay!
There is no denying that the crypto ecosystem is moving towards a more streamlined autonomous crypto trading experience. Many decentralized exchanges have emerged over the last year, trying to keep the middlemen out of the equation for heightened privacy and security. But decentralization, in general, is fairly in its early stages, and we are hoping to witness more new decentralized tools and platforms come up in the near future.