Cryptocurrency

Custodial vs Non-Custodial Exchanges

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?

For those seeking a primer on Decentralized exchanges, read this excellent blog post by Iddo Bentov

The Cost of Decentralization in 0x and EtherDelta

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

The general design just described introduces several basic vulnerabilities:

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

While arguing about exchanges is fun, there are a ton of misconceptions about what matters in exchanges, and throwing out the word “Decentralized” seems to be the magic trump card for exchanges.

So why do we even want decentralized exchanges other than the opportunity to use the magic word “decentralized” which makes everything seem cooler. The article above summarizes it incredibly well:

Conclusion

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

I wrote on this topic in the context of the ability for centralized exchanges to steal your money.

How Crypto Exchanges Steal Your Money

Not Just Theft

But it’s not just theft, but custody. The biggest issues in centralized exchange can be summarized by a number of complaints that sound like this:

  1. MTGox exchange crashed and all my money was stolen
  2. Cryptsy exchange was hacked and all my money was stolen
  3. Kraken is down for maintenance and I cant make trades, even as XRP price goes down down down
  4. Coinbase has crashed, and I need to sell my Bitcoins as the value plummets
  5. I lost my password and I cant get in to Bittrex and their support team is taking weeks to get to my ticket
  6. 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).

Notice that this is not ONLY about hacking and stealing, but also other problems like support and security and getting locked out of accounts.

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.

Flash Boys: A Wall Street Revolt

So some of these problems are not solved by decentralizing.

What Really Matters

What really matters is not whether an exchange is centralized or decentralized. What matters is whether the exchange is custodial or non-custodial. What does that mean?

A custodial exchange is one where the exchange HOLDS YOUR MONEY. A non-custodial exchange DOES NOT HOLD YOUR MONEY.

Whether or not the exchange is centralized or decentralized is not material to this.

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.

  1. 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.
  2. 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.

I’m still at the relatively early stages of defining these terms so feel free to chime in and if you object to my classification schemes please let me know in the comments below.

Disclosure: I am a cofounder in the non-custodial exchange Evercoin.


Custodial vs Non-Custodial Exchanges was originally published in Evercoin on Medium, where people are continuing the conversation by highlighting and responding to this story.
Source link

Show More

Leave a Reply

Pin It on Pinterest

Share This

Share this post with your friends!