This week we talk about Decntralised exchanges (DEX), what they are and how they work.
A decentralised exchange (better known as a DEX) is a peer-to-peer marketplace where transactions occur directly between crypto traders. DEXs fulfil 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 — utilise the Ethereum Blockchain. 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 centralised 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 centralised 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.
Decentralised 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 centralised 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’s code has been adapted by an entire host of DEXs with “swap” in their names like Sushiswap and Pancakeswap.
What are potential benefits of using a DEX?
Vast variety: If you’re interested in finding a hot token in its infancy, DeFi is the place to be. DEXs offer a virtually limitless range of tokens, from the well-known to the weird and totally random. That’s because anyone can mint an Ethereum-based token and create a liquidity pool for it, so you’ll find a greater array of projects, both vetted and unvetted. (Buyer definitely beware!)
Hacking risks can be reduced: Because all of the funds in a DEX trade are stored on the traders’ own wallets, they are theoretically less susceptible to a hack. (Relatedly, DEXs also reduce what is known as “counter-party risk,” which is the likelihood that one of the involved parties — including potentially the central authority in a non-DeFi transaction — will default.)
Anonymity: No personal information is required to use most popular DEXs.
Utility in the developing world: The peer-to-peer lending, speedy transactions, and anonymity made possible by DEXs have made them increasingly popular in developing economies — where solid banking infrastructure might not be available. Anyone with a smartphone and an internet connection can trade via a DEX.
What are some potential downsides?
Trickier user interfaces Navigating decentralised exchanges requires some specialised knowledge and the interfaces aren’t always easy — be prepared to do a lot of research and don’t expect the DEX itself to offer much handholding. You’ll generally have to look offsite for a walk-through or explainer. Caution is required because it’s possible to make an unfixable error, like sending coins to the wrong wallet. Another common issue is known as “impermanent loss,” which can result from pairing a more volatile cryptocurrency with a less volatile one in a liquidity pool. (The main takeaway here? Do your own research.)
Smart contract vulnerability Any DeFi protocol is only as secure as the smart contracts that power it — and code can have exploitable bugs (despite lengthy testing) that can result in the loss of your tokens. And while a smart contract might work as intended under normal circumstances, not all rare events, human factors, and hacks can be anticipated by developers.
Riskier coins With the unvetted, vast array of tokens available on most DEXs, there are also a greater number of scams and schemes to be wary of. A token that’s on a hot streak could suddenly be “rug pulled,” when its creator mints a bunch of new tokens, overwhelming the liquidity pool and tanking the value of the coin. Before you buy a new-to-you cryptocurrency or experiment with a new protocol it’s important to learn as much as you can — read white papers, visit developer Twitter feeds or Discord channels, and look for audits of any particular project you’re interested in.
How do you interact with a DEX?
You can connect to a DEX like Uniswap using a crypto wallet such as Metamask or Trustwallet.
While you can interact with DEXs directly from the browser built into your wallet, an easier way is to pull up the website up on your computer’s web browser and click “Connect to a Wallet.”
You’ll also need a supply of the native token (depending on what chain your are using) to start trading on most DEXs, which you can get from a centralised exchange. The reason you need the native chain token is for paying fees (known as gas) that are required for any transaction that happens on the blockchain. These are separate from the fees the DEX itself charges.
Native chain tokens for example include
BSC = $BNB
Ethereum = $ETH
Polygon = $MATIC
Fantom = $FTM
How do DEX fees work?
Fees vary from DEX to DEX, Uniswap for example charges a 0.3% fee that is split between liquidity providers, and a protocol fee could be added in the future. But it’s important to note that the fees the DEX charges can be dwarfed by gas fees to use the Ethereum network. The ongoing ETH 2.0 upgrade (as well as a number of “layer 2” solutions like Optimism and Polygon) are designed in part to lower fees and speed up transactions.
Gas fees on chains such as BSC, CRONOS and AVAX for example are massively cheaper than ETH currently. This is why we are seeing more and more adoption of these smaller chains. The lower gas fees make it possible for retail traders to trade on them without spending masses on gas fees with each transaction.
Here are the leading DEXs for some of the more popular chains.
Ethereum — Uniswap https://uniswap.org/
BSC —Pancakeswap https://pancakeswap.finance/
Polygon — QuickSwap https://quickswap.exchange/
Cronos —VVS https://vvs.finance/
Avax- Trader Joe https://traderjoexyz.com/home#/