From the very beginning, centralized cryptocurrency exchanges such as Coinbase, QuadrigaCX and Bitstamp have played an important role, making cryptocurrency trading simpler. However, these exchanges also have many problems. They are required to follow a user identity verification (KYC) process, which has a limited volume of command books, and requires users to believe in the solvency of the exchange. These things do not get the favor of cryptocurrency users.
Finally, the development of smart contracts has led to a satisfactory solution: a trading platform built entirely on crypto, without the need for trust and decentralization – a decentralized exchange.
What is DEX?
DEX (Decentralized Exchange) is an application that allows peer-to-peer cryptocurrency trading without intermediaries.
The most famous decentralized exchange is Uniswap, which is built entirely on the Ethereum blockchain platform. Uniswap provides a decentralized trading platform for cryptocurrency users to trade Ether tokens.
The strengths and weaknesses of decentralized exchanges (DEX)
DEX has many outstanding advantages over centralized transactions. They do not require a user identity verification (KYC) process and work 24/7. DEX also offers investors yield farming opportunities. This is an opportunity to facilitate the exchange or trading of decentralized digital assets for a fraction of the fee. Besides, smart contract code (Uniswap written in Solidity) is created publicly and transparently, allowing the owner to easily verify
themselves However, DEX also has many limitations. Basically, DEX is incapable of recovering lost, stolen or mistranslated funds. Since there is no user identity verification (KYC) process to cancel a transaction when an account is compromised or a private key is lost, users cannot retrieve their data or assets.
Moreover, decentralized exchanges often have less liquidity than centralized platforms because their liquidity depends on the number of users on the platform. Besides, transactions need time to be tested and validated on the blockchain network, and the speed of processing depends on miners on the platform, not the exchange.
How does DEX work – What is liquidity pool and AMM?
Typically, centralized exchanges (in both cryptocurrencies and traditional finance, or TradFi) use order books, a system that has worked well for more than two centuries. In contrast, DEX uses two improvements to provide services to users: the liquidity pool and the Auto Market Maker (AMM).
Basically, DEX provides liquidity – a set of asset pairs that traders can use to exchange tokens with each other.
In order for this floor to automatically operate, the developer had to solve two big problems:
1. . Where does liquidity come from?
Liquidity pools are groups of coins or tokens locked in a smart contract, which helps ensure the prices of these coins and tokens will not fluctuate much after making a large transaction.
Liquidity pools offer investment opportunities for those who want to own assets in the liquidity group. When users exchange assets through liquidity tanks, a small amount of fees will be paid to those who provide liquidity. Those who contribute capital to the liquidity tank are also entitled to a similar amount of fees as those of market makers.
Basically, users can deposit Cryptocurrencies into DEX to receive interest (like depositing money in a bank). DEX will use that amount of Cryptocurrency to serve people who need to trade between different tokens, and take fees on each transaction to pay interest to depositors.
In fact, Uniswap applies a 0.30% fee per transaction, and this transaction fee is retained in the liquidity tank.
Yield farming is the fact that users send cryptocurrencies into DEX to receive profits.
It may sound tempting, but Yield farming comes with a double-edged sword called Impermanent Loss. You can find out more about Impermanent Loss here.
2. Who will decide the price?
Auto Market Maker (AMM) are smart contracts to control the prices of certain trading cryptocurrency pairs in a liquidity tank and increase or decrease prices based on supply and demand in the market.
To put it simply, AMM uses an algorithm that automatically calculates the exchange rate between two digital currencies whenever a user trades on DEX.
The AMM tool manages liquidity tanks based on a specific formula for determining the price of each token. This formula is X*Y =k. X and Y are the number of tokens and k is the constant. This formula basically helps manage the liquidity tank.
In this formula, K is a fixed constant, which means that the total liquidity of the whole tank must always remain the same. Different AMM’s will use different formulas for specific use cases according to their goals. As a result, you don’t need to have another trader place a reciprocal buy/sell order on the other side to make a trade. Instead, you interact with a smart contract that “creates” the market for you.
Because the relative price of asset pairs can only change through trading, the difference between the Uniswap price and the external price creates the opportunity to trade spreads. That is: When the price of a token in the market rises higher than the price on the DEX, traders can buy that token on the DEX at a lower price and resell it on another exchange. This mechanism ensures that the Uniswap price will always be compensated towards the right market price.
In the fourth quarter of 2021, Uniswap processed transactions worth $238.4 billion, up 61% from the third quarter of the same year. In 2021, a total of $681.1 billion was traded through Uniswap’s liquidity tank.
In short, DEX offers all the same services as centralized exchanges, but they allow to do this anonymously and without intermediaries. Before Ethereum appeared, traders were forced to use a centralized system to trade and exchange assets.
DEX allows transactions to take place outside of any regulated industry, creating financial justice for all, regardless of war, sanctions or financial sanctions by major powers. If used correctly, this system will bring many economic benefits to all participants. The only thing that is not fair here is probably the knowledge and daily economic life of the different circumstances on earth.