What Is a DEX in Crypto? How Decentralized Exchanges Work

Decentralized Crypto Exchange Definition: A decentralized crypto exchange (DEX) is a digital, decentralized peer-to-peer marketplace available for anyone to buy and sell cryptocurrencies.

Written by: Mike Martin   |  Updated January 31, 2023

Reviewed by: Ryan Grace

Fact checked by: Laurence Willows

dex

Decentralized exchanges (DEXs) operate on peer-to-peer blockchains with no intermediaries. In this article, we will teach you everything there is to know about decentralized crypto exchanges (DEXs) and the revolutionary technology transforming and democratizing finance. 

Table of Contents

🍒 tasty takeaways

  • DEX stands for decentralized cryptocurrency exchange.

  • A self-custody crypto wallet is required to trade on a DEX.

  • DEXs are most popular on the Ethereum network.

  • Bitcoin (BTC) has limited DEX options as the chain doesn’t support smart contracts. 

  • DEXs offer more trading pairs and lower fees than most exchanges.

  • In addition to swapping on a DEX, anyone can become a market maker by joining a DEX liquidity pool. 

  • To trade on a DEX, you must pay both protocol and gas fees. 

  • The top three DEXs are Curve Finance, Uniswap, and PancakeSwap.

What Is a Decentralized Crypto Exchange (DEX)?

Crypto investors who access blockchains through self-custody wallets must interact with decentralized applications (dApps)

dApps are run on distributed networks. This is in contrast to centralized businesses such as Coinbase, which run their businesses on centralized servers inaccessible to the public.  Since dApps are built atop decentralized blockchains, they are entirely transparent and very efficient.

The most popular dApps operate in the decentralized finance (DeFi) space, which is dominated by the Ethereum network. In addition to staking, lending, and derivative trading dApps, there are decentralized exchange dApps.

Decentralized exchanges (DEXs) allow crypto traders to swap coins and tokens without a central authority. Due to the current lack of regulations (there is no ‘know your customer’ (KYC) in crypto), no paperwork or approval is required to trade on a DEX.

🍒 CEX vs DEX: How Crypto Exchanges Differ

dapp ecosystem

That’s a lot of abbreviations you just learned. Let’s run through them one more time before we move on:

dApp: Decentralized application

DeFi: Decentralized Finance

DEX: Decentralized exchange

🍒 Read: Top 5 DEXs in 2023

Centralized vs. Decentralised Crypto Exchanges (CEX vs. DEX)

cex vs dex

To understand how a DEX works, we must first understand how a traditional centralized crypto exchange works.

Centralized Crypto Exchange

A centralized crypto exchange (CEX) is a crypto marketplace that is managed by a central organization that facilitates the buying and selling of cryptocurrency.

When you hold crypto on a CEX, the exchange holds your private keys for you in ‘custody’. 

In crypto, private keys are the only way to prove ownership over digital assets. Since you don’t have direct access to your private keys on a CEX, you can’t trace your digital assets on a blockchain to assure your exchange is holding your crypto 1×1. 

Exchanges are known to pool together their customers’ crypto and use it for their own personal gain. FTX traded their customer’s crypto for personal gain and lost the majority of it.

“Not your keys, not your coins”

Even with all of these risks, the vast majority of retail crypto traders still prefer to hold their crypto on a CEX.

Decentralized Crypto Exchange

In order to transact on a DEX, you need to connect your crypto private keys via a self-custody wallet (like the tastycrypto wallet). Since CEXs do not allow users access to private keys, it is impossible to interact with DEXs (or any dApp) via a custodial wallet. 

👉 Learn how to connect to DEXs using tastycrypto with WalletConnect!

Unlike CEXs, DEXs do not hold your cryptocurrency. When you want to place a trade on a DEX, you connect your wallet and disconnect it when you’re done. Your crypto is always stored independently of the exchange on a seed-phrase-protected wallet.

👉 Go In-Depth! CEX vs DEX: Which Offers the Lowest Fees?

How Do I Place A Trade On A DEX?

To place a crypto trade on a DEX, follow the below steps.

  1. Find a DEX that supports the crypto assets you wish to trade. 

  2. Fund your self-custody crypto wallet with crypto. 

  3. Connect your crypto wallet to a DEX that supports the coins/tokens you wish to trade.

  4. Choose the cryptocurrency pair that you wish to buy/sell.

  5. Select the gas fee you are willing to pay (the wallet will approximate this for you).

  6. Wait for your trade to be confirmed (For the Ethereum network, this takes a few minutes).

 

Automated Market Makers (AMM)

liquidity pool how to join

You may have wondered by now with no central intermediary or traditional market makers involved, how are trades actually filled on DEXs?

DEXs are powered by automated market makers. Automated market makers are smart contracts (algorithms) that automate the process of buying and selling digital assets. 

On traditional exchanges, market makers are finance professionals who provide liquidity by buying and selling assets using an order book. 

Liquidity Pools

On DEXs, this order book is replaced by liquidity pools. Liquidity pools represent cryptocurrency locked in a smart contract.  

Anyone can become a market maker in DeFi (and earn the fees that come with it!) by contributing an equal value of two or more cryptocurrencies to a liquidity pool.

For example, if you owned 1k worth of both ether (ETH) and 1k worth of USD Coin (USDC), you contribute both of these cryptos to an ETH/USDC liquidity pool on any DEX you want. 

In return, you will be given a liquidity provider token that represents your crypto. You can cash this token in for your crypto whenever you want. 

The more traders buy and sell the ETH/USDC pair, the more you make in fees.

Liquidity Pool Risks: Impermanent Loss

impermanent loss graph

 

Liquidity Pool Formula: x * y = k

Let’s refer back to our ETH/USDC pool for an example. 

Here, we contributed both 1k of ETH and 1k of USDC (A US dollar-pegged stablecoin) to the ETH/USDC pool. 

Since we added our crypto to this pool, ETH has risen dramatically in value. This means that traders have been buying ETH and selling USDC from our pool. Therefore, our quantity of ETH has gone down and our quantity of USDC has gone up.

Though the net value of our pool will always be the same as the initial investment (2k), we would have made more if we simply held ETH outright and not contributed to a liquidity pool at all. 

This is what impermanent loss means. 

What Are the Costs of Trading on a DEX?

So when you trade on a DEX you pay trading fees; when you provide liquidy on a DEX you earn fees. But what are these fees?

There are two fees to consider when trading on a DEX:

  1. Protocol Fee

Every DEX has a fee to transact on their platform. Typically, this fee is 0.3% of the transaction value. Some of this goes to the protocol itself, while the majority of it goes to pay the liquidity providers. 

  1.  Gas Fee

All blockchain transactions must be validated in order to be added to the blockchain. On the Ethereum network, stakers do this work for you. However, it is not free. Gas fees can fluctuate widely. Currently, the gas fee to convert one ether to one USD Coin on the Uniswap DEX is about $4, as seen below.

uniswap network fee
 

Top 4 Decentralized Exchanges

In DeFi, we speak in terms of TVL (total value locked) to determine a protocol’s value. The higher the total value locked (TVL), the more value (and trading volume/liquidity) a dApp has.  Let’s now review the top 4 DEXs as determined by their TVL in DefiLlama

  1. Curve

    • TVL: 3.72B

    • Chains: Ethereum, Arbitrum, Optimism, Polygon, Fantom, Avalanche, Moonbeam, Kava

    • Fees: Varies

  2.   Uniswap

    • TVL: $3.49B

    • Chains: Ethereum, Arbitrum, Optimism, Polygon 

    • Fees: 0.3%; varies

  3. PancakeSwap

    • TVL: $2.37B

    • Chains: Ethereum, BSC (Binance Smart Chain), Aptos 

    • Fees: 0.25%; varies

  4. Balancer

    • TVL: $1.56

    • Chains: Ethereum, Arbitrum, Polygon

    • Fees: Varies

📕  Read! Uniswap vs. SushiSwap vs. PancakeSwap: Which DEX Is Best?

DEX Aggregators

DEX aggregators are protocols that provide access to numerous DEX liquidity pools on one interface. This integration allows traders to pick and choose between protocols that give them the best rates and liquidity.

The 1inch Network is currently one of the most popular DEX aggregators.

Final Word

If you want to trade crypto with a self-custody wallet, you’ll need to trade on a DEX. Though DEXs do offer incredible efficiency, they are not without risks.

The greatest risk to all self-custody wallets is that the owner loses their seed phrase. The second risk relates to hacking and protocol risk.

To reduce hacking risks, it is wise to make sure the device your wallet is stored on is both secure and clean. To mitigate protocol risk, it is wise to always disconnect your wallet from a DEX when you are not actively trading.

New to crypto? Read this article by the FTC (Federal Trade Commission) to learn more about the risks of investing in digital assets.

FAQs

In crypto, a DEX is a decentralized exchange for trading cryptocurrencies (coins and tokens).

The best DEX as far as liquidity and security is generally considered to be Uniswap.

Examples of DEX in crypto include Uniswap, SushiSwap, and PancakeSwap.

In order to interact with a DEX in crypto, you must first connect a self-custody crypto wallet. 

A DEX allows users to trade cryptocurrencies directly with one another via liquidity pools without an intermediary.

🍒 tasty reads

Picture of Mike Martin

Mike Martin

Mike Martin serves as the Head of Content for tastycrypto. Before joining tastycrypto, Michael worked in the active trader divisions of thinkorswim, TD Ameritrade, and Charles Schwab. He also served as a writer and editor for projectfinance.

Michael has been active in the crypto community since 2017. He holds certifications from Duke University in decentralized finance (DeFi) and blockchain technology.

Contact: Mike@tastycrypto.com

Share the Post:

The Best Newsletter

You've Never Read

Data-driven crypto insights delivered every Saturday morning.