Decentralized exchanges
To better understand what a decentralized exchange (DEX) is, it is important to first understand how centralized exchanges work.
How centralized exchanges work?
Centralized exchanges, such as Binance or Bybit, operate on the principle of banks. They store users' cryptocurrencies in their wallets and, in exchange, provide a receipt of ownership for a portion of their collective reserves.
After purchasing cryptocurrencies from them, the exchanges display the tokens in your balance, and you can freely exchange them for other cryptocurrencies. However, in reality, you do not have full access to these funds. Formally, you entrust the exchange to act as a custodian on your behalf, and they are officially called custodians. Hence the name custodial service.
Any exchange on a centralized exchange occurs not in the blockchain but only in its database.
How decentralized exchanges work?
The main difference is that custodial wallets (exchanges, payment systems, etc.) are intermediaries, while non-custodial wallets are simply interfaces for directly managing balances in the blockchain.
Decentralized exchanges operate within the blockchain and allow people to directly exchange cryptocurrency tokens with each other, with the transaction being recorded directly on the blockchain. To do this, non-custodial wallets must be used.
All operations on it occur through smart contracts, rather than a centralized trading system.
Who manages DEX and benefits from it?
The management of a centralized exchange occurs either with the participation of the project's community or developers, but both can only make minor changes to the transaction parameters. The main mechanism always remains unchanged because it is recorded inside the blockchain as a smart contract.
To become part of the community, one can become a holder of the exchange's native token. By purchasing such governance tokens, users gain the right to participate in voting on any development issues of the project and earn a portion of the service's commission.
The fees of decentralized exchanges are charged for each transaction on the platform, and often, it is a negligible amount. Part of this fee goes to liquidity providers on the exchange, while the rest is distributed as dividends to the exchange token holders.
It is also important to note that all transactions are registered on the blockchain, meaning you will have to pay network fees to miners (or validators) for including this information in the blockchain.
How does a transaction occur?
The purchase of cryptocurrency through a DEX can occur in two ways: through creating purchase orders, similar to centralized exchanges, or through an Automated Market Maker (AMM).
The essence of AMM is that liquidity pools are created, and the exchange happens instantly in the pools based on the exchange rate formed by the supply and demand ratio.
The difference between these methods lies in the fact that in the order book, the transaction cost is determined by the lowest price among available bids, while in an automated market maker, it is determined by the ratio of available tokens in the liquidity pool.
What other features do decentralized exchanges have?
Advantages:
- DEX does not store users' funds. Traders do not have an internal trading account from which transactions are paid; instead, assets are directly deducted from the connected cryptocurrency wallet.
- DEX does not control traders' transactions. Users can trade any assets in any direction — the main thing is to find someone willing to make the same transaction or an available pair in the liquidity pool.
- DEX does not require user verification. KYC&AML (KYC — "Know Your Customer," AML — "Anti-Money Laundering") policies are only required on centralized trading platforms. On a DEX, even registration is not necessary.
Disadvantages:
- DEX lacks many options for traders, such as stop-loss orders or margin trading.
- DEX usually has smaller liquidity reserves compared to centralized platforms.
- DEX, by definition, cannot have a support service capable of influencing transactions or user accounts.
How to trade on decentralized exchanges?
To trade on a DEX, you first need to connect a cryptocurrency wallet (such as TrustWallet, MetaMask, or any other). The wallet address serves as the login on the decentralized exchange. Assets will be transferred from and to this wallet when selling and buying, respectively.
Most often, if you're accessing the exchange for the first time, you'll need to grant the exchange permission to use your tokens for trading, which you can later revoke if desired.
The easiest way to make a purchase is to find the "Swap" or "Exchange" section on the exchange. There, you select the tokens you want to sell and buy, specify the quantity of the source tokens, and the exchange calculates the amount you'll receive based on the current exchange rate. The exchange in this case occurs through liquidity pools. After the purchase is completed, the tokens will be in your wallet.
However, one of the noticeable limitations of DEXs is the narrower selection of assets. It is not possible to use fiat currencies (such as dollars or euros) from a card, as well as cryptocurrencies that do not support interaction with smart contracts.
As an alternative, stablecoins and so-called "wrapped tokens" (tokens issued on one blockchain in exchange for frozen tokens on a wallet or smart contract on another blockchain) are used.
Regulation of decentralized exchanges
One of the main characteristics of DEXs is that, in most cases, these exchanges are not controlled by specific legal or physical entities. They are independent decentralized applications with an unlimited number of community participants who manage the project's development directions and operational nuances.
The lack of a legislative framework remains the biggest risk for decentralized exchanges. This can lead to difficulties in determining responsibilities in case of any violations, challenges in verifying trading activity and detecting potential infringements. For the same reason, certain existing norms and laws cannot be applied to decentralized exchanges.
Will decentralized exchanges replace centralized ones?
At the current stage of development, decentralized exchanges are not able to completely replace centralized trading platforms. This is hindered by the relative complexity of interfaces, lower popularity, and a limited range of financial instruments on DEXs.
However, the current global trend and sanction policies increase the relevance of this exchange direction. Despite the fact that currently only about 1% of all exchange transactions go through decentralized exchanges, in the future, this industry will bring back blockchain values (anonymity, censorship resistance, and resilience) to the world of cryptocurrencies.