What Is a Decentralized Exchange (DEX)?
You probably know the drill with “regular” centralized cryptocurrency exchanges. Sign up with your email, come up with a strong password, verify your account, and start trading cryptocurrency.
If you don’t, our ‘Absolute Beginner’s Guide To Cryptocurrency Investing’ will take you through the process step by step.
Decentralized exchanges are comparable to this, however they do not need users to sign up for accounts. The majority of the time, there is no way to deposit or withdraw cryptocurrency. The exchange takes place directly between the wallets of two different users, with very little (if any!) intervention from a third party.
Decentralized exchanges are sometimes more difficult to master, and you shouldn’t expect them to always have the assets you’re looking for in their inventory. However, as the technology advances and more people become interested in it, it is possible that they may eventually become essential parts of the cryptocurrency ecosystem.
Exchanges have been very important to the process of connecting buyers and sellers of cryptocurrencies ever since Bitcoin was first introduced. We would be in a far worse liquidity position and have no means to come to an agreement on the appropriate pricing of assets if these forums did not draw in users from across the world.
Historically speaking, centralized players have held the majority of power in this industry. In spite of this, an increasing variety of tools for decentralized trading have evolved as a result of the quickly developing stack of technologies that are now accessible.
In this piece, we’ll go into the world of decentralized exchanges, also known as DEXs, which are marketplaces that don’t need the participation of any middlemen.
Defining decentralized exchanges
How a centralized exchange works
You may choose to deposit either fiat cash (via a bank transfer or using your credit or debit card) or cryptocurrency when using a conventional centralized exchange. When you deposit cryptocurrency, you are giving up control over that cryptocurrency. Technically speaking, you are unable to spend it on the blockchain, despite the fact that it may still be used for trading and withdrawals. This is not a limitation in terms of its utility.
Since you do not own the private keys to the money, you will need to ask the exchange to sign a transaction on your behalf whenever you want a withdrawal. Since you do not own the private keys, Transactions do not take place on the blockchain while you are trading; rather, the exchange is responsible for allocating balances to users inside its own database.
As a result of the fact that the sluggish speeds of blockchains do not obstruct trade and everything takes place inside the system of a single company, the overall workflow has been tremendously optimized. It is now much simpler to purchase and sell cryptocurrencies, and you have access to a wider variety of trading instruments.
This does come at the expense of one’s freedom, though, since it requires one to entrust one’s financial resources to the exchange. As a consequence of this, you put yourself in a position where you are exposed to some counterparty risk. What happens if the team disappears with the BTC you worked so hard to earn? What happens if a hacker takes control of the system and uses it to steal money?
This level of risk is considered acceptable by a large number of users. They just limit themselves to trustworthy exchanges that have proven track records and safety measures in place to reduce the risk of data breaches.
How a decentralized exchange works
Cross-chain DEXs have received some development attention, although the vast majority of these exchanges are focused on the assets that can be found on a single blockchain (such Ethereum or Binance Chain).
On-chain order books
Everything is handled on the blockchain via certain decentralized exchanges (we’ll get into hybridization methods in a minute). Every order that is placed, together with any modifications or cancellations, is recorded on the blockchain. Because you are not relying on a third party to communicate the commands to you, and because there is no way to conceal them, this strategy is likely the most open and honest one.
To make matters worse, it’s also the least practicable option. You will be required to pay a charge due to the fact that you will be requesting that each node in the network permanently record the order. The fact that you have to wait until a miner adds your message to the blockchain is one of the factors that might make the process seem laborious.
Some people think that this model has a problem with front running. When an insider is aware of an upcoming transaction and utilizes that knowledge to execute a trade before the transaction is completed, this is an example of front running, which is a kind of insider trading. As a result, the candidate who is now in first place has access to information that is not generally known. In most cases, doing so is a violation of the law.
It should come as no surprise that there would be no opportunities for front running in the conventional sense if everything is recorded on a global ledger. In spite of this, there is another kind of attack that may be carried out, which is one in which a miner views the order before it is confirmed and then takes measures to guarantee that their own order is added to the blockchain before any other orders.
The Stellar DEX is one type of an on-chain order book that is currently in use.
Off-chain order books
a book for off-chain orders Even if DEXs are still decentralized in certain ways, it is fair to say that they are more centralized than the entries before them. The orders are stored in a central location rather than being added to the blockchain as they are received.
Where? That varies. You may put all of the order-taking responsibilities into the hands of a centralized organization. If such entity is dishonest, then it is possible for it to manipulate the markets to some degree (i.e., by front running or misrepresenting orders). Despite this, you would still profit from storage that does not involve a custodian.
A excellent illustration of this would be the 0x protocol, which allows ERC-20 and other tokens to be launched on the Ethereum network. It does not function as a single DEX but rather as a framework that allows third parties known as “relayers” to maintain order books that are stored off-chain. A combined liquidity pool may be accessed by hosts, who can then transmit user orders to one another by using 0x smart contracts and a few other features. Once both parties have been found, the transaction may then be carried out on the blockchain.
They systems are preferable in terms of usability than those that depend on on-chain order books since these may be accessed directly by users. Due to the fact that they don’t make as much use of the blockchain, they aren’t subject to the same limitations in terms of speed. Nevertheless, the deal must be resolved on it, which means that the off-chain order book architecture is still slower than centralized exchanges in terms of transaction throughput.
Automated Market Makers (AMM)
The particulars of AMMs are determined by the implementation; nevertheless, in general, they consist of a collection of smart contracts strung together and the provision of ingenious incentives to encourage user engagement.
The currently existing AMM-based DEXs have a tendency to be rather user-friendly, since they integrate with wallets like as MetaMask and Trust Wallet. However, in order to finalize transactions, an on-chain transaction is required, just as it is with other types of DEXs.
Pros of DEXs
Compliance with KYC/AML, which stands for “Know Your Customer” and “Anti-Money Laundering,” is the rule for many exchanges. Individuals are often required to provide identification papers and proof of address because doing so satisfies regulatory requirements.
For some people, this is a worry about their privacy, while for others it is a concern about their accessibility. What should you do if you don’t have any papers that are legitimate on hand? What if the information were to become public in some way? Because DEXs do not need authorization, nobody verifies your identity when you use one. A cryptocurrency wallet is all that is required of you.
However, when DEXs are largely managed by a centralized body, they must comply with certain legal standards. If the order book is managed from a central location, then the host is required to maintain compliance in certain circumstances.
No counterparty risk
The fact that decentralized cryptocurrency exchanges do not take custody of their users’ assets is the fundamental benefit they provide. Therefore, even the most severe breaches, such as the one that occurred in 2014 with Mt. Gox, will not put the users’ cash in jeopardy or disclose any sensitive personal information.
Tokens that aren’t listed on centralized exchanges can still be traded freely on DEXs, provided there’s supply and demand.
Cons of DEXs
Trading volumes and liquidity
The amount of transaction conducted on CEXs continues to far outweigh that of DEXs. Perhaps even more significantly, the liquidity of CEXs is often higher than that of other exchanges. A measure of an asset’s liquidity is how quickly it can be bought or sold at a price that is considered fair. In a market that is very liquid, the difference in price between bids and asks is minimal, which indicates a high level of rivalry between buyers and sellers. If the market is illiquid, it will be more difficult for you to locate someone who is willing to exchange the item with you for a price that is acceptable to you.
Because DEXs are still at a very infant stage, there is not always a supply or demand for the digital currency assets that you desire to exchange. It is possible that you will not be able to identify the trading pairs that you wish to utilize, and even if you do find them, the prices at which assets trade may not be fair.