Comparing and contrasting the best decentralized exchanges: Uniswap, PancakeSwap, 0x, IDEX, Loopring, Kyber Network, Decred, and AtomicDEX.
Nearly everyone in the blockchain space agrees that decentralized exchanges (DEX) are the future of crypto trading. That’s because, even now in 2021, trading digital assets on centralized crypto exchanges can be a headache.
What is a Centralized Cryptocurrency Exchange?
Before we get to decentralized exchanges, let's understand the traditional cryptocurrency exchange. An ordinary exchange is a web application that runs on centralized servers. It is typically not open source. It must manage users’ login data, such as their email addresses and passwords, as well as their KYC documents (if the exchange requires them). We can refer to exchanges of this variety as centralized exchanges (CEX).
To make trades on a CEX, users must deposit funds upfront. It’s clear why this is a requirement, as users should not be allowed to make trades with funds they do not have.
However, the deposit process can take up to an hour or more, as most exchanges require a high number of block confirmations before the funds are considered safely deposited. This model also forces users to forfeit control of their funds when making a deposit to a CEX.
As such, a traditional centralized exchange controls all of the funds deposited by its users. All funds are controlled by just one person or a small group of people. This forces them to manage many different crypto wallets, as no wallet can hold all every digital asset in existence. So an ordinary CEX must manage many high-value wallets to securely store their users’ funds while the users trade.
Centralized exchanges use a credit system, sometimes called an IOU system. This means that when a trader deposits funds, her account gets credited accordingly, and then she can create buy and sell orders.
So, if Alice deposits BTC, she can place a buy order for another digital asset, like KMD. This can be thought of as buying KMD with BTC, or it can be thought of as selling BTC for KMD. Once the trade is complete, Alice can submit a withdrawal request and have her KMD sent to her personal wallet. This is essentially “cashing in” the IOU that the exchange issued to her.
Limitations of Centralized Exchanges
Now that we’ve covered what centralized exchanges are and how they work, we can begin to understand their limitations and challenges.
As described above, all CEXs take custody of traders’ funds. All the funds are consolidated into a few high-value wallets. These wallets’ private keys are always under the control of the exchange’s leadership.
When you consider that CEXs might have tens or hundreds of thousands of users, it’s easy to see how these wallets quickly become a liability. Taking custody of users’ funds forces CEXs to manage and safeguard massive amounts of wealth, making them an extremely lucrative target for hackers and bad actors.
Security is a huge concern for CEXs. Over the last 10 years, hackers have stolen more than $1.5 billion from centralized exchanges. Many exchanges— Mt. Gox, Youbit, Cryptopia— were forced to file for bankruptcy and shut down as a result of hacks.
If a retail bank gets robbed, and all of that bank’s money is stolen, the customers of that bank still get their money back. This is true because, in most developed nations, banks are insured by the government.
In the United States, for instance, the Federal Deposit Insurance Corporation (FDIC), established by the 1933 Banking Act, in the midst of the Great Depression, provides insurance to all licensed commercial banks, insuring each account holder up to $250,000 USD.
For better or for worse, none of this holds true for CEXs. If a centralized exchange is hacked and goes bankrupt, all of the users who had funds on that exchange are not guaranteed reimbursement. Their funds may be gone forever. That’s why it is so crucial to take security very seriously, and why many savvy users refuse to keep their coins on a CEX.
Deposits, Withdrawals, and Fees
Before making trades on a CEX, users must deposit their funds to the exchange itself. This process is free but it generally takes time. Exchanges force users to wait for a high number of block confirmations before giving them access to their funds for trading.
When a user wants to stop trading and withdraw their funds to a private wallet, they need to create a withdraw request and pay a fee. Withdrawal fees are paid in addition to trading fees. While trading fees vary from exchange to exchange, they are typically 0.2% of the value of every trade for both the buyer and the seller. You can imagine how quickly these fees add up.
Binance, for example, was reportedly more profitable than Deutsche Bank, the largest bank in Germany, in 2018. Despite a prolonged bear market, Binance collected $200 Million in profit in the second quarter of 2018 alone.
What Is a Decentralized Cryptocurrency Exchange?
For a truly decentralized exchange, all of the challenges described above are overcome.
There are approximately one hundred decentralized exchange protocols in development or available for live trading. This is one of the most popular sub-categories within the decentralized finance space. However, many projects calling themselves a decentralized crypto exchange are not actually decentralized. This really boils down to the debate over what the decentralized definition actually means in practice.
What does decentralized mean? With a true decentralized exchange (DEX), your funds are always in your custody, thus eliminating the security issues that plague centralized exchanges. This means your funds are in your control and remain much more secure. Real decentralized exchanges must also be permissionless because, if a DEX requires users to receive permission, then there must some centralized entity controlling it.
Users never need to deposit or withdraw funds to trade on a true DEX. On top of that, DEXs provide better privacy, transparency, and censorship-resistance, and allow unlimited trading pairs using technologies like atomic swaps. With atomic swap technology, traders can make cross-chain exchanges between any two listed assets.
To see how the most prominent DEXs in the industry compare, let’s have a closer look at their underlying DEX protocols.
Read our comparison guide to learn more about CEXs vs. DEXs.
Decentralized Exchange FAQs
How many decentralized exchanges are there?
According to CoinGecko, there are over 100 decentralized exchanges as of June 2021. However, the number is probably much higher many smaller or emerging DEXs are often not listed on websites that track trading volume.
Are decentralized exchanges legal?
Yes, decentralized exchanges are legal just like centralized exchanges. The same laws across various jurisdictions apply to DEXs.
Are decentralized exchanges safe?
Yes, DEXs are widely considered to be safe. The user controls their own private keys when making trades, so there is practically zero risk of a large-scale security breach that would lead to loss of funds. DEXs do have a few security challenges to consider, though. Flash loan attacks, rugpulls, and phishing attacks are common.
Can decentralized exchanges be hacked?
Yes, for example, decentralized exchanges may use smart contracts that contain bugs which allow hackers to carry out sophisticated attacks.
What is the most decentralized cryptocurrency?
Bitcoin is generally considered to be the most decentralized cryptocurrency. It is one of the most distributed node networks - a group of computers that verify transactions. Additionally, Bitcoin (BTC) is owned by a larger group of people. However, just as with any blockchain network, there are whales - a small group of users who control a large percentage of the coin supply. There are also a select few mining pools that effectively determine consensus - decide whether transactions are valid or invalid.
A Technical Comparison of Decentralized Exchanges
Now that we understand what a DEX is and have outlined the DEX definition, let’s dive deep into the finer details of 8 major decentralized exchange protocols: Uniswap, PancakeSwap, 0x, IDEX, Loopring, Kyber Network, Loopring, and AtomicDEX. After reading this overview, you'll have a good understanding of how the best decentralized exchange technologies work.
Uniswap - The Most Popular ERC-20 DEX
The Uniswap exchange uses Constant Product Market Maker (CPMM) - a variation of AMM technology also used by other popular ERC-20 DEXs like Bancor and Curve. AMMs are smart contracts that enable liquidity providers (LPs) to add or remove liquidity by interacting with a liquidity pool. On Uniswap, liquidity providers are required to deposit Ethereum (ETH) and an ERC-20 token (e.g. AAVE, DAI, COMP, or thousands of others) into a smart contract at a 50/50 ratio. Users who make trades on the Uniswap exchange pay a 0.3% fee, which is shared among all the liquidity providers in the same liquidity pool. In other words, liquidity providers have an opportunity to earn rewards for letting their idle funds sit in a smart contract. When a liquidity provider wants to redeem their funds, they can do so at any time by withdrawing from the smart contract.
In Uniswap v2, liquidity is distributed evenly along an x*y=k price curve, with assets reserved for all prices between 0 and infinity. According to Uniswap, a majority of this liquidity is never put to use. As a result, v2 liquidity providers only earn fees on a small portion of their funds, which can fail to appropriately compensate for Uniswap exchange impermanent loss. Additionally, traders are often subject to high degrees of slippage as liquidity is spread thin across all price ranges.
Uniswap v3, which went live on the Ethereum mainnet on May 5, 2021, brings a major change to tackle the impermanent loss issue. Liquidity providers concentrate their capital within custom price ranges, so they can provide more or less greater amounts of liquidity at desired prices. Uniswap also touts that v3 is 4000x more capital efficient. This improvement also benefits traders because it enables low-spliggage trading (shown on Uniswap as price impact). Slippage percentages are even lower than centralized exchanges and stablecoin-focused AMMs.
PancakeSwap - Most Popular DEX For Binance Smart Chain
Based on the Uniswap model, PancakeSwap is Binance Smart Chain's CeDeFi DEX and AMM solution.
If you understand Uniswap, you should understand PancakeSwap, as they do not have many inherent differences besides the networks that host them. Launched in September 2020, PancakeSwap offers permissionless access to the exchange of any BEP20 tokens, or tokens created on BSC. Users can trade, contribute to liquidity pools, and farm LP tokens to get the maximum advantage for providing liquidity to specific trading pairs, gaining additional asset rewards.
CAKE is the utility token of PancakeSwap, with the ability to stake it to earn more CAKE directly, or stake it in PancakeSwap SYRUP liquidity pools. When you stake CAKE in a SYRUP pool you earn SYRUP tokens, which can then be staked for additional rewards, creating a self-rewarding system for users. PancakeSwap offers low fees, fast transaction finality, no KYC, and was audited by Certik, one of the most prestigious auditing firms in the space, making it one of the ideal exchanges for trading BEP20 tokens.
PancakeSwap trading fees, which are usually significantly less than $1, pale in comparison to the fees on Ethereum-based counterparts, spurring many new projects to launch their tokens as BEP20 tokens instead of the traditionally used ERC20 token standard. PancakeSwap charges fees as low as 0.2% per trade, with 0.17% of the fee going to liquidity providers and the other 0.03% burned to lower the overall token supply over time. The team is entirely anonymous, but has gained the trust of many within the BSC and general blockchain community by providing a superior service to what is currently offered on other AMM-based DEXs.
0x Protocol - Multi-chain Liquidity Endpoint and DEX
0x is a hybrid decentralized exchange model. The 0x website describes the project as “the liquidity endpoint for DeFi on Ethereum, BSC, and Polygon.”
From a high level, 0x is a collection of smart contracts deployed on these three blockchains, which specify the order format and trade execution process. In simple terms, the protocol tells you what these smart contracts know and how to execute a trade using them.
On-chain order books are costly and slow, so 0x relies on a relayer model. In 0x’s lexicon, the Relayer is a process that hosts order books in a centralized database and matches orders between two traders. There are a number of Relayers to choose from— Radar Relay, Paradex, DDEX, and more. In effect, these are the apps built atop the 0x protocol.
Let’s understand 0x architecture with an example. Bob creates an order using a Relayer GUI, which then goes to the relayer’s order book (centralized database). A relayer can share this with other Relayers so that more traders can see the order.
Now, Alice wants to accept Bob’s order. She executes the order using the Relayer’s GUI. Then, the relayer matches the request and sends it to a 0x smart contract to complete the order.
While creating/executing these orders, Bob and Alice allow 0x smart contracts to deduct the funds from their respective wallets. 0x smart contracts now verify the order and complete the token transfer on-chain.
Matcha by 0x is described as "the global search engine for liquidity and markets that enables users to trade tokens at the best price through a world class interface."
The 0x protocol created the ZRX token, which is used to pay trading fees. So if you are using 0x Relayer, you need some ZRX tokens to make or take an order. The Relayer also collects some part of the fee to host order books.
The 0x protocol is one of the most widely-used decentralized exchange protocols in the industry today. Third-party projects can build atop the 0x protocol, meaning that a number of different DEXs and Relayers can all exist while sharing the same protocol and liquidity pool. This is a huge benefit to 0x.
While 0X has expanded beyond its initial sole focus on Ethereum, it is not compatible with Bitcoin protocol or the protocols of other blockchains, like EOS, Monero, Stellar, Cardano, NEO, or Tezos. This limits the utility of the 0x protocol and clearly prevents it from becoming an industry-wide solution.
IDEX - Layer 2 Multi-Chain DEX
Like the 0x protocol, IDEX originally only supported Ethereum ecosystem tokens. Now, however, IDEX is expanding support to new protocols. Binance Smart Chain is now supported as well, with Polkadot and others to follow.
The IDEX token is used as a bridge to each blockchain, enabling stakers to secure IDEX’s Layer 2 solution on all networks. In return, stakers earn 50% of the trading fees on all IDEX products.
To use IDEX, you need to deposit funds, but unlike centralized exchanges, smart contracts control funds (rather than one or several individuals). It makes IDEX more secure in comparison to centralized exchanges but it is far from being fully decentralized.
IDEX uses the blockchain as a settlement layer, yet everything is first updated on a centralized database before being written onto the blockchain. Smart contacts control real funds, but the IDEX database controls how these funds are distributed.
This architecture helps IDEX to provide better UX, and that’s why IDEX has comparatively high liquidity. However, pushing every trade on the blockchain is costly, and having a centralized database creates a risk of censorship while also jeopardizing user privacy.
At the same time, the IDEX model eradicates the security problems of centralized fund storage, so it’s more secure than a CEX. They also have a utility token, called IDEX, which is used to secure the network on which IDEX runs.
IDEX started enforcing user registration and KYC on the platform from August 2019. While the protocol itself is still somewhat decentralized, this creates a counterparty risk and raises questions about the future of the platform.
Loopring - Layer 2 Scaling Protocol for Ethereum
Loopring is not exactly a decentralized exchange. Rather, similar to the 0x project, it’s a modular protocol for building DEXs on multiple blockchains. The Loopring website simply calls it “the protocol for decentralized token exchange.”
Using a wallet interface (Metamask, for example) integrated with Loopring, you can create orders and sign them with your private key, which allows the Loopring protocol to withdraw funds at the time of trade execution. In other words, funds aren’t withdrawn until the order is matched, thus you have control of funds even after placing an order.
Relayers host order-books and look for orders to share with other relayers to pool liquidity. Loopring provides a consortium blockchain to enable liquidity sharing but it’s at each relayer’s discretion to use this blockchain, or whether to even share liquidity with other relayers at all.
Loopring enables something called the UniDirectional Order Model, which can match 16 trades at a time, in comparison to single buy/sell order matching like most other exchanges. Loopring calls it “order-ring.” These order-rings get processed by ring-miners through a resource-intensive process called ring-mining. The Loopring protocol incentivizes ring-miners and relayers for network participation.
When orders are matched, ring-miners sign the orders and send them to the Loopring protocol for settle transaction settlement. Loopring protocol smart contracts also verify different aspects of this order-ring and settle trades on-chain.
Loopring is currently available only for the Ethereum ecosystem, though it can also be implemented on any public blockchain with smart contract support. While this seems like a feature, it can also be a drawback, as it may result in users having to pay a number of gas fees in a number of different currencies just to complete a single trade.
This isn’t a flaw with the Loopring protocol as much as it is one of the limitations of smart contract platforms in general but, regardless of where the fault lies, it makes Loopring and other smart contract based DEX protocols somewhat inconvenient and costly. Loopring, like many other DEX protocols, is also limited to the Ethereum ecosystem, at the time of writing.
Kyber Protocol - ERC-20 DEX
The Kyber Network website describes the project as an “on-chain liquidity protocol that aggregates liquidity from a wide range of reserves, powering instant and secure token exchange in any decentralized application.”
The Kyber protocol is a set of smart contracts that provide a decentralized method for performing on-chain token swaps. It doesn’t have order book functionality, so it is technically not an exchange (even if it’s possible to post limit orders). Rather, Kyber is a decentralized version of instant swap services like Shapeshift or Changelly.
In Kyber’s terminology, a reserve is simply someone who provides liquidity. By implementing the Reserve interface, the Reserve (liquidity provider) can register to the protocol’s smart contracts and offer its liquidity for takers (traders who accept existing trade offers) to buy.
For now, you need approval from Kyber team to become a Reserve, so it is not a permissionless system. In general, anything that is permissioned is not decentralized. If something is truly decentralized, then there is no authority to prevent people from using it.
The details on how Reserves determine the prices and manage their inventory is not dictated in the protocol and is entirely up to the Reserves themselves, as long as the implementation complies with the Reserve Interface. This can potentially lead to non-competitive markets.
Let’s understand Kyber with an example. Suppose you want DAI tokens in exchange for 1 Ether. First, the Kyber smart contract asks different reserves to get the best exchange price. Then, you’ll see the exchange rate and decide whether or not to go through with a swap. If you proceed, you will send 1 ETH to a Kyber smart contract. Once received, the reserve will do an on-chain exchange and your account will be credited with DAI.
But for Token A—>Token B swaps (where neither Token A nor Token B is Ether), Kyber uses Ether as a proxy token internally (TokenA →Ether→TokenB).
Kyber presents a unique DEX protocol. While Kyber has plans to enable P2P trading for different smart-contract blockchains in the future, it is currently limited to the Ethereum network and ERC tokens. Like other token exchanges, this severely limits the potential of the protocol.
Decred - Atomic Swap DEX
On July 31, 2019, Decred entered the decentralized crypto exchange space with the release of specifications for a DEX protocol. These specifications describe the project as "a system that enables trustless exchange of different types of blockchain assets via a familiar market-based API." The official Decred Twitter account stated that the “Decred DEX will be permissionless. It will be non-custodial, peer-to-peer using Atomic Swaps.”
DCRDEX (formally known as Decred DEX) is available for download as a desktop client and supports trading for Decred, Litecoin, and Bitcoin. Unlike other DEX applications, it's not yet available on mobile or web browser.
To Decred’s credit, their DEX protocol does appear to use rudimentary atomic swap technology. Nonetheless, using atomic swap technology means that Decred's protocol will be non-custodial, fully peer-to-peer, and asset-agnostic.
However, there is one obvious issues with the Decred protocol. The protocol only supports UTXO-based assets. Whereas most hybrid DEX protocols only support Ether and ERC tokens, limiting their capabilities, DCRDEX falls on the opposite side of the fence but runs into the same problem— only supporting UTXO coins excludes support for the Ethereum ecosystem, as well as a number of other prominent blockchain protocols and platforms.
Unlike most decentralized exchanges, Decred charges fees before users can place a trade on the platform. You have to make a deposit to your Decred wallet of at least 0.1001 DCR to cover the current registration fee plus network transaction fees. As of June 2021, that's the equivalent of more than $16.
AtomicDEX - World's Best Atomic Swap DEX
AtomicDEX is a third-generation decentralized crypto exchange, developed by the Komodo Platform team.
Komodo, the team that developed the AtomicDEX, is widely recognized as the industry leader in atomic swaps. An article published on Forbes magazine called Komodo “an atomic swap early adopter.” Binance Academy states that “the first peer to peer atomic swaps started to take place in 2014” and links to a discussion on an old NXT forum in which Komodo’s Lead Dev James ‘jl777’ Lee describes one of the very first atomic swap protocols.
In fact, Komodo’s atomic swap protocol idea is an extension of Tier Nolan’s atomic swap idea proposed in 2013. AtomicDEX is the third-generation of Komodo’s DEX technology. The first generation being the Multi-Gateway proxy token DEX, built on NXT, and the second generation being BarterDEX, an early atomic swap DEX that is now retired in favor of AtomicDEX.
Today, AtomicDEX uses a state-of-the-art networking layer known as Market maker 2.0. Market Maker 2.0 allows AtomicDEX to provide non-custodial, secure, and fully peer to peer network for trading digital assets. It also enables cross-chain and cross-platform atomic swap protocol that executes swaps on-chain, even when facilitating swaps between assets of two different protocols. Traders can swap from ETH or ERC tokens to BTC or other UTXO-based assets.
AtomicDEX also offers an open API, to which any existing exchange, wallet provider, or blockchain project can integrate. It is an open source and permissionless protocol that offers a shared liquidity pool to create a network effect and maximize benefits for each adopter. Read more about AtomicDEX API here and check out the AtomicDEX documentation to learn more.
While all of the projects outlined in this article are making meaningful contributions to decentralized crypto exchange technology, Komodo is leading the space. AtomicDEX boasts cutting-edge atomic swap technology that overcomes all of the major problems with trading digital assets.
As this analysis has shown, most DEXs are focused exclusively on the Ethereum ecosystem and only allow swaps between ERC tokens. The few DEX protocols that are not exclusive to the Ethereum ecosystem are still limited. Many of them rely on smart contracts, which may introduce security vulnerabilities, force users to relinquish control of their funds, add costs to trading, and prevent direct peer-to-peer swaps.
There are also elements of centralization in nearly every DEX available in the space today. Some rely on a small number of centralized, project-controlled order matching nodes to broadcast buy and sell orders and match users. Others require registration, KYC documents, and/or payment of one-time registration fees.