Decentralised Exchanges (DEXs)
As much as the polarity between centralised and decentralised architecture exists in blockchains it also extends to crypto exchanges. Crypto exchanges are platforms that facilitate the buying and selling of crypto assets. This occurs in two settings, crypto to crypto exchanges and fiat to crypto exchanges. Another plane that this occurs on is between centralised and decentralised exchanges. This polarity has distinct characteristics governing the way it facilitates transactions and the nature of ownership.
Decentralised exchanges (DEXs) stand in contrast to CEXs for various reasons. These reasons include design & architectural choices, the maintenance of system liquidity, custodying of assets, Security, Privacy & censorship resistance.
Centralised exchanges (CEXs) are among the most widely used and liquid platforms. They exist in some ways separate from actual blockchains. As a user, you grant custody of your assets to the CEXs like you would with a bank. You do not own the private keys to your wallet like you would on the blockchain, the CEXs own it. CEX users do not actually exchange crypto or fiat with each other. Instead, when users deposit funds onto an exchange, the CEX takes over the custody of those assets and issues a corresponding IOU to the trader. The exchange tracks every order as an IOU and is only converted to crypto or fiat at the time of withdrawal. They give you access to your account, which is registered to your name. This is done after after having relinquished your personal details to them - this is known as Know Your Customer (KYC). CEXs facilitate trades through an order book. This order book collects individual buy and sell orders from users and matches them up. All CEXs are obligated to comply with regulatory overheads and consumer protection - as a result many users feel comfortable knowing that using their platform comes with a degree of assurance. All funds are held in your exchange-held crypto account in the form of an IOUs, with the option of transferring it your self-custodied crypto wallet.?
There are some disadvantages to CEXs. CEXs tend not to reveal their internal modus operandi to users.This can lead to a lack of transparency which creates potential for malicious activity such as wash trading and price manipulation. Wash trading involves the creation of artificial activity in a marketplace by buying and selling the same crypto assets at the same time. An investor would place a sell order and fill that same order with a buy to themselves. This is done to artificially increase trading volume. Due to CEXs holding custody over their users' funds makes it a single point a failure and paints a target on their back for hackers. CEXs are also an easy target for government censorship, giving way for regulators to freeze or seize user funds. Regulators would also be able to force these CEXs to reveal users' personal information. CEXs only list but a fraction of all available crypto assets. This is due to CEXs having stringent listing requirements for various crypto projects and their token. Very seldom will you have a newly launched crypto asset list immediately on a CEX. Most of the time, DEXs are where you’ll find newly launched tokens. .?
DEXs are built on top of blockchain networks in the form of smart contracts. Smart contracts (code written and executed on the blockchain) is the foundation upon which DEXs are built. They determine how users’ funds are custodied, how trades occur and how transaction fees are calculated. Every trade incurs a trading fee. Trading fees are determined by the DEXs smart contract.. There are three main types of DEXs. Automated market makers (AMMs), Order book DEXs and DEX aggregators?
Automated Market Makers (AMM) are smart contract run systems whereby through the use of blockchain oracles, execute trades using smart contracts. These oracles feed price data from various exchanges to the DEX to help it determine price. Instead of matching buy order and sell order, they tap into a pre-existing pool of assets to execute the trade. These pools are known as liquidity pools. Users are incentivized to provide liquidity (their assets) to these pools in exchange for a share in the trading fees from the DEX. The provisioning of assets into these pools comes in the form of two assets, in equal value, that would make up a trading pair. The downside of a liquidity pool comes when there is not enough liquidity in the trading pair. This would result in ‘slippage’. Slippage is when the buyer would pay above expected price for an asset due to there not being sufficient liquidity in the system. Another example of slippage would be when a trader receives less value than they’d expect from a trade.
The other type of DEX is an order book. These DEXs can have their order books either on the blockchain or off chain. DEXs using on-chain order books hold open order information on the blockchain itself. This all happens while users’ funds remain in their self-custodied wallet. However, the DEXs that hold their order book information off-chain only settle the trades on the blockchain - everything else happens off chain. This is done to bring the benefits of both centralised and decentralsied trading to users.
领英推荐
With the increase in the number of exchanges, there has emerged a category called DEX? aggregators that use several different DEXs to source the best possible price and the most competitive fees. This solves the problem of liquidity - as orders are sourced from various options and is not bound to one DEXs liquidity pool. The two main goals of DEX aggregators are to reduce the likelihood of failed transactions and to increase liquidity.?
All of the DEX variants are non-custodial - the user always owns and maintains their wallet and assets. There is no sign up process or email address needed. Unlike CEXs there is no KYC required. All users need are compatible crypto wallets such as Metamask, Kepler, Phantom or Xdefi. These wallets will interact with the smart contract on the various DEXs directly. Most blockchain networks have several DEXs from which to choose - thus the choice of wallet will be determined by the blockchain network in use. There are different wallets needed for different blockchain networks - some can connect to several different networks, others only one. These wallets exist as browser extensions on desktop devices and as apps on mobile devices. These DEXs have front ends that look like normal websites but the backend is completely run on Smart contracts on the blockchain. The various wallet extensions and apps simply connect. All funds of the users remain directly in their respective wallets. This is done without relinquishing personal information - perfectly anonymous.?
Due to users having full custody over their funds there's less of a risk of being hacked by a DEX or a DEX being hacked - resulting in lost funds. If you are a liquidity provider, the safety of your funds extends as far as the security of the smart contract holding your LP position. This can be easily verified on the blockchain, with many audits taking place to ensure this.?
There are some risks associated with using DEXs. DEXs require some dedicated time to learn the platform. For instance: knowing how to connect your wallet, knowing to keep your recovery phrase private, understanding slippage, being able to distinguish bogus DEXs with dubious smart contracts from credible ones. This space is open and largely anonymous with no regulatory oversight, not every actor is good. Some tokens that are listed are associated with bad acting projects, with intentionally poorly written smart contracts. This is why it’s always important to do your own research and due diligence when investing.?
As it stands the DEX category is vast - with over 507 individual DEXs, spanning across various blockchains. Together their Total Value Locked (TVL) is $29.39B. These TVL are Liquidity Provider positions combined. Uniswap (UNI) has a TVL of $6.2b, with a market cap of $3.8b and daily volume of $155m. Pancakeswap (CAKE) is another DEX on the Binance Smart Chain (BNB). CAKE has a total value locked of $3.29B, a market cap of $666m and a daily volume of $44m. Sushiswap (SUSHI) has a TVL of $808m, a market cap of $277m and a daily volume of $50m. The DEX category is the number one category when it comes to combined TVL. This category illustrates the most used category within DeFi.?
For the first time in the internet’s history, retail investors and fund managers alike can trade in and out of assets in an anonymous way. This can all be done without any downtime, 24 hours a day. The fact that the TVL is nearly $30B, is noteworthy and testament to the demand of such an instrument. The category still has some strides to make in terms of scalability, attracting more liquidity and security. However many of the aforementioned protocols are not even 4 years old yet, some were launched as recently as 2020. Imagine what this will look like in another 5 years.
Thanks to Alessandro Scarcella for reading drafts of this article