Lumerin Blog
Published in

Lumerin Blog

Cryptocurrency & DeFi

What are DEXs or decentralized exchanges?

P2P cryptocurrency trading without intermediaries

Photo by Alexander Popov on Unsplash

The basics: What are decentralized exchanges?

Decentralized exchanges — also referred to as DEX s— are decentralized applications — dApps — built on blockchain networks that enable cryptocurrency trading.

In other words, they are online platforms that allow users to swap one cryptocurrency or token for another. Users can access DEXs directly from their crypto wallets, meaning they don’t need to trust their assets to a third party.

Additionally, besides trading and token swaps, most decentralized exchanges allow other forms of participation, like liquidity providing, governance, or staking. These functions improve the platform’s performance and grant users a reward in return for contributing.

Types of decentralized exchanges

Decentralized means that these platforms aren’t dependent on any financial institution or organization. Users can exchange their assets and execute buying and selling orders without any intermediaries.

How is this possible? Although all decentralized exchanges use blockchain networks and smart contracts, we can segment them into three different types according to how they achieve this.

Photo by Art Rachen on Unsplash

Order-books

Order books are ledgers that compile all users’ open orders to exchange an asset for another, always within a specific trading pair. Users can create buy or sell orders, where they dictate how much they want to pay for a specific token or how much they want to receive to sell it.

Similar to centralized exchanges, when a buy order matches a sell order for the same token and price, the DEX automatically completes them both, delivering the correspondent assets to each party.

The spread between the prices on all orders also determines the depth of the order book and the market price on the exchange. However, order book-based platforms can suffer from liquidity shortages, as they require matching orders to fulfill trades.

Automated market-makers (AMMs)

Automated market-makers were created to solve these liquidity problems. Their system relies on smart contracts that can hold user funds, locking them in pools as liquidity for a specific trading pair.

These liquidity pools “crowdsource” assets from the users, rewarding them with a small percentage of each trade made on that pair to incentivize them to provide liquidity. This is a popular passive income strategy in decentralized finance called “liquidity mining.”

Essentially, a user who wishes to swap a specific token for another calls a smart contract function that deposits a certain amount of token A in the liquidity pool and withdraws its equivalent market value in token B, sending it to the user’s wallet.

Automated market-makers enable instant, automated, and decentralized trading using algorithms to price assets in liquidity pools, offering deep liquidity, low transaction fees, and 24/7 uptime for as many users as possible.

However, they are also exposed to risk, like faulty or vulnerable smart contract code or high slippage due to low liquidity.

Aggregators

As the name suggests, aggregators resort to other protocols, platforms, and mechanisms to source and amass liquidity. Employing this method allows decentralized exchanges to minimize slippage, optimize prices, reduce fees, and generally improve efficiency and user experience.

In other words, they accumulate data from a wide range of other decentralized exchanges and enable their users to perform split trades, offering the best possible prices, fees, and experience in a short time.

Mitigating pricing inefficiencies like slippage and reducing the chance of failed transactions are other significant advantages of DEX aggregators.

To achieve maximum optimization and efficiency, these platforms use mathematical algorithms to take into account numerous factors in selecting the best possible provider for a given token swap.

Advantages and disadvantages of decentralized exchanges

There are many benefits from using a decentralized exchange over a centralized trading platform:

  • Anonymity and privacy: You don’t need to undergo any registration processes or enter your personal data (KYC) to use a decentralized exchange. The only requirement is to hold the private keys to a browser wallet with enough funds to pay the network fees.
  • Your keys, your coins: Centralized exchanges offer custodial wallets, meaning that they hold every user’s private keys. As such, they can freeze accounts, cancel trades and orders, or even seize funds. In decentralized exchanges, you have complete control.
  • No counterparty risk: Counterparty risk is that associated with the person on the other side of the trade. Being secured and enforced by smart contracts, this risk is mitigated on DEXs.
  • Broader token offerings: Centralized exchanges only list tokens that comply with legal regulations and requirements. Contrarily, on decentralized exchanges you can find all kinds of tokens. Some DEXs even allow users to create trading pools for new tokens with their respective trading pairs.
Photo by Austin Distel on Unsplash

Nevertheless, decentralized exchanges are also exposed and vulnerable to several risks that you should consider:

  • Scams, fraudulent tokens: As we mentioned, DEXs are lax as to which tokens are listed for trading on their platform. As a result, it’s up to the users to research the tokens themselves and make sure they’re legit projects and not money-grabbing, ponzi schemes.
  • Smart contract vulnerability: Code is perfect, but the humans who write it are not. Sometimes, smart contract code can be faulty, have vulnerabilities, and be exploited by hackers or whales. It’s important for security to review and audit dApps code. If you don’t know how, there are trusted and recognized auditors that you can resort to.
  • Increased responsibility: Yes, holding your private keys means nobody can seize or access your assets. However, it also means that you’re fully responsible for their security and safekeeping. That includes keeping your private keys secret, but also doing your own research on the tokens you buy, reviewing a protocol’s code, and verifying all the information you find. Nobody will be able to help you if you make a mistake.
Photo by FLY:D on Unsplash

Conclusion

Decentralized exchanges offer several advantages for cryptocurrency traders, but they also require a basic understanding of blockchain, smart contracts, and best security practices.

It’s crucial that DEX users are careful and do their own research about the platforms and tokens they interact with, because nobody else will do it for them.

We hope this article helps you consider these risks so you can take advantage of decentralized exchanges while staying safe.

Did you like this article?

We publish content like this every week. Make sure to follow us on Medium so you don’t miss it. You can also subscribe to our blog and visit Lumerin.io for more information.

Join the Lumerin community!

If you are a cryptocurrency miner or want to become one, there’s a place for you in our community. Access valuable content, engage in interesting conversations, and meet like-minded people through our social channels:

If you found this interesting, you should read…

--

--

--

An extensive library of newsworthy, analytical, and educational content regarding cryptocurrency and crypto mining. By Lumerin Protocol, built by Titan Mining.

Recommended from Medium

Matchpool GUP Token Audit

Introduction of LuckyCat🐱

Polygon Releases Testnet Plans for New Scalability-Focused Blockchain Called Avail

StarShip Reaching Escape Velocity, Communities Celebrate $StarShip Token’s First Birthday

Crypto For the Culture

The Metaverse Pet heaven

Introducing Super Urban People(SUP) for NFT Beginners.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Lumerin Protocol

Lumerin Protocol

Making crypto mining hashpower a tradeable commodity. Built by Titan Mining. Visit us on https://lumerin.io/.

More from Medium

Forward Protocol Progress Report

Bitcoin miners don’t care: New hashrate all-time high amidst strong price drop

Axie Infinity Hack is an Industry Problem

Hidden Issues solved by Cross-Chain Platforms like Polkadot