What is DEX crypto or decentralised exchange?
11:37, 27 July 2021
The blockchain is a decentralised technology that relies on algorithms and consensus protocols without the need for a central authority to determine if a record is valid or not. The spirit of cryptocurrencies and the blockchain is to promote decentralised transactions that eliminate the middleman in the process of exchanging assets and data.
With that in mind, it may seem counterintuitive that cryptocurrencies have to be traded through centralised exchanges as that goes against the essence of blockchain technology. In response to this contradiction, decentralised crypto exchanges have emerged.
These exchanges represent an environment for peer-to-peer transactions, where digital assets can be exchanged without relying on the services of a third party who will ultimately have some degree of control over digital assets and data.
In the following article, we will explain what a decentralised exchange is, how it works, and what the benefits are of using a decentralised exchange (DEX) compared to relying on a centralised exchange (CEX).
What is DEX crypto exchange? Eliminating the need for an intermediary
A decentralised exchange, also known as DEX crypto exchange, is a platform whose back-end is designed on top of an existing blockchain infrastructure, and all transactions made through the exchange are recorded in it for transparency and safety.
These exchanges rely on smart contracts and on-chain data to facilitate peer-to-peer transactions through which digital assets can be passed from one wallet to another.
In the case of DEX crypto exchanges, no central server holds the data of the users who are exchanging assets, which mitigates the risk of data being stolen or accessed without authorisation by a third party.
As a result, users who trade assets through a DEX remain anonymous, as all transactions are encrypted and the identity of those who participate is reduced to their wallet number.
Transactions can be completed without incurring additional costs as no intermediary stands to make money out of the operation. This means that DEXs can offer lower costs for executing transactions than their centralised CEX peers. Still, CEX fees could be more efficient than DEX’s overall. This is because users’ funds are kept in a CEX wallet, enabling users to exchange them without incurring blockchain costs. This is in contrast to DEX, where swapping fees for small volumes can become high.
Nevertheless, decentralised exchanges face some hurdles which impede their widespread adoption. They are considered less scalable, because DEXs function using smart contracts that live on blockchains and are bound by the limits of their underlying infrastructure.
Moreover, they require more sophisticated knowledge from crypto newbies to start trading. In the absence of intermediaries, traders get full custody of their own crypto assets and are responsible for managing their private keys and wallets. Although this may be considered as a benefit, it also comes with a risk that your keys can be lost or stolen.
The lack of an intermediary also means that the exchange does not have to adhere to know-your-customer (KYC) or anti-money-laundering (AML) standards, which add another layer of security and trustworthiness to the crypto exchange.
Although centralised exchanges still have greater trading volumes compared to DEXs, according to CoinGecko’s Q2 cryptocurrency report decentralised exchanges showed higher growth rate than centralised exchanges (131% vs 65%) and accounted for 12% of the total growth for the second quarter of 2021.
The DEX/CEX ratio improved from 6.7% to 9.4% during the same period.
How does a decentralised exchange work?
Most decentralised exchanges nowadays work following an Automated Market Maker (AMM) protocol. This is a type of DEX protocol which relies on a mathematical formula to set prices. Instead of an order book as used by traditional exchanges, asset prices on DEX are set according to a pricing algorithm.
In the world of finance and centralised exchanges, a ‘market maker’ is an organisation that monitors and actively participates in the market to provide liquidity to all the instruments that are traded during a given session, so that buyers can always find someone who sells and sellers can always find someone to buy from.
Decentralised exchanges are designed to perform this same task but without having to hold the assets themselves. Instead, these exchanges create pools of different tokens that are regularly traded through their platforms. Those tokens come from investors who are willing to provide them in exchange for a fee.
This design passes the market-making burden onto investors and, with it, all the profits that come from market-making as well.
The algorithm that regulates the decentralised exchange will price the assets according to supply and demand dynamics, and fees paid for pooling different tokens are adjusted based on those dynamics as well.
The largest decentralised exchange nowadays by daily transacted volume is Uniswap, but there are many others including PancakeSwap, KyberSwap, 1inch, and Zapper. According to CoinMarketCap, the top 10 decentralised exchanges by trading volume as of 26 July 2021 are:
Differences between a decentralised exchange (DEX) and centralised exchange (CEX)
Working in parallel for years, centralised and decentralised exchanges have some fundamental differences. The following is a summary of the most important differences between DEXs and CEXs.
Execution: in a DEX, transactions are executed automatically based on the parameters established by a smart contract. Meanwhile, transactions made through a centralised exchange must first go through the CEX’s systems and market-making protocols before they can be settled.
Data storage: data generated by transactions made within a DEX is stored in the blockchain that supports the platform, while data from transactions made within a CEX is stored in a server.
Market making: DEXs typically follow an Automated Market Maker protocol that relies on a pool of tokens provided by a group of investors who are compensated accordingly. CEXs rely on their order book to settle transactions and must participate actively to provide liquidity to the different instruments that their clients need to exchange.
Transaction costs: transactions can be completed at a lower cost with DEXs as a result of removing the middleman’s cut. Meanwhile, CEXs need to charge higher trading fees to finance their operating expenditures and fulfill regulatory costs.
Speed of execution: most blockchains nowadays can hardly deliver the kind of execution speed that CEXs can. However, scalability is an issue that infrastructure blockchains are working hard to resolve and, at some point, DEXs should offer similar execution speeds compared to their centralised peers.
Anonymity: since all transactions that occur within a DEX are recorded in the blockchain as an encrypted piece of code, the identity of the parties involved doesn’t have to be disclosed as they will be identified by the address of their wallet. Meanwhile, CEXs are obligated by law to gather information from their clients before executing a transaction on their behalf – also known as the Know Your Customer (KYC) rules.
Security: on centralised exchanges, each transaction is recorded by a central authority, or the CEX exchange itself. Executing and recording transactions through smart contracts, decentralised exchanges enable trustless transactions. As DEXs do not hold their traders' funds, they bear lower risk of hacker attacks than CEXs.
Benefits of DEX
Data from users remains anonymous and transactions are stored within the blockchain.
Lower trading fees resulting from the elimination of the middleman.
A wide range of digital assets can be exchanged through DEXs as long as someone is willing to provide liquidity for them.
Liquidity providers are compensated for acting as market makers.
Users have access to their private keys and control their digital assets.
Independent from regulations and do not require authentication procedure.
Disadvantages of DEX
Execution speeds can be slower compared to CEXs due to the still limited scalability of the underlying blockchain.
If hackers manage to perform a 51% attack on the blockchain that powers the DEX, fake transaction data could be introduced or existing data could be tampered with.
Liquidity at DEXs largely depends on the availability of tokens as a result of increased participation of individual market makers. That could result in lower levels of liquidity compared to CEXs for less popular tokens.
DEXs require deeper knowledge of decentralised blockchain technology to start trading. At the very least, users must learn how to fund their external wallet and to link it to the DEX interface to make a trade. With CEXs, the depositing process is more straightforward.
DEX technology does not allow you to buy digital assets with fiat money. Neither you can trade fiat or withdraw your funds to your bank account, which can become a barrier to new traders.
DEX vs CEX: which is better?
Can DEXs overtake CEXs, or are intermediaries still necessary in the crypto world to ensure that transactions can be transparently and accurately performed?
This is an ongoing debate and if you are interested in learning more about this technology you should read up on decentralised finance, also known as DeFi, and the protocols and systems that power this growing segment of the crypto market. According to CoinGecko's Q1 2021 cryptocurrency report, DEXs dominated half of the DeFi ecosystem.
Sharing his view on the topic, Mikhail Karkhalev, market analyst at Capital.com, said:
“There are no particular advantages of decentralised exchanges over centralised ones. In the worst-case scenario, both DEX and CEX can be hacked, or founders can disappear with clients' money. On the bright side, CEX outperforms DEX in the ability to work with fiat currencies and is considered more intuitive. DEX, due to its decentralised nature, can give anyone the ability to launch their own token whenever they want. That is, on DEX, you can work with an unlimited number of assets, which increases the chances for making profit.
Simply put, DEXs and CEXs each have their own audience. However, DEX and the DeFi sector seem to be the future”.
Read more: Robinhood IPO: is the upcoming listing worth the hype?
Related topics