Part 1: Decentralized Exchanges Demystified

A simple guide to understanding decentralized cryptocurrency exchanges

Sarah Wiesner
Efficient Frontier
5 min readOct 29, 2018

--

When the word “decentralization” is used in the Bitcoin world, it is not always clear what it means, especially if it’s being used for marketing purposes. At the same time, many cryptocurrency exchanges (marketplaces for cryptocurrency) have sprung up lately using the promising title of “DEX” — short for Decentralized Exchange. In this post we’ll try to clarify the meaning and impact of decentralization as it applies to cryptocurrency exchanges, and in the next post we’ll provide a survey of the current state of self-titled Decentralized Exchanges and the technology they apply.

What is decentralization?

Decentralization means removing a central point of control from a system and replacing it with many points that have equal (or equivalent) control, without sacrificing the integrity of the system.

Whatever you think about real-world decentralization of governance, decentralization mediated by computer software and technology happens to go hand in hand with transparency. So you can easily argue that technological decentralization necessarily increases the integrity of a system — at least in theory.

Decentralization — removing the middleman — is what Bitcoin has done to money, Torrents have done to file sharing and Decentralized Exchange hopes to do to the world of trading. Grouping with Torrent and Bitcoins has a somewhat controversial connotation –- but as we will see, the technology is not quite as worrisome to regulators as it might sound — at least not today.

Three important aspects of an exchange are custody, infrastructure and order matching. To demystify decentralized exchanges we need to look at each of these aspects separately, under the lens of decentralization. So let’s get to the details!

What does it mean to decentralize custody?

In a completely centralized exchange like a stock exchange or one of the top cryptocurrency exchanges, the currency or stock is held in the custody of the exchange company until it is withdrawn or transferred out by its owner. In case of a hack, cryptocurrency exchanges, for the most part, are not insured and coins in the “physical” custody of a cryptocurrency exchange are still considered at real risk. Still, many users keep funds in exchanges as a matter of convenience.

The benefit of achieving decentralization in this case is very clear- thanks to blockchain based cryptocurrency features like multi-signatures, automatic “smart” contracts and schemes like atomic-swaps. All these different features achieve the same result: Instead of trusting your coins to the exchange, the coins can stay in your wallet until the moment they are swapped for the other asset or coin of your choice. This is clearly beneficial for users, who don’t need to worry about the exchange’s solvency (or autonomy) as well as for the exchange’s maintainers who are absolved of protecting what can be a huge stash of coins from hackers and thieves.

Decentralized VS centralized exchange infrastructure:

Most cryptocurrency exchanges today are centralized and are accessed through an internet site. The exchange software, data files and interface are stored on a regular, centrally controlled internet server and are accessed by the user’s internet browser. The exchange can be shut down, compromised or changed through one or two simple central controls.

In addition, centralized exchanges can endanger financial privacy. If personal information is shared or leaked from the central database it can hurt the users in a variety of ways. Another setback of centralized exchanges is that they may unexpectedly restrict access to users from around the globe.

A decentralizing option is to create an original application. The application is downloaded to the users computer (or phone) and runs the exchange’s software and interface independently – this way it can not be altered without the consent of the user, and is freely accessible at all times. Instead of users sending trade information to the site and receiving information about available trades, the information is shared democratically across a peer-to-peer decentralized network, which by definition can not be shut down.

Order Matching:

For every trade executed on an exchange, a seller needs to be matched with a buyer. This may sound simple, but in reality it is a challenging task even when building a centralized exchange. Creating automatic systems that store and match thousands of different time sensitive buy and sell offers for dozens of different assets or coins simultaneously, without missing a beat is challenging.

Hello, I’m an order book

The order book (an electronic list of buy and sell orders) is still the biggest challenge for decentralized exchanges: Creating order books on a blockchain triples the challenge, and achieving the same speed is impossible. Blockchains and peer-to-peer networks are structurally slow paced, and a blockchain has very limited storage capacity. And yet, this task must be done to complete the migration of an exchange to the decentralized world.

Though new and creative solutions are in the works, some of the most decentralized exchanges to date have simply used manual order matching instead of automated. In other words, the user needs to choose and manually execute the trade they’re interested in. This of course takes high speed trading out of the picture, but also gives exchange developers a break from the seemingly impossible task of creating reliable and uniform decentralized order matching. Actually, as you will discover in our next blog entry, many of the (semi-)decentralized exchanges operating today have opted for centrally operated order books and matching engines!

Just scratching the surface of this topic reveals that developing truly decentralized cryptocurrency exchanges is a complex and challenging mission. Yet it is important and beneficial to users and exchange operators, as well as to the entire Bitcoin and cryptocurrency ecosystem — as the long list of decentralized exchanges currently under development shows.

please stay tuned for the next post in this series.

--

--