
In brief
- DEXs allow trading without an intermediary.
- Users don’t need to give up custody of their coins.
- The main drawback for some: you’re responsible for your own security.
How Do Centralized Exchanges Work?
Decentralized exchange, also known as DEX is a location that allows users to trade in cryptocurrencies without the need for an intermediary. To know the definition of a decentralized exchange necessary to know how centralized exchanges function.
A central exchange like Binance , or Coinbase is a web-based or application that lets users purchase, sell or trade tokens and cryptocurrencies offered on that exchange.
Let’s say that you’d like to buy Bitcoin.
You can visit an exchange, join by providing some bank information and identification details and then make a cash deposit. (Sometimes the process can take some time, which is the main disadvantage of centralized exchanges over. DEXs.) The exchange will give you the price based the “order book” of people trading and buying at various amounts. You can then make the exchange.
So, what the next step?
The exchange will reveal the Bitcoins you have in your account. Additionally, you are able to trade them for different tokens that are listed on the exchange. However, you’re not actually holding thembecause you’re trusting the exchange to serve as a custodian on behalf. The transactions you make such as swapping Bitcoin to Ethereum isn’t happening on an blockchain however, they are happening in the exchange’s database.
Exchanges put users’ cryptocurrency in the wallets (often “hot” wallets connected to the internet) that are controlled by the exchange. The exchange manages the private key of your account. (There is a way around this, since exchanges permit the transfer of tokens into a private wallet however, this requires an additional step in case you decide to sell that cryptocurrency.)
The reason for DEX-based exchanges, DEX advocates claim is security. A central exchange could limit your access to your cryptocurrency limit or stop trading and could even make you at risk to hackers.
However central exchanges are typically much more user-friendly for those who are new to the market, and they typically offer speedy trading since they’re not tied to the blockchain infrastructure. Coinbase has achieved the biggest accomplishment: making itself the most well-known brand across America. U.S. for crypto-curious folks who want to dive into investing in cryptocurrency but feel bewildered by the process. For them that aren’t, using Coinbase (or or any central exchange) serve as a custodian for their funds is perfectly acceptable.
How Do Decentralized Exchanges Work?
A decentralized exchange uses smart contracts (automatically-executed protocols) to facilitate trading between individuals, but doesn’t take control of their coins.
DEXs deal with this in three methods: an on-chain order book, an off-chain ordering book and an automatic market maker method.
In an order book on the blockchain each transaction is recorded on blockchain. This includes not only the actual purchase as well as the request to cancel or purchase an order. This is the highest level of decentralization however, the necessity to record everything on a blockchain could increase the cost and make it slow.
Off-chain order books ensure that everything happens off-chain and only the final transaction settled on blockchain. Because orders aren’t stored on chain the method could be a problem for some of the security problems of centralized exchanges , but isn’t as costly or slow as the on-chain order books.
Automated Market Makers, or AMMs, don’t need to purchase ordering books. If you’re using order books, you own Chainlink tokens but would like to purchase Compound then you’d require someone who has Compound who would like Chainlink and will trade it for it at a price that is agreed upon. AMMs get rid of counter-parties and use algorithms that set the price, which allows you to trade Chainlink to Compound regardless of who is who is on the other side of the deal. To help facilitate this, they usually employ “liquidity pools,” essentially paying users to store certain funds inside a smart contract, which is then tapped to fund trades. Users, in turn, are a major factor in the facilitation of trades.