DEX: Decentralized Exchanges

Why use a DEX?

Recent events related to the fall of the world’s second-largest exchange FTX raise an important questions for all investors in the crypto world: can I remain in control of my own funds? Can I manage my crypto currencies without having to trust a third-party exchange?

The answer to both questions is: YES!

In the unlikely event FTX does not ring a bell, here’s an article summarizing the whole scandal, including some interesting conspiracy theories around it. Read article here.

What is using a DEX really about?

The whole driver to start this thing called Bitcoin or crypto currency was to create an ecosystem where we did not need any middle man to own, manage, and use our assets. We need companies, services, platforms, computers, etc. but not middle men. So to me, the idea that we used centralized exchanges (such as Binance, just to name one) had always something of an inconsistency. 

I see investing as voting with your money. 

Where money flows, energy goes. And this can be extended even beyond investing. Take a simple purchase as an example. By buying from a specific brand, you are voting for that brand, you are supporting them and everything they represent. 

So investing in crypto means inherently supporting the decentralized ecosystem… and everything it represents! And that means that you as an investor should take responsibility for your own funds and how you manage those. In case you need to refresh your memory on what a decentralized ecosystem is, here’s a great article for you.

What we will cover in this article

This article starts to tackle one important aspect of managing your own funds, namely the world of decentralized exchanges. These are the platforms where you can buy, sell, trade, and even earn money with your crypto funds, while 100% independent from a central organization. I will tell you what decentralized exchanges are, how they work, and we will dive in the top 5.

The last time I wrote an article about the top exchanges, one of them went bankrupt two days after. So… let’s see how that plays out now.

What is a DEX?

A DEX, or decentralized exchange, is a protocol defining a set of rules to perform automatic transactions of digital assets. This means that you can use the DEX platform to buy crypto currencies, sell them, or even lend them out to earn some interest on your assets. This last functionality is something called staking. More on this later.

For now, just to get things cracking, here’s a quick comparison between centralized exchanges (CEX or CEXes) and DEXes. 

cex-dex-2022-im

A DEX is typically built as a decentralized application, meaning a program (similar to an app on your phone) that works with many other blockchain networks to allow users to perform transactions with the crypto assets on those networks.

In other words, imagine you want to build a decentralized application to allow people to exchange Bitcoins (BTC) with Ethereum (ETH). The application would then have to:

  • connect to the Bitcoin Network,
  • connect to the Ethereum Main Net,
  • Allow users to connect with their wallets to exchange funds,
  • Accumulate enough liquidity of both Bitcoin and Ethereum tokens to facilitate transactions.

This last function, namely accumulating enough liquidity, is something very important for a DEX. Exchanges accumulate their liquidity in something called liquidity pool. Imagine a liquidity pool is a separate bank account where the exchange keeps a stock of crypto currencies (in this case BTC and ETH) to allow users to buy, sell, or trade their assets. For now, just an introduction. More on this later.

DEX Typical Structure

To make it more visual, here’s the structure of a typical DEX, as managers of all the technical connections with users’ wallets, liquidity pools, and other networks based on the number of crypto currencies they want to support.

dex-structure-2022

Through this infrastructure, the DEXes implement two main features that no exchange in the world currently offers: trustless and non-custodial.

Trustless because the exchanges are not the one executing nor guaranteeing the transaction. The exchanges automatically perform transaction as part of the smart contracts implemented in the decentralized protocol.

Non-custodial because your funds are not held by the exchange. Your crypto assets remain in your decentralized wallet. You will only connect to the exchange platform to send out an order for a specific transaction.

Types of DEXes

What I have explained so far is a simplified version of a decentralized exchange, just for you to get familiar with the concept. In practice, there are two main types of DEXes. I took some liberty here of making up the categories, since there is not really a clear division as of yet.

So I like to split them into two main groups: single-chain and cross-chain DEXes.

Single-chain DEX

A single-chain DEX (scDEX) is a decentralized exchange that allows you to purchase all token assets created on top of a specific network (also called Layer 1).

Ethereum is a Layer 1 network on top of which you can create a token for your own specific project on a standard called ERC20. According to Etherscan, there are currently 204 projects created on the Ethereum network. These include tokens like: Tether USD Stable Coin (USDT), Circle USD Stable Coin (USDC), Uniswap (UNI), Chainlink (LINK), Wrapped Bitcoins (WBTC), Quant Token (QUANT), and many more.

A scDEX will allow you to exchange ETH for any of the ERC20 tokens.

For example, let’s imagine you want to invest $100 in Uniswap, a decentralized exchange we will talk about later in this article. At the current ETH price, $100 would be about 0,1ETH. Uniswap is currently priced at $5 so 200ETH. On the scDEX, you would request to transfer 0,1ETH from your wallet in exchange for 20UNI.

swap-example-2022

scDEX also include exchanges in equivalent tokens defined on the same network. This type of tokens is called pegged-token. So, imagine you want to exchange your ETH for BTC. In this case, you will receive what is called a pegged-BTC or wrapped-BTC, this is a token defined on the Ethereum Main Net linked to BTC price so that it can be exchanged 1:1 with BTC. An example is the renBTC, a wrapped BTC token defined on the Ethereum Network.

This is nothing other than a technical loophole to allow you to exchange tokens defined on other networks. This would be the equivalent of exchanging EUR issued by the European Central Bank with USD issued also by the European Central Bank (in collaboration with the US Federal Bank) with the agreement that you can exchange the European Dollars and the US Dollars on a 1:1 ratio.

Cross-chain DEX

A cross-chain DEX (xcDEX)is a decentralized exchange that allows you to exchange coins and tokens across different Layer 1 networks. These exchanges are also called Crypto Bridges. I don’t always agree with the definition of crypto bridges since some of them are actually single-chain exchanging equivalent tokens (pegged-tokens) instead.

This type of transactions are a bit more complex to execute. You as an investor and user of a xcDEX or crypto bridge, you will not notice any difference in the way you send the order. It might just take more time given its complexity.

Most transactions within the same network can take anywhere between 1 to 10 minutes. Cross-chain transactions can take up to 5 hours! So, no panic if you don’t see your funds for a few hours!

The biggest crypto bridges out there are xPollinate, Matic Bridge, and Binance Bridge developed by the Polygon Labs and Binance respectively.

How It Works?

Step 1

Connect your decentralized wallet.

step1-dex
step1-1-select-wallet
step1-2-open-wallet

Step 2

Select the coin pair you want to swap, for example ETH for wrapped BTC (these are BTC-equivalent tokens issued on the Ethereum Main Net and 1:1 to BTC).

step2-select-token

Step 3

Adjust order parameters, especially what is called slippage!

📞 Investment Minute Help Line

What is “slippage”? The slippage is the difference between the exchange rate they offer the moment you send the order and the actual exchange rate the platform can realize the moment the order is executed. To avoid running unnecessary risks, set the slippage to a level that you find acceptable. 

For example, imagine the exchange ration between ETH and BTC is now 15. By the time the DEX executes your order it might be higher or lower. What is the maximum range you are okay with? Setting 0,5% means that the smart contract will execute only if the exchange rate is between 14,925 – 15,075.

step3-slippage

Step 4

Swap time baby! Just click on the swap button and let the DEX do the rest.

step4-swap

DEX Functionalities

Swap

Just as described above, the swap is perhaps the most common function within DEX, allowing users to exchanges tokens either within the same network or across networks. Remember, this swap is automatically executed using the smart contracts implemented as part of the DEX protocol. Your funds remain yours and are not managed by the DEX!

Staking

This is a simple way you can contribute to the DEX ecosystem by making your tokens available in the liquidity pool of a specific token.

Here’s how it works. Imagine you want to exchange 0,1 ETH for 0,01 wBTC, just like the example above. There are two options for the order to be executed:

  1. There is another user who requests the opposite swap, so 0,01 wBTC for 0,1 ETH, or
  2. The DEX pays out the first user out of their wBTC stock and waits for the opposite order to be sent to restock.

When you make your funds available for a liquidity pool, you are paid a reward in the form of fixed interest or a part of the transaction fees charged to the user. The reward changes per token and network. Below an example taken from Balancer, one of the leading DEX at the moment. More on this in the last section of this article.

staking-fees-balancer

Borrowing 

This is an additional functionality DEXes offer for you to be able to take a loan based on your current portfolio valuation. Typically users take out loans to trade higher volumes. So that for every $1 of your own money, you can borrow $5 and trade with $6. This amplifies the wins but also your losses when trades don’t go as planned! Compared to centralized exchanges, DEXes typically have a limit of 5x, meaning you can borrow up to 5 times your own capital depending on what your portfolio is worth at that moment. Centralized exchanges go up to 100x! 

What I also find great about DEXes is that your loan is automatically interrupted when your positions starts getting weaker. This is already programmed in the smart contracts so that whenever your portfolio gets below a certain threshold, the agreement stops, funds are returned, and nobody gets hurt (see FTX example!).

Best DEX Out There

Here’s a short-list of what I think are the best DEX to swap or put your funds to work!

Easy?
Complexity
Token
Supported Networks
Largest Pools
Swap
Staking
Borrowing
Slippage
Uniswap
Very
Low
UNI
Ethereum
ETH, USDC, USDT, wBTC, DAI
ERC20 tokens
Yes
No
Typically mid-high, or long transaction time
Curve
Low
Medium
CRV
Arbitrum, Avalanche, CELO, Ethereum, Fantom, Kava, Gnosis, Moonbeam, Optimism, Polygon
wBTC, wETH, USDC, USDT, DAI
Stable coins
Yes
No
Low
Balancer
Medium
BAL
Medium
Ethereum, Polygon, Arbitrum
BAL, ETH
ERC20 tokens
Yes
No
Mid-high
dYdX
Medium
Very high
DYDX
Not available
Yes
Yes, up to 5x
Conic Finance
Low
High
CNC
Ethereum
CNC, ETH
Not available
Yes
No
Very low

Newsletter

Stay up-to-date with the latest developments in the stock and crypto market., fund, and crypto market.

Disclosure

These are unqualified opinions, and this newsletter, is meant for informational purposes only. It is not meant to serve as investment advice. Please consult with your investment, tax, or legal advisor, and do your own research.

Recommended Posts

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *