What is a DEX?
Understand how decentralized exchanges work and learn how to access them via your wallet

Definition
A decentralized exchange (or DEX) is a peer-to-peer marketplace where transactions occur directly between crypto traders. DEXs fulfill one of crypto’s core possibilities: fostering financial transactions that aren’t officiated by banks, brokers, or any other intermediary. Many popular DEXs, like Uniswap and Sushiwap, run on the Ethereum blockchain.
A decentralized exchange (better known as a DEX) is a peer-to-peer marketplace where transactions occur directly between crypto traders. DEXs fulfill one of crypto’s core possibilities: fostering financial transactions that aren’t officiated by banks, brokers, payment processors, or any other kind of intermediary. The most popular DEXs — like Uniswap and Sushiswap — utilize the Ethereum blockchain and are part of the growing suite of decentralized finance (DeFi) tools, which make a huge range of financial services available directly from a compatible crypto wallet. DEXs are booming — in the first quarter of 2021, $217 billion in transactions flowed through decentralized exchanges. As of April 2021, there were more than two million DeFi traders, a ten-fold increase from May 2020.
How do DEXs work?
Unlike centralized exchanges like Coinbase, DEXs don’t allow for exchanges between fiat and crypto — instead, they exclusively trade cryptocurrency tokens for other cryptocurrency tokens. Via a centralized exchange (or CEX), you can trade fiat for crypto (and vice versa) or crypto-crypto pairs — say some of your bitcoin for ETH. You can also often make more advanced moves, like margin trades or setting limit orders. But all of these transactions are handled by the exchange itself via an “order book” that establishes the price for a particular cryptocurrency based on current buy and sell orders — the same method used by stock exchanges like Nasdaq.
Decentralized exchanges, on the other hand, are simply a set of smart contracts. They establish the prices of various cryptocurrencies against each algorithmically and use “liquidity pools” — in which investors lock funds in exchange for interest-like rewards — to facilitate trades.
While transactions on a centralized exchange are recorded on that exchange’s internal database, DEX transactions are settled directly on the blockchain.
DEXs are usually built on open-source code, meaning that anyone interested can see exactly how they work. That also means that developers can adapt existing code to create new competing projects — which is how Uniswap