Clearing up confusion about exchanges
I’ve written about decentralization before.
Decentralization is a magic word in cryptocurrencies. People look to Bitcoin for inspiration with all things crypto and the mining dynamic is part of decentralization. But what’s really the problem with exchanges and what’s the solution?
This piece summarizes very well the problems created by decentralization, which I quote below in case you don’t want to read the whole thing. But do go and read it it’s excellent.
General flaws in decentralized exchanges
Exposure to arbitrage: The lack of automatic matching permits in-market arbitrage, whereby stale orders are filled to the disadvantage of users unable to quickly cancel their orders in response to market fluctuations. For example, the arbitrageur can execute against a standing pair of orders (sell 1 TOK at 1 ETH and buy 1 TOK at 2 ETH) to make an immediate profit of 1 ETH. Since the only way for users to invalidate their signed orders (that they published on the off-chain service) is by sending an on-chain cancellation transaction that is explicitly processed by the exchange contract, the arbitrageur may pay a high gas fee to miners and win the race against the cancellation transaction. Therefore, users who wish to increase the probability of a successful cancellation may need to attach an excessively high fee that depends on the value of the trade, which makes the exchange platform unattractive to honest users. We show below that this problem isn’t theoretical, but already arises in practice.
Vulnerability to miner frontrunning: Order cancellations are a common feature of decentralized exchanges (after all, an exchange with no cancellation ability may not be useful in a volatile market), and their on-chain nature renders these cancellations particularly vulnerable to miner frontrunning; the miner of the next block will always have the option to execute cancelled orders with themselves as the counterparty, potentially profiting from such an order. To add injury to insult, the miner even collects gas costs from a user’s failed cancellation. This issue was noted in the Consensys 0x report, and is recognized as a limitation of on-chain cancellations in the community.
Exposure to exchange abuses: Since the off-chain matching service doesn’t perform automatic matching, it is supposed to publish all users’ orders as quickly as possible, resulting in principle in fully transparent behavior. In actual fact, though, the exchange can suppress orders, mounting a denial-of-service attack against users in order to corner a market or censor particular users’ transactions. Worse yet, it can front-run orders. Specifically, it can engage in the same kind of in-market “sandwich” arbitrage described above, especially when high-value trades are requested. The problem is that signed orders flow to the off-chain server first. The server can thus match the trade data with pseudonymous users that it controls. Both suppression and front-running by an exchange are extremely hard to detect.
Centralized vs Decentralized
Centralized exchanges have serious drawbacks, perhaps most notably exposure of users’ funds to theft. But the wave of creation of decentralized exchanges that place users’ funds in their control does not fully protect users’ funds, and introduces new problems. It is tempting to dismiss the problems we’ve observed in EtherDelta as trivial, but we believe they will grow as decentralized exchanges do. What we’re seeing today is just a harbinger of problems to come should decentralized exchanges sweep over the cryptocurrency landscape. But since the problems that we’ve identified are exacerbated when higher value trades take place, we conjecture that such problems will ultimately limit the popularity of decentralized exchanges.
The Biggest Issue: Custody
Not Just Theft
- MTGox exchange crashed and all my money was stolen
- Cryptsy exchange was hacked and all my money was stolen
- Kraken is down for maintenance and I cant make trades, even as XRP price goes down down down
- Coinbase has crashed, and I need to sell my Bitcoins as the value plummets
- I lost my password and I cant get in to Bittrex and their support team is taking weeks to get to my ticket
- Poloniex is asking for complicated photographs of me with my passport and a handwritten note and then rejecting submitted pictures
Ok, so all of these complaints are based on real things that happened, some of them to me (I did not lose in either the MTGox or Cryptsy exchange hacks).
Problems Hard To Solve by Decentralization
My cofounder at Evercoin created Hazelcast, which is in use by most of the large high-frequency/low-latency trading shops in the world and used by the Apple Online Store for New Product Introductions.
One thing that gets interesting is the “Flash Boys” mindset, which is the world of High Frequency Trading or HFT. In this mindset, the practitioners know that light travels about a foot every nanosecond. So in order to get a material about of trading edge, the Flash Boys put their terminals as close to the exchange as possible. This makes rental prices for offices near exchanges like NASDAQ extremely expensive.
So some of these problems are not solved by decentralizing.
What Really Matters
So here’s some examples of some exchanges and where they fit in the scheme of custodial vs noncustodial. There are other important dimensions such as order book or on chain transaction resolution that impact user experience and speeds and fees.
Decentralization Use Cases
There are two use cases served by decentralization that are not served by non-custodial centralized exchanges.
- Truly Decentralized exchanges cannot be shut down by the Government. Truly decentralized systems are exceedingly hard to shut down by anyone. When I say “truly decentralized” I don’t mean “like Napster” which was successfully shut down by a series of legal actions. Or even like Kazaa which was another peer to peer file sharing service which was centralized, but incorporated in a pacific island. I think of these as centralized, but legally evasive companies. The kind of radically decentralized entity includes services like BitTorrent which is essentially a protocol based community. If it’s important to you that your exchange cannot be shut down by a government, please consider decentralized exchanges.
- Ownership: one of the ways in which an exchange can be (but isn’t neccesarily) decentralizes is ownership. So distributing ownership of the exchange and therefore a share of the profits from the exchange to exchange token holders might be a good mechanism to create loyal users of an exchange.
Disclosure: I am a cofounder in the non-custodial exchange Evercoin.