WHAT IS A DEX?

The Real Coiner
4 min readMar 31, 2022

THE RISE OF DEFI

What are Decentralized Exchanges?

Decentralized exchanges are a very recently developed technology. As you may know the best and most well known cryptocurrency exchanges in the world are centralized exchanges like Binance, Coinbase, KuCoin, Gateio, etc. Anyhow, decentralized exchanges have gained massive attention in the last few years given the advantages they have over centralized ones. Many traders and institutional investors are watching this novel technology very closely as it is kickstarting a financial revolution.

A decentralized exchange (popularly known as DEX) is a blockchain based app that brings together cryptocurrency traders and allows them to make peer-to-peer transactions directly between them. DEXs have made possible one of the most important goals of cryptocurrencies, that is to make financial transactions without the need of a third party like banks, brokers, payment processors or any other type of intermediary who are constantly managing them and who also have the power to approve or disapprove the users’ transactions.

How does a DEX work?

Decentralized Exchanges work entirely through automated algorithms, the most used type of algorithm in the industry as of now is called an Automated Market Maker or “AMM”. An AMM works with the following formula:

tokenA_balance(p) * tokenB_balance(p) = k

and popularized by Uniswap as:

x * y = k

The constant, represented by “k”, means that there is a constant balance of assets that determines the price of tokens in a liquidity pool. For example, if an AMM has ether (ETH) and uniswap’s token (UNI), two volatile assets, each time ETH is bought, the price of ETH goes up because there is less ETH in the pool than before the purchase. Conversely, the price of UNI decreases because there is more UNI in the pool. The pool remains in constant equilibrium, where the total value of ETH in the pool will always equal the total value of UNI in the pool. Only when new liquidity providers join the pool its size increases. Token prices in an AMM pool follow a curve determined by the formula. If the price of a pair within the AMM deviates too far from current market prices on other exchanges, the algorithm model incentivizes traders to take advantage of the price differences between the AMM and external crypto exchanges until it is balanced once again, this action is called arbitrage.

Liquidity pools and liquidity providers?

Liquidity refers to the ease with which an asset can be converted into another asset without affecting its market price. Before AMMs came into play, liquidity was a challenge for decentralized exchanges (DEXs) on Ethereum. In the early days when technology was a very complicated interface, the number of buyers and sellers was low, which meant that it was difficult to find enough people willing to trade on a regular basis. AMMs solved the problem of limited liquidity by creating pools of liquidity and offering liquidity providers the incentive to provide their assets in exchange of trading fees. The more assets in a pool and the more liquid the pool becomes, the easier it becomes to trade on decentralized exchanges without perceiving a significant slippage.

On AMM platforms, instead of trading between buyers and sellers, users trade against a pool of tokens (a liquidity pool). The amazing feature of DEXs and liquidity pools is that anyone with an internet connection and a crypto wallet can take part without discrimination. Normally if you want to provide your liquidity to a pool you will need a 50–50 ratio of both assets on the trading pair, meaning, if you want to provide 1 ETH to the pool and let’s say 1 ETH is worth 3,000 USD, you will also need to provide 3,000 dollars worth of UNI to take part.

It is also important to mention that a DEX does not offer custody of users’ crypto assets. Instead, users will hold all of their assets directly in their wallet. The most used and secure crypto wallets to use DeFi products are: Metamask (for Ethereum, Polygon, BSC, Avalanche, etc.), Phantom (for Solana) and any wallet that allows you to use WalletConnect like Trust Wallet.

Popular DEXs

- The largest DEX currently is Uniswap, it launched in 2018 after receiving several grants and $100,000 from the Ethereum Foundation, obviously Uniswap initially was built on Ethereum but they recently launched a version for Polygon after the Ethereum blockchain suffered ridiculously high fees due to the extreme high usage of its blockchain. Uniswap currently has an average daily volume of 1.3 billion USD.
- Sushiswap (Ethereum)
- dYdX (Ethereum)
- Pancakeswap (Binance Smart Chain)
- Serum (Solana)
- Raydium (Solana)
- TraderJoe (Avalanche)

--

--