What is a decentralized exchange (DEX), How does it work?

Defi_Jeamz
Coinmonks

--

Bitcoin, Ethereum, and cryptocurrency exchanges have all been major players in the blockchain industry. Driving so many adoptions and use cases for different technologies. Cryptocurrency exchanges have played many roles in crypto adoption, including usability and interaction with tokens, ease of buying and selling tokens, transfer of funds, depositing, and withdrawals.

With the growth in blockchain technology, a growing number of tools have all emerged for decentralized trades.

The centralized exchanges come to mind when you hear of signups with email; use a strong password, confirm your password, and verify your account.

Decentralized exchanges are not structured that way; they eliminate the signing up and verification of accounts. All trades happen directly between two user wallets or traders without the help of a third party.

This article will focus on what a decentralized exchange is and how it works.

What is a decentralized exchange (DEX)

A decentralized exchange (DEX) is a peer-to-peer marketplace where crypto traders make transactions directly without a third party. These transactions are facilitated by self-executing agreements called smart contracts.

Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are met. They are typically used to automate an agreement’s execution to be immediately sure of the outcome without an intermediary’s involvement or time loss.

We have different decentralized exchanges on various blockchain networks.

Ethereum network — Uniswap, Sushiswap
Avax network — Traderjoe, Pangolin
Terraluna network — Terraswap
Binance smart chain — pancakeswap

Decentralized exchanges are booming, and in the first quarter of 2021, $217Billion in transactions flowed through decentralized exchanges. The number and use case for this technology has increased tremendously.

How do decentralized exchanges work?

Decentralized exchanges are similar to centralized exchanges but, in some ways, are significantly different. There are a few different types of decentralized exchanges available for users. We have order book DEX, Automated market makers, and DEX aggregators.

1. Order book DEX
Compiles all open orders for buying and selling for specific asset pairs.
Buy orders signify an order to buy an asset at a specific price, while sell orders signify an order to sell an asset at a particular price.
There are two types of an order book, an on-chain order book, and an off-chain order book.

a. On-chain order books
Everything, as regards this type of DEX, is on-chain. With all orders documented on the blockchain. This order book is the most trusted and transparent approach as no third party is involved. The system of this order book is flawed because a node records each order and transaction. Charges are present for every transaction; this is also cumbersome and takes time as miners have to add each message on the blockchain.

b. Off-chain order books
They are still decentralized in some sense but more centralized than the on-chain order book. Instead of documenting the orders on the blockchain, they are hosted somewhere

what!, Where?

That depends; a centralized exchange could be in charge of the order book.

These exchanges may permit traders to leverage their positions by borrowing funds from lenders. Leveraged trading increases a trade’s earning potential while also increasing the risk of liquidation because it increases the size of the position with borrowed funds.

2. Automated Market Makers (AMM)

This system uses smart contracts and clever offers to solve liquidity problems and ensure user participation.
Instead of matching buy and sell orders, these decentralized exchanges’ smart contracts use pre-funded pools of assets known as liquidity pools. Other users fund the pools, and they are then entitled to the transaction fees charged by the protocol for executing trades on that pair. Liquidity pools enable traders to manage orders or earn interest without requiring permission or trust.
Automated market makers are more user-friendly as wallets such as metamask and trust wallets are used to settle transactions on the blockchain.

3. DEX aggregators

This system uses different protocols and mechanisms to solve liquidity problems. They collect data from various decentralized exchanges and facilitate trades to offer the best prices possible. Many calculations go into this to give traders the best possible swap price within a few seconds.

Advantages of using DEX

1. Token availability enables traders to get in early.

2. Strong security measures

3. Users have complete control of assets.

Disadvantages of using DEX

1. Smart contract vulnerabilities and be used for selfish purposes

2. Specific knowledge of using wallets is required to keep funds safe.

3. Unvetted tokens expose inexperienced traders to rug pulls and scams.

Decentralized exchanges keep growing with so many innovations and use cases. The future looks promising with flash loans, where loans are taken and paid in a single trade.

Decentralized exchanges are not structured that way; they eliminate the signing up and verification of accounts. All trades happen directly between two user wallets or traders without the help of a third party.

Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing

Also, Read

--

--

Defi_Jeamz
Coinmonks

I am a crypto writer and analyst with over five years of experience researching DeFi, Metaverse, NFT, and the latest crypto trends.