What are Decentralized Exchange (DEX) Protocols
Decentralized exchanges are a marketplace that facilitates the exchange of one cryptocurrency to the other with no centralized parties involved. Everything is automated via Smart Contracts on the blockchain. The core capabilities of every DEX are buying, selling, trading, and portfolio management. These rely on smart contracts to lock funds (tokens) and automate transactions through AMM, Automated Market Maker.
In a DEX, users can only swap cryptocurrency for another cryptocurrency. Unlike centralized finance, where a user is matched with an individual seller and can set a buy order, the AMM offers tokens from a pool where people (also called liquidity providers) have deposited their tokens over time. This is called liquidity pool or yield farming.
Liquidity pools are the mechanism by which users can deposit their assets into a DEX smart contract so other traders can have access to swap their tokens. We will talk further about this later in this article.
What is the biggest DEX?
The first ever DEX in the Ethereum network was EtherDelta, which was launched in 2016. EtherDelta is still active, by the way. From inception till now, many other dexes have emerged. We have the likes of Curve, Balancer, dYdX (for perpetual), Sushi swap, Pancake swap, Uniswap, Quickswap, and the other numerous “swaps”. In all these, a few of the major game players are Uniswap, Curve, and dYdX. Why are these considered the biggest DEX? If we look at their stats on coinmarketcap, the market cap for Uniswap, Curve and Pancake Swap are approximately $4.9b, $3.3b, and $639m, respectively. This shows they
Why are these considered the biggest DEX? If we look at their stats on coinmarketcap, the market cap for Uniswap, Curve and Pancake Swap are approximately $4.9b, $3.3b, and $639m, respectively. This shows they
are one of the big guys on the block.
How do DEXes work?
The process of using a DEX to exchange a token for another is very, very simple. Actually, it is simpler than using most banking centralized exchange apps.
You can also be a liquidity provider and make some passive income with a DEX. A part of this process involves yield farming (or liquidity providing).
Most DEX use an Automated Market Maker (AMM), which is also known as the liquidity pool algorithm. This enables users to trade with a pool of funds from the liquidity pools. The AMM matches buyers’ and sellers’ orders, sets prices, and allows traders to trade algorithmically using the smart contract. Unlike traditional order books, you don’t have a buy or stop-loss order (except if you use platforms like https://dydx.exchange/ or https://gmx.io/).
Wha are Liquidity Pools?
Liquidy providers (the farmers with produce) provide tokens to the pool and earn rewards/interest on the funds/assets locked in the liquidity pool.
Anyone can add liquidity to Uniswap (or to other DEXes). You will earn part of the fees that are collected from the people who trade the pair that you have provided (in the screenshot above, it’s DAI/ETH.) The fees, in this case, are 0.3%, and at the end, it may represent a few percentage points for the LPs.
Users who want to swap their tokens for another token go into the pool and perform their transaction to swap their tokens without an intermediary taking custody of the funds.
BTW, I explain all these concepts in depth here.
What is impermanent loss?
Liquidity providers are exposed to impermanent loss. This loss is not permanent, hence the name “impermanent loss.”
Impermanent loss only happens if the prices of the assets change. It doesn’t necessarily mean you will lose money. Instead, in some circumstances, you’d be better off just holding those assets. Changes in the token price affect the composition of the liquidity pool, resulting in having slightly more or less of a particular token. The LP has a right to earn a fee on every transaction in the pool, and this may mitigate the impermanent loss. However, in the end, there are variations in the quantity of the assets in the pool.
Changes in the price of the assets that you provide will translate into a different token distribution. which leads to impermanent loss.
Impermanent Loss can also be defined as the difference between simply holding an asset and using that asset to provide liquidity to a pool
Note that you don’t need to worry about impermanent loss if you just wish to trade on a dex.
What is Slippage?
Slippage is when the market price is different from the transaction price. It can happen in any market. This can happen in any market. There are a few reasons why slippage may happen:
Market with lower liquidity
High volatility
Low market dept
When a large order is executed, and there is not enough volume to maintain the current bid/ask.