Scroll Top
270 George St. N. 3rd Floor Peterborough, ON K9J 3H1
DEX

Decentralized exchange (DEX) 

Millions of transactions are made in the digital currency market every day. Exchanges are very important for users as a platform for trading. Some exchanges in the digital currency market operate on the basis of a blockchain or another type of centralized platform, and many of these centralized exchanges such as Binance and Coinbase are very popular among traders and investors. Some people prefer not to focus in the digital world. These users are using Decentralized Exchanges (DEX).

With decentralized exchanges, it is possible to trade digital currencies directly on the blockchain networks themselves and without trusting any intermediary centralized entity. One of the most important advantages of decentralized exchanges is that you don’t need to do KYC (Know Your Customer) and you can trade cryptocurrencies anonymously from anywhere in the world.

What is Decentralized exchange (DEX)?

A decentralized exchange (DEX) is a blockchain-based program that allows traders to trade cryptocurrencies without the presence of an intermediary. In DEXs, unlike CEXs or centralized exchanges, there is no order book, and transactions are not done by matching the buy and sell orders of traders.

Transactions in decentralized exchanges are carried out with the help of automatic algorithms (AMM or automatic market maker), which are a type of smart contract. Smart contracts are also programming codes that are written on blockchain networks such as Ethereum, which lead to different results and outputs when they receive different inputs.

With the help of decentralized exchanges, intermediaries can be removed from transactions and digital currencies can be traded directly with others. In other words, it is no longer necessary to transfer digital currencies to the wallet of an intermediary such as a centralized exchange such as Binance or Coinbase, which will have full control and custody over them, but with decentralized exchanges (DEX), traders can own their cryptocurrencies and keep them in their own wallets. This is considered a very good option for traders in the digital currency market.

You might ask, if we don’t have an order book in DEXs, then how are transactions done in decentralized exchanges? How is the price of digital currencies determined? In response, it should be said that in DEXs, Liquidity Pools have replaced the Order Book in centralized exchanges.

Liquidity pools are actually smart contracts in decentralized exchanges where digital currencies are deposited and locked. These liquidity pools in the DEX help provide the necessary liquidity for trading by traders.

The question is what is the benefit of locking or depositing cryptocurrencies in the liquidity pools of DEXs and what is the incentive to provide liquidity in them? People who lock or deposit their digital currencies in liquidity pools, both receive some reward in the form of tokens and take a part of the transaction fees that traders make on these exchanges. In this way, the main concern facing decentralized exchanges, which is providing sufficient liquidity to carry out transactions, has been resolved.

How decentralized exchanges work

As mentioned, DEXs work with the help of liquidity pools. For each pair of trading cryptocurrencies that are traded in decentralized exchanges, there is a liquidity pool, and these liquidity pools are actually smart contracts that establish the balance between these pairs of cryptocurrencies and rules related to deposits and withdrawals in them.

The main rule that is written in smart contracts of liquidity pools is the product stability formula, which means that when a token is withdrawn from these liquidity pools (in other words, bought), a corresponding amount must be deposited into the liquidity pool (in other words, sold) to stabilize in the liquidity pool. Finally, the ratio of tokens in the liquidity pool, along with constant product formula rule, determines the price and exchange rate of two cryptocurrencies in DEX.

Unlike centralized exchanges like Coinbase, DEXs do not allow exchanges between fiat and crypto – instead, they exclusively trade cryptocurrency tokens for other cryptocurrency tokens. Through a centralized exchange (or CEX), you can exchange fiat for crypto (and vice versa) or crypto-crypto pairs, some of your Bitcoin for Ethereum. You can also often make more advanced moves such as margin trading or placing limit orders, but all these transactions are handled by the exchange itself through an “order book” that sets the price of a particular cryptocurrency based on current buy and sell orders – similar to the method used by Nasdaq.

On the other hand, decentralized exchanges are simply a collection of smart contracts. They determine the price of various cryptocurrencies algorithmically and use “liquidity pools” — where investors lock up funds in exchange for similar rewards — to facilitate transactions. While a centralized exchange’s transactions are recorded in its internal database, DEX transactions are settled directly on the blockchain.

DEXs are usually built on open source code, meaning anyone interested can see exactly how they work. This also means that developers can adapt existing code to create new competing projects; For example, Uniswap’s source code has been adapted to similar decentralized exchanges.

Related Posts