Learning crypto?
Our new handy guide simplifies it all. ‘Crypto Categories Unveiled’
Download here

Decentralized exchanges are foundational to the DeFi ecosystem, allowing users to exchange digital assets based on software code and without having to rely on intermediaries.

DEXs Explained: A Beginner's Guide to Decentralized Exchanges

In order to understand the role of decentralized exchanges (DEXs) in crypto, it is easiest to consider it in the context of a more familiar financial establishment: the stock market. If you want to sell a share of stock, there must be another party to buy it from you. But how do you connect with that person or institution to agree on a price? The marketplace for such transactions is called an exchange.

In fact, the US has two of the biggest stock exchanges in the world: the New York Stock Exchange (NYSE) and the NASDAQ. They allow individuals to swap between assets—cash and stocks—in an easy, seamless way.

What is DEX in crypto?

A number of analogous institutions exist in the cryptocurrency space, acting as intermediaries to pair traders who want to swap cash and cryptocurrencies, or even one cryptocurrency for another. Bitstamp is one example of the many centralized exchanges built on this model.

Decentralized exchanges use a different model that removes intermediaries and lets users transact in a more direct, peer-to-peer fashion. Although there are a couple of ways to do this, most use an automated market maker (AMM) system, which is powered by smart contracts and where pools of user assets provide liquidity for others to swap their coins and tokens. This is an essential part of decentralized finance (DeFi), as it grants users access to almost every digital asset on the market.

DEXs vs CEXs

The strengths of centralized (CEX) and decentralized (DEX) exchanges differ considerably, and both have a role in the cryptocurrency trade.

First and foremost, centralized exchanges benefit users as a fiat onramp. This means that exchanges like Bitstamp provide simple ways to buy crypto with traditional, government-issued currencies (e.g.: EURO, USD or YEN) and to sell crypto to receive the same currency in return.

Additionally, centralized exchanges are historically able to provide access to assets on multiple blockchains (i.e. Ethereum, Solana, Polkadot, etc.) whereas most DEXs operate only on one chain. Interoperability in DeFi is in the works, but it has not yet achieved the convenience that centralized exchanges offer.

On the other hand, because they operate in parallel to the traditional financial system, DEXs don’t require personally identifiable information; thus, they allow users to transact pseudonymously. Privacy is one main driver of the use of cryptocurrency, and DEXs put this at the forefront. Additionally, because there is no one institution dictating the rules of exchange, DEXs are truly open to anyone.

Further, DEXs provide opportunities for generating rewards by providing liquidity to automated market makers. And, because DEXs don’t hold your cryptocurrency in their own wallets, you are the sole person who holds the private keys to your digital assets. This means that you are still entirely in charge of your own cryptocurrencies, even after you delegate them to a pool.

How DEXs Work: A Deep Dive into AMMs and Order Books

Decentralized exchanges are meant to enable users to swap easily between cryptocurrencies on a blockchain. The decentralized aspect of DEXs implies that no company controls how this is done and never has possession of any of the user’s assets. Instead, users send crypto from their own wallets through an automated, smart contract-based platform and receive their desired crypto in return.

Who facilitates an exchange on a DEX?

In a DEX, no single entity or person facilitates the exchange. Instead, trades are facilitated by smart contracts, which are self-executing programs on a blockchain. These smart contracts automatically match buy and sell orders and execute trades based on predefined rules.

Instead, the code itself facilitates the exchange, eliminating the need for intermediaries like traditional exchanges.

What are order books?

Traditional finance exchanges use the order book model to match buyers and sellers. Essentially, order books are lists of “buy” and “sell” orders submitted by traders, organized by the prices at which they want to transact. This list is kept by institutions who are entrusted by market participants to list their orders (e.g. “sell at this price”) and connect them with matching orders (e.g. “buy at this price”).

Decentralized order book models exist as well. One of the main DEXs on Solana, called Serum, uses a decentralized order book to allow its users to trade assets without the need for an intermediary on the blockchain. Derivatives market dYdX also uses an order book to process transactions.

One benefit of these order books is that traders can set limit orders that execute only at the prices they desire.

What are automated market makers (AMMs)?

Although order books are efficient and mechanistically intuitive, automated market makers (AMMs) are a more popular way to facilitate asset exchange in DEXs.

In traditional finance, market makers are participants—most often working for brokerages or other big institutions—who trade securities in high volumes. This benefits the market because it provides liquidity for trading. It also benefits the market makers themselves, because they benefit from small differences in the buy-ask spread. For instance, if one trader is willing to sell an asset for $50 and another is willing to buy it for $50.05, a market maker can act as an intermediary, buying from the first for $50 and selling to the second for $50.05, and pocket $0.05. By placing hundreds of thousands of trades like this (or more), market making can be very lucrative.

AMMs automate this process, removing the market’s reliance on third parties for provision of liquidity. DEXs that use AMMs host pools of funds, called liquidity pools, where users (called liquidity providers) deposit their crypto.

The simplest examples of liquidity pools consist of an equal value of two assets but can consist of more. Two asset pools work as follows:

  • Imagine a big pool of different cryptocurrencies, like ETH and DAI.
  • People called "liquidity providers" put their crypto into this pool.
  • When you want to trade, you can deposit one type of crypto into the pool and withdraw another type.
  • You pay a small fee for this, which goes to the liquidity providers as a reward.

Risks of using a DEX

The most common risk for using an AMM DEX is impermanent loss, which occurs when depositing into a pool may cause a loss in asset values as compared to simply holding tokens in a crypto wallet due to price fluctuations. Impermanent loss is one reason why it is important to understand the drawbacks of DeFi before becoming an active participant.

Unlike order book DEXs, AMM traders cannot set limit orders for their buys.

Examples of DEXs

As DeFi was pioneered on the Ethereum blockchain, the most popular and widely-used DEXs were developed there. However, many of these have expanded to layer 2 solutions and other blockchains like Solana. As DeFi expanded into newer platforms, chain-specific DEXs were developed.

Top Ethereum DEXs

Examples of Ethereum DEXs include:

  • Bancor: In 2017, Bancor became the first-ever exchange based on an automated market maker (AMM). It is overseen by a decentralized autonomous organization (DAO), and it has pioneered a system to protect against impermanent loss for its depositors.
  • Uniswap: Launched in 2018, Uniswap popularized the AMM-based DEX model and has expanded onto Polygon and layer 2 solutions Optimism and Arbitrum. Its DeFi presence is formidable, having seen its liquidity pools peaking at $10 billion in total value locked (TVL) in 2021.
  • Curve: Curve is an AMM DEX that has also expanded to other chains including layer 2 solutions as well as Fantom, Avalanche, and Moonbeam. However, its primary focus is on stablecoins, hosting liquidity pools that contain the likes of USDT, DAI, and USDC.

Top Solana DEXs

Solana grabbed the attention of the crypto world during the 2021 bull run. Now, it is one of the most popular blockchains for DeFi activities. Those wishing to trade tokens on the blockchain can use any of the following DEXs:

  • Jupiter: Created in mid-2021, Jupiter is a DEX aggregator and optimizes for the best available swaps between any supported token pair
  • Raydium: Leading AMM DEX on Solana, known for its tight spreads.
  • Orca: Created in 2020, Orca combines an AMM with an order book algorithm to provide efficient trading. Orca is also known for its execution speed and low fees.

Other popular DEXs

Outside of Solana and Ethereum the most popular DEXs include:

  • PancakeSwap: Binance Chain’s leading DEX built using the AMM model.
  • QuickSwap: Polygon’s most used DEX that also uses an AMM model.

Cross-chain DEXs

As the crypto world expands with new blockchains and protocols, there's a growing demand for platforms that allow users to easily trade assets across different chains. Some examples are:

  • THORchain: Acts as a bridge where users can directly swap assets like Bitcoin, Ethereum, and others across different blockchains such as BNB Chain and Avalanche, without relying on wrapped tokens or intermediaries.

DEX essentials

  • DEXs allow for decentralized trading of cryptocurrencies. Unlike centralized exchanges, they operate without intermediaries, giving users more control and privacy over their assets.
  • Most DEXs use Automated Market Makers (AMMs). These rely on liquidity pools funded by users to facilitate trades, offering an alternative to traditional order book systems.
  • DEXs are evolving to offer cross-chain functionality. Platforms like THORchain are emerging to enable direct swaps of assets across different blockchains like Bitcoin and Ethereum.

Ready to start your crypto journey?