Put your crypto investments on autopilot with Shrimpy Advisory. Sign up, get $20!
Learn More

×

What Is a Decentralized Exchange?

May 8, 2023

5m

Read Time

Investing and trading cryptocurrencies is mainly done through centralized exchanges that are run by companies with physical headquarters. They are also regulated by laws based on their local jurisdiction. The neophyte’s process is always the same: find a good platform, register an account, file KYC documents, and start investing in digital assets.

But something strange happened in 2020. Developers and users alike latched onto the idea of decentralized exchanges as oracles became a reliable source of on-chain and off-chain data. A billion dollars became two, and after more than a year, DeFi turned into almost a $100 billion idea.

The first lesson on DeFi use cases naturally deals with decentralized exchanges as they account for a sizable portion of the aforementioned sum. A notable percentage of CEX liquidity migrated to DEXs in the last two years and at some point, platforms like Uniswap even managed to surpass Coinbase Pro’s trading volume.

What is a Decentralized Exchange?

A decentralized exchange is a trading platform that facilitates crypto trading in a decentralized fashion by utilizing smart contracts. By definition, any transaction that occurs in a peer-to-peer fashion can be thought of as being a decentralized trade.

If two crypto holders called Bob and Alice were to trade Ethereum for Tether with each other (and the entire transaction takes place on a blockchain), the trade is decentralized. If the trade were to be executed by an intermediary system, like an exchange or a custodian, the trade would be centralized.

As long as peer-to-peer trades stay, at all times, exclusively on the blockchain and interact in no way with a centralized platform, the swap in question is of a decentralized nature.

DEXs practice the same process, with the core difference being that they mimic centralized trading platforms. Their goal is to provide a blockchain-powered platform that offers trading services and liquidity to crypto investors, just like Binance or Coinbase does.

Decentralized exchanges achieve that feat by using smart contracts - a bundle of code that is automatically and autonomously executed once certain conditions are met. Such a structure allows DEX operators to automate withdrawals, deposits, and trades without having to authorize or initiate any actions.

Types of Decentralized Exchanges

Smart contracts have allowed developers to create three major formats of decentralized exchanges:

  • DEX with an on-chain order book
  • DEX with an off-chain order book
  • DEX with an Automated Market Maker (AMM)

Exchanges with on-chain order books are completely decentralized, as all events and actions are recorded on the blockchain, which ensures a completely transparent trading experience. However, such exchanges are impractical since users have to pay higher fees and can be front-run by other users who can view pending transactions on blockchain explorers.


Exchanges with off-chain order books take decentralization down a notch by using a centralized system to host their order books. Rather than being stored on blockchain networks, orders on this type of exchange are processed by an offline entity that is not decentralized. Nevertheless, the trades themselves are still executed on-chain.

The newest and most popular option is an exchange with an automated market maker. AMMs outright reject order books and implement a radically different form of processing and distributing liquidity by using game theory, mathematical formulas, and wrapping them up in smart contracts. Here, developers refer to trading as token swapping. Since AMMs have complex designs we will leave a broader explanation of how they function in the next lesson.

Providing Liquidity

All three types of decentralized exchanges have different proportions of reliance on liquidity from the market. This instance is important to note as centralized exchanges often have professional market makers who frontload liquidity for the CEX. Since a majority of DEXs use AMMs, we will discuss liquidity in the context of liquidity mining and yield farming.

Decentralized exchanges primarily rely on liquidity providers who engage in liquidity mining and yield farming. These users are financially incentivized to lend their crypto assets to a DEX in return for monetary rewards.


The liquidity given to an exchange is then used to fuel a trader’s token swap, who has to pay fees for the transaction. A portion of this fee is given back to liquidity providers in return for providing the original liquidity in the first place.

This symbiotic relationship is what helps decentralized exchanges thrive in an ecosystem such as the crypto market. Each of the three parties (exchange operators, liquidity providers, and traders) provide value and take another thing in return.

Disadvantages of DEXs

There are three notable DEX disadvantages that affect users of nearly all skills levels, and they include:

Decentralized exchanges are not known for offering a great user experience. They are clunky, difficult to use, and buggy. A crypto veteran might have an easier time trading on Uniswap or SushiSwap, but a beginner will most likely fail to process something as simple as a token swap. Newcomers have trouble understanding how to perform a transaction, they forget passwords, seed phrases, and lose access to their funds.

Fees are another predominant issue that rarely disappears. Since smart contracts execute trades in this case, traders pay network fees along with trading fees. While trading fees are not high on DEXs, the case with network fees is entirely different. At times of network congestion, users can pay up to hundreds of dollars for a single trade.

Although decentralized exchanges have caught up with centralized ones in terms of liquidity, they are still dwarfed by industry giants like Coinbase and Binance. Liquidity is an important metric for exchanges and when a DEX does not have enough, those trading large positions prefer sticking with CEX - notable because illiquid markets are chaotic to trade as they have high slippage rates and empty order books in between major price levels.

Final Word

Decentralized exchanges are revolutionary platforms that have changed the crypto market forever. A part of the community believes that DEXs can turn crypto platforms totally independent from the real world by providing users a way to interact with each other solely through a blockchain.

We have yet to see whether the new wave of exchanges will achieve that goal, as many obstacles still exist. Fees are unbelievably high, trading interfaces are primitive, and they are nowhere near reaching the level of liquidity that centralized platforms offer. Once the DeFi sector matures and developers focus more on building rather than marketing during a euphoric environment, we will surely see a positive shift in tone.

About The Author:  
Marko is a crypto enthusiast who has been involved in the blockchain industry since 2018. When not charting, tweeting on CT, or researching Solana NFTs, he likes to read about psychology, InfoSec, and geopolitics.

More Lessons in

A Beginner’s Guide to Decentralized Finance (DeFi)