One of the biggest actors currently in decentralized finance (DeFi) is the decentralized exchange (DEX). DeFi projects such as exchanges offer lucrative investment and passive income opportunities in crypto. Like any other industry, it’s important to know the basics of how to invest in DeFi. This article will provide an easy breakdown, explaining how a DEX works. We also review its benefits in comparison to a centralized exchange. Aftward, we’ll showcase Uniswap as an example of an effective DEX.
What is a Decentralized Exchange?
A decentralized exchange removes the third party, allowing users to send cryptocurrency transactions directly to other interested parties. This online peer-to-peer (p2p) service solves the big problem characteristic of centralized exchanges. By enabling a p2p market built directly into the blockchain, traders can independently manage their funds, including its storage and operations. The biggest takeaway is that nobody needs to be managing a centralized exchange. Thus, such a design removes the unnecessary middleman.
Instead, it’s the distributed ledger technology (DLT) that manages the security and integrity of a DEX (we know DLT as blockchain technology). DLT allows the network to simultaneously access, validate, and record transactions in an immutable manner. In other words, DLT provides transparency to the service users. The database stores user information safely and accurately, and the network protocol provides another layer of protection.
Most decentralized exchanges work on the Ethereum (Uniswap) or Graphene (Bitshares) blockchain. But some DEX are powered by other cryptocurrencies’ blockchain.
Centralized vs. Decentralized Exchange
The first thing to note is that a centralized exchange is managed by a company or private person focused on generating profit through their service. In practice, this means incurring transaction and other user fees that can vary widely from one platform to another. These exchanges manage the platform’s safety, security, and integrity by taking complete control of its operation. Such exchanges also independently make decisions that determine the service’s development.
Unlike a DEX, a centralized exchange identifies its users and keeps their coins in accounts that belong to the company.
Advantages of a DEX
One crucial advantage of DEX is its security over user assets. Since decentralized coin exchanges do not store your assets, nobody can hack them. The funds won’t disappear if a complete network collapses. In other words, the lack of a single entry point makes it needlessly complicated for hackers. This is what separates DEX from centralized exchanges most of which are hacked regularly.
There is no need for a personal account or identity verification on a DEX. Therefore, the network doesn’t store any information like email addresses and other personal data. There is no need to worry that someone will steal user’s personal information. To comply with regulation, centralized exchanges employ Know Your Customer (KYC) and Anti-Money Laundering (AML) procedures, making user information vulnerable.
More, decentralized exchanges are unregulated by a central entity or company. Given that, there is less risk of price manipulation or trade volumes’ falsification. DEX’s independence from regulators mitigates another vital concern. That is, the service is not going to be blocked dependent on user location or other factors.
Disadvantages of a DEX
Despite its long list of advantages, the distributed nature of a decentralized exchange has certain downsides. For one, restoring access to an account with a broken password or lost private key is not compatible with DLT. It is impossible to get a refund or chargeback if the user has mistakenly initiated a transaction and committed to an operation. Users need to be sure that they store their passwords securely and check over transaction details carefully before starting them.
Another drawback is low liquidity. Presently, decentralized exchanges do not have as high a trading volume compared to centralized sites. Moreover, the smart contracts used to execute transactions are not supported by all cryptocurrencies. This limits the token options available for traders on a DEX.
What is the Uniswap Decentralized Exchange
Uniswap serves as an exciting example of a DEX. Through clever development, Uniswap has mitigated some of the pitfalls traditionally associated with DEXs, such as low liquidity.
Uniswap launched in 2018 on top of the Ethereum blockchain. This is what makes the platform compliant with all ERC-20 tokens. The technology is completely open-source, allowing you to copy its code for the purposes of creating your own decentralized exchange. Uniswap even has a convenient feature that allows users to list tokens on the exchange for free.
Under the Hood: How Uniswap Works
Uniswap executes two types of smart contracts on its distributed ledger; an “Exchange” contract and a “Factory” contract. Factory contracts allow users to add new tokens to the platform. Meanwhile, exchange contracts facilitate the sending and receiving or ‘swaps’ of ERC-20 tokens on the platform.
To address the issue of liquidity, Uniswap has developed its own liquidity protocol. It works by pooling a fund of money together from liquidity providers (LPs) to execute all the swaps that occur on the platform. This enables users to exchange tokens immediately without waiting for an opposite buyer to complete a trade. Liquidity providers are users of the platform who have an incentive — receiving a token that represents the proportion of their money staked in relation to the pool. Liquidity providers can exit at any point. They can also reclaim a portion of the total fees from the reserve relative to their stake in that pool.
Also unique to Uniswap is the use of an automated market maker system. This system replaces an order book system to determine the price of an asset. The order book system adjusts the price based on the highest buyer and lowest seller. Unlike it, the market maker system determines an asset’s price dependent on the ratio of coins existent in a respective pool and its supply and demand.
How to Use Uniswap and Uniswap Tokens
To use Uniswap, users need to have an ERC-20 supported wallet setup such as MetaMask or WalletConnect. Users also need ether to cover ‘gas’ — the term used for transaction fees on the Ethereum network.
Users can acquire the platform’s native uniswap token, UNI. Once a user installs uniswap, this token, known as a governance token, gives its holder the ability to vote. Voting means effecting change on new developments and the platform’s iterations. This is an essential user-centric feature that gives uniswap another advantage over similar DEXs.