A decentralized exchange allows for two counterparties to find each other and trade directly without relying on a third party. The majority of today’s cryptocurrency trading takes place on centralized exchanges where users offload custody of their assets in exchange for a premium trading experience. When a user places cryptocurrency on a centralized exchange, they are violating the core principles of what makes cryptocurrency so powerful; they are now reliant on a third party, they lose custody of their assets, and they are deanonymizing their identity. Decentralized exchanges are implementing Blockchain technology to empower users to trade cryptocurrency in alignment with its core principles, in a decentralized, trustless, peer to peer manner.
Decentralized Exchange Ecosystem
There are various implementations of decentralized exchange solutions. Most decentralized exchanges today are operating directly on the Ethereum Blockchain, implementing smart contracts to facilitate the operations of a centralized exchange. As new technologies develop, new decentralized exchange structures are emerging, providing innovative solutions to match those who want to sell a specific asset (makers) with those who want to buy a specific asset (takers).
Etherdelta is a traditional decentralized exchange utilizing smart contracts that are responsible for managing deposits, trading, and withdrawals across the exchange. Etherdelta operates a hybrid model, hosting an off-chain order book and settling transactions on-chain. Orders are placed by makers who send their orders, accompanied with the signature of their private key, off-chain to the Etherdelta server. Takers then trade against the order book and send their order along with the maker’s signature to Etherdeltas smart contract. The smart contract then settles the transaction on the Blockchain (see figure 1). Etherdelta can function entirely on-chain, hosting the order book inside smart contracts. On-chain order books introduce cost and performance issues, gas would be required to submit orders to the order book and order execution would be reliant on block conformations and congestion of the Ethereum network.
Other decentralized exchange solutions worth mentioning are the 0x protocol and Atomic Swaps. The 0x protocol builds on top of the Etherdelta’s smart contract approach by creating a formalized open source protocol for order broadcasting and matching. This allows anyone to create their own decentralized exchange, tapping into a global liquidity network provided by the 0x protocol. Atomic Swaps allow for decentralized exchanges to be built using a technology called “Hashed Time Locked Contracts.” HTLCs require the recipient of a payment to acknowledge receiving payment prior to a deadline by generating a cryptographic proof of payment. Atomic Swaps allow for cross chain trading, unlike existing smart contract solutions, which in their current state can only exchange ERC-20 tokens.
There will not be a “winner take all” technology when it comes to decentralized exchanges. Development of various technologies will help grow a diverse decentralized exchange ecosystem.
Decentralized exchanges could face regulatory backlash, especially those who host order books off-chain. Hosting order books off-chain does introduce centralization, however, decentralized exchanges never take custody of assets; instead, they organize and match messages between two counterparties. If US regulatory agencies decide decentralized exchanges are subject to KYC/AML laws, or are required to become registered alternative trading services or broker dealers, it is unlikely that decentralized exchanges will comply, as they are non jurisdictional entities operating on the blockchain. These new regulations may drive adoption towards decentralized exchanges because the current centralized exchange ecosystem will have to become compliant with these regulations, or face regulators showing up at their door.
The decentralized exchange ecosystem today can be compared to the early Bitcoin exchange ecosystem in 2013–2014, a group of small exchanges with low levels of liquidity. Etherdelta currently has ten million dollars worth of Ethereum in its smart contract . IDEX, the most liquid decentralized exchange, does $2.5 million in daily volume. This is dwarfed by the largest altcoin exchange, Binance, which does one billion dollars in daily volume.
For decentralized exchanges to gain mainstream adoption, major players need to provide liquidity to the market. One sign that this transition may be underway is Coinbase’s acquisition of Paradex, a decentralized exchange built on top of 0x in May of 2018 .
Unfortunately, most cryptocurrency users will learn the importance of decentralized exchange technology after they have suffered the loss of funds due to theft or embezzlement. Over the next 5–10 years, the centralized and decentralized exchange ecosystems will develop independently of one another. As the regulatory environment around cryptocurrency becomes more clear, fear of regulatory uncertainty pertaining to centralized exchanges and the tokens listed on them will drive liquidity to decentralized exchange solutions. This will allow individuals to trade cryptocurrencies in alignment of their core principles in a decentralized, trustless, peer to peer manner.
Figure 1: Image from Understanding Decentralized Exchanges, Dominiek Ter Heide
Figure 2: Etherdelta Smart Contract
Figure 3: Coinbase acquisition of Paradex