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.
🍒 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)?
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.
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
Centralized vs. Decentralised Crypto Exchanges (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.
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.
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.
How Do I Place A Trade On A DEX?
To place a crypto trade on a DEX, follow the below steps.
Find a DEX that supports the crypto assets you wish to trade.
Fund your self-custody crypto wallet with crypto.
Connect your crypto wallet to a DEX that supports the coins/tokens you wish to trade.
Choose the cryptocurrency pair that you wish to buy/sell.
Select the gas fee you are willing to pay (the wallet will approximate this for you).
Wait for your trade to be confirmed (For the Ethereum network, this takes a few minutes).
Automated Market Makers (AMM)
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.
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
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:
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.
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.
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.
Chains: Ethereum, Arbitrum, Optimism, Polygon, Fantom, Avalanche, Moonbeam, Kava
Chains: Ethereum, Arbitrum, Optimism, Polygon
Fees: 0.3%; varies
Chains: Ethereum, BSC (Binance Smart Chain), Aptos
Fees: 0.25%; varies
Chains: Ethereum, Arbitrum, Polygon
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.
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.
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.