Have you ever been to an arcade? I have been to a few arcades, they are usually a lot of fun, especially if you have a cute girl or beautiful woman with you. Nevertheless, to play the games at an arcade, you usually need to bring your backpack of quarters. These quarters are heavy, but they are the fee to play the games. In most cases. A few weekends ago, I went to an arcade that didn’t let me use quarters. In fact, I had to trade my quarters for a special arcade token in order to play their games. There are probably psychological and economical factors for this that probably led to me giving them more money… but I had to exchange my quarters for their version of a quarter. Did you know you can do this is crypto?
What is a Dex?
A Dex is a decentralized exchange, meaning that it allows you to trade your crypto coins and tokens in a decentralized manner including low fees and instant transfers. First off, you need to understand that they work without a central authority, instead they replace a central authority with a smart contract. Smart contracts are pieces of code that allow two people to enter into an agreement, it’s’ basically like a legal agreement, but it’s written in code. So if both parties do what they agreed to, the smart contract will work like it should, but if one person wants to try something fishy, the smart contract won’t let them or they’ll give the other person their money back.
So Dexes do have limitations though, they only allow you to swap crypto for crypto, and those cryptocurrencies have to be on the same blockchain. For example, if you used Uniswap, you can only swap Ethereum and Ethereum tokens. Sushiswap, has expanded to many other blockchains, but you still cannot swap in between these blockchains… as of right now you must stay within the realm of the blockchain of the token you have.
Let’s go over some benefits and drawbacks of a dex first, then we’ll get into how they work.
Decentralized Exchange Benefits
First off, one major benefit of Dexes is that you don’t need to submit KYC info. This means you don’t need to submit your social security number, your profile pics, no fingerprinting, you don’t even need to share your name. This is a huge part of decentralized finance, being anonymous.
Secondly, there is no centralized authority. Instead of trusting Coinbase or Binance, you just have to trust the smart contract, which is code. Code is much more reliable than humans. In fact, this code is what we call “open-source” which means you can look at it if you want and find bugs or errors. This means hundreds of great developers are going to check it out before using it.
These Dexes are also usually much faster than Cexes, or Centralzied Exchanges, transferring tokens in seconds… and they require a very small fee, pennines on the dollar compared to Cexes. So Dexes are faster, cheaper, trustless, and don’t require any personal info… sounds like great technology waiting to blow up.
Decentralized Exchange Drawbacks
They don’t come without downsides though. Dexes don’t come with support. This means if you have an issue, there’s nobody to call, nobody to message about your issue. Sometimes they have community forums, but those are just other people generously helping out, not someone required to offer help.
This means if you do something wrong and send your coins to a different address or buy a scam coin that looks similar to a true coin… it’s your fault and you’ll never get them back. Another drawback is that you must use a hot storage device… on a Cex, your tokens sit on their exchange, waiting to be moved around at your beck and call.
Using a Dex, you must connect a wallet, either through your computer physically or through using an extension like Metamask. Another drawback is that sometimes these Dexes have low liquidity, meaning that if you buy a lot of a token… the price’s coin should shoot up. Vice versa, if you sell a ton of coins, you could crash the price. Lastly, as we mentioned before, the code is open for anyone to see. If a hacker wants to, they can experiment with the code and find a bug… and if they find a vulnerability… they could exploit it.
Order Book Method
The order book method is the exact method the United States Stock Market uses. In fact, it works and has worked for ages, but it has some drawbacks when it comes to decentralized finance. So how it works is if you want to buy or sell something, you pick a price you want to buy that asset, and then put in an order. So if you want to buy something, you give the third party (either the stock market exchange, or a smart contract) your money. When it find someone who wants to perform the exact trade you are offering, it swaps the two and gives you what you want. When you want to sell something, you just give it the asset you want to sell, and wait for someone to come along who wants to buy it. Otherwise, you can look at the whole Order Book and find someone who has already put an order in… then you can agree to their terms and complete the transaction.
The big downside of this? You have to wait around for someone to completely agree to your transaction terms. You’ll also have your funds or assets locked up with a third party until someone else agrees to or you pull out your half. There aren’t very many dexes that use this method, but it’s because there’s a much better method when it comes to DeFi.
Automated Market Maker Method
An automated market maker is the algorithm that most Dexes use. There are many benefits to this. For one, you don’t have to wait around for a person to match with the price you want to trade with. Instead, you are trading with a pool of funds. Each token you buy, it gradually charges you more and more. Each token you sell, it gradually gives you less and less.
These pools are actually called liquidity pools, and we have 2 great videos on how they work: Liquidity Pools, and Automated Market Maker. Our Liquidity pools video explains how investors can make money, and our AMM video explains exactly how the algorithm works.
These algorithms use a special formula to make sure they can always sell more and more tokens… even if they barely have any left. The less they have, the more they charge. This incentivizes some traders to come along and balance the pool back out by making a profit off the opposite trade. These algorithms work amazingly well to set prices and allow traders to trade, which is probably why most dexes use them.