How Decentralized Exchanges Work: A Full Guide 2022

5 min read

multiple computers connected to each other in a decentralised manner while two people sit next to computers and crypto coins.


The widespread popularity of holding and trading bitcoin and other crypto-assets has resulted from cryptocurrency being mainstream in our present day.

Cryptocurrency exchanges are a vital source of liquidity for the global cryptocurrency market, facilitating daily trade volumes worth billions of dollars. As the market grows, top exchange platforms respond by expanding their offerings, including asset custody, new trading tools and functionality, and access to an ever-increasing number of digital assets. As a result, we’ve witnessed the rise of new exchange platforms that claim to be one-stop shops for all of your crypto trading needs.

Decentralized exchanges (DEXs) are gaining popularity, despite the fact that centralized exchanges (CEXs) now dominate cryptocurrency trading activity. The growing DEX, which is based on the principle of no intermediaries, is divided into several sectors. To offer unique and experimental financial products, each platform employs diverse implementations of order books, liquidity pools, or other decentralized finance (DeFi) techniques such as aggregation tools.

What are decentralised exchanges?

Decentralized exchanges (DEXs) work as autonomous decentralized applications (DApps) that carry out peer-to-peer transactions without the use of intermediaries or third parties. These transactions are made possible by “smart contracts,” which are computer programs that are kept on a Blockchain and run when certain conditions are met.

They are usually non-custodial, which means that users can keep custody of their coins and manage their wallets and private keys. This is a significant benefit to users and a significant advantage over CEX, albeit it does come with the risk of your keys being lost, stolen, or destroyed.

Because they do not require the overhead costs involved with maintaining a fully staffed company, decentralized exchanges may be less expensive than traditional exchanges. They also allow users to trade unpopular coins that haven’t been listed on centralized exchanges.

Popular decentralized exchanges have been established on top of the most popular Blockchain platforms that work on smart contracts. They are developed directly on the Blockchain and are constructed on top of layer one protocols.

Also read: Centralized vs Decentralized Exchanges: Comparing Security, Privacy and More.

How do decentralized exchanges work

DEXs differ from centralized crypto exchanges in that they incorporate blockchain and smart contract functionality. Decentralized exchanges are built on blockchain networks, which play a critical role in understanding how decentralized crypto exchanges work. Smart contracts on blockchain networks allow users to keep control of their funds.

Automated market makers, order book DEXs, and DEX aggregators are the three basic types of DEXs. They all have smart contracts that allow users to trade directly with one another.

Automated market makers

A decentralized exchange (DEX) is powered by an automated market maker (AMM), which allows assets to be exchanged utilizing crypto liquidity pools as counterparties rather than a traditional market of buyers and sellers. Smart contracts, rather than order books, are used by decentralized exchange protocols to match buyers and sellers with liquidity, and they also promote autonomy by allowing users to trade directly from non-custodial wallets.

Users are enticed to become liquidity providers by automated market makers in exchange for a part of transaction costs and free tokens.

The necessity for middlemen is reduced when digital assets are transferred on AMMs without permission. It is important to point out that AMMs are limited by problems like arbitraging, front-running, and high transaction fees.

Order book DEXs

Order books compile records of all open orders to buy and sell assets for specific asset pairs. The spread between buying and selling order prices determines the depth of the order book and the market price on the exchange.

DEX platforms solve the problem associated with AMMs with the introduction of an order book model. Unlike the custodial and centralized exchanges, these order books are truly decentralized.

Order books can be classified into two:

1. On-chain order book—Although this is the most decentralized option, it is not feasible for most blockchains because each transaction must take place on the blockchain. Ethereum, for example, can only process about 15 transactions per second, but Solana can process 50,000 transactions per second. As a result, trading on Ethereum will be slower than centralized choices. This technique can also be quite expensive if the network is crowded. Some DEX matches transactions through smart contracts that run on-chain but move funds off-chain to user wallets instantly; for example, Tomo DEX. However, a few DEX like Vitex exchange matches transactions that run on-chain and also complete order combinations and stores order books on-chain, along with exchange fee redemption.

2. Off-chain order book—  Users trade using peer-to-peer order books, with trading activity taking place outside of the blockchain to save gas and boost speeds, combining the advantages of decentralized and traditional trading.

Order books provide information about trading activity such as price, volume, expiry date, and whether the order is a buy or sell when a user executes transactions using P2P.

DEX aggregators

They are Decentralised finance (Defi) technologies that allow traders to swap across several exchanges in a single interface rather than visiting multiple DEXs to monitor liquidity and trade price impact.

DEX aggregators pool liquidity from multiple DEXs, allowing users to achieve higher token swap rates than they could on a single DEX. DEX aggregators can optimize slippage, swap fees, and token pricing, resulting in a better rate for users and a lower risk of unsuccessful transactions when done correctly. Examples of DEX aggregators: DeversiFi, 1inch exchange etc.

How to use a decentralized exchange

  1.  You can connect to a DEX like Whalesheaven using a crypto wallet such as Trust wallet (for your web browser) or Binance Wallet (for mobile).
  1. While you can work with Decentralized exchanges directly from the browser built into Binance Wallet, an easier way is to pull up the website up on your computer’s web browser (in the case of Whalesheaven, the address is and click “Connect to a Wallet.
  1. A QR code should pop up, which you can scan with your phone’s camera (tap the upper-right corner of the Binance Wallet app to access the camera). Once scanned, your wallet will be connected to the DEX.
  1.  You’ll also need a supply of crypto tokens like ETH, BNB, AVAX etc. to start trading on most DEXs, which you can get from an exchange like Binance. The reason you need some of these tokens is for paying fees (known as gas) that are required for any transaction that happens on their respective Blockchain networks. These are separate from the fees the DEX itself charges.

Benefits of DEX

High-security level– Cyber threats and attacks are mitigated as a result of funds being stored on a trader’s own wallet.

Transparency— DEXs provide the same level of transparency as CEXs because all transactions are publicly tracked through the blockchain.

Anonymity— When trading one cryptocurrency for another, anonymity is guaranteed. In contrast to centralized exchanges, users do not need to go through the identification process. This attracts a large number of people who do not wish to be identified.

Preservation of assets— Authorities can seize a traditional exchange’s servers and assets, as well as disable user accounts if it shuts down. A decentralized exchange, on the other hand, does not have this problem because its server is a global network of computers that is difficult to control.

Utility— DEXs have been increasingly popular in underdeveloped economies, where reliable banking infrastructure may not be accessible. They allow for peer-to-peer lending, quick transactions, and anonymity. A DEX allows anyone with a smartphone and an internet connection to trade.

Drawbacks of DEX

Liquidity – without a large number of users frequently logging onto an exchange, finding somebody to sell to or buy from might be difficult.

Risk – it’s difficult to verify if a new exchange is authentic, and when they first started, investors claiming to have been cheated dominated the news.

Payment option— DEX only accepts payment in cryptocurrencies, unlike CEX that accepts both crypto and fiat currencies.

Popularity— DEX are less popular as they typically lack a simple user interface.

Whalesheaven: A top tier decentralised exchange

WhalesHeaven is a cryptocurrency trading platform that is at the forefront of the DEX movement, with its non-custodial P2P trading and the release of a novel multi-asset multi-signature cryptocurrency wallet that outperforms traditional multisig wallets. While conducting their crypto transaction, both buyers and sellers retain complete control of their assets. The platform does not keep track of either party’s crypto assets and simply functions as an escrow to ensure that the trade between buyers and sellers is completed.

Whalesheaven is simple to use, with a user interface that was created with both beginners and experienced traders in mind. Whalesheaven’s trading fees are now the lowest in the crypto space, allowing users to make the most profit possible. On our custody-free exchange, you can withdraw cryptocurrencies to any wallet for free. We are not like other exchanges that charge fees for users to withdraw cryptocurrency. There are no withdrawal fees or platform limits when you use our cryptocurrency exchange.

WhalesHeaven (WH) is a cryptocurrency trading platform that allows users to trade large sums of coins without affecting market conditions. When a large number of coins are acquired or sold in the cryptocurrency market, it usually has a positive or negative impact on the market, resulting in extreme volatility. According to the basic economic law of demand and supply, the bigger the number of a thing, the lower its value. Whalesheaven acts as a protective barrier, lowering volatility.

By enabling WH Cypher on our exchange, users can automate their trading procedures. Whalesheaven’s security is top-notch, since it employs multisig wallets to provide the best-decentralized protection for your cash available today. Users can start an auction, select a volume, make a compelling offer, and submit it to the site. The seller will receive offers from potential buyers. The seller is notified of the offers via the various contact channels that they select. They can complete the trade once this is completed.