Will Warren, cofounder of decentralized exchange protocol 0x, was working on building tokenized derivatives for Ethereum when he and his cofounder realized there would be no place to trade them. They ended up pivoting to create a decentralized exchange protocol, 0x, that enables companies to use that infrastructure to direct fulfill trade orders without worrying about a Mt. Gox- or Bitfinex-type hacking situation, as users would still retain control of their funds. In this conversation, he talks about the problems with centralized exchanges and how decentralized exchanges can overcome some of their own obstacles including liquidity and problems with front running. He also gives answers to some of the criticisms of the 0x project, including why it needs its own token (ZRX) and what the token’s purpose is.


Laura Shin:
Hi everyone. Welcome to Unchained, the podcast where we hear from innovators pioneers and thought leaders in the world of blockchain and cryptocurrency. I’m your host Laura Shin an independent journalist covering all things Crypto. Since you’re listening to Unchained, it seems that you at least like the podcast, if not love it. If you have positive feelings whatsoever for Unchained. Have you made a declaration of your love on Apple podcasts? If not, go there and give us a top rating or review. Also, declare your love on Facebook, Twitter Slack, Telegram and wherever you discuss crypto. And don’t forget to follow me on Twitter @LauraShin.

This episode is brought to you by Start Engine, an ICO platform focused on issuing securities, tokens in compliance with SEC rules. Start Engine can help your business launch a regulated ICO. Go to Start Engine.com/unchained for a 20% discount. Start Engine does not provide legal advice.

Unchained is sponsored by Preciate. Founded by Ed Stevens, Preciate is building the most valuable relationships on earth. Each episode, Preciate is recognizing an individual or group for their achievements in the crypto space. Give good and get good. Who in crypto it will be recognized today for their achievements? Stay tuned to find out.

Today’s guest is Will Warren, founder and CEO of decentralized exchange protocol 0x. Welcome Will.

Will Warren:
Thanks Laura. Happy to be here.

Laura Shin: 01:20
So I wanted to have you on the podcast because I think everyone believes decentralised exchanges, or DEX will be a big theme in 2018. But before I get to that topic, I wanted to hear your history first. What were you doing before you got into crypto and how did you get into the space?

Will Warren: 01:36
Yeah so I was originally on like a research track and I was planning to either go into research in academia or industry, specifically in the field of engineering. I initially heard of Bitcoin, back in 2011 and thought it was really interesting technology. The use cases were not really there yet. It was mostly being used for Silk Road and stuff like that. But, I continued to follow it. My wife Linda Xie who was my girlfriend at the time, ended up joining Coinbase in 2013 and naturally just you know got more and more interested through Linda. And then eventually when Ethereum came out later, I basically lost interest in everything else. And, at the time, I was a Ph.D. student at UC San Diego, studying engineering and I decided to drop out just to focus on building on Ethereum fulltime.

Laura Shin: 02:45
And how did you come up with the idea to do a decentralized exchange protocol?

Will Warren: 02:52
When I dropped out of grad school I was initially working on tokenized derivatives on the Ethereum blockchain. And the idea was that cryptocurrencies are extremely volatile and it makes them not very useful for quite a few different use cases where you need a stable store of value. And the idea was that creating a standard for tokenized derivatives, people would be able to hedge against that volatility. That was the idea I was working on. I spent around six months. I kind of like fleshed out the whole system built it out. I wrote up like a technical spec and then I met my co-founder Amir Bandeali and we were thinking about, “Alright, how are we going to bring this product to market.” And we realized that tokenized derivatives just aren’t very useful if there’s nowhere to exchange them. I just kind of assumed that someone would have built a decentralized exchange on the Ethereum blockchain by then. It seemed like low hanging fruit. But, that wasn’t the case. So this was back in October of 2016. This was back before EitherDelta was around. So EitherDelta was like the very first decentralized exchange that people started using on the Ethereum blockchain. I think we kind of assumed that this infrastructure for exchange would exist and it didn’t. So we just decided, “Well, I guess we’ll just go build this ourselves.”

Laura Shin: 04:36
Define what a decentralized exchange is and tell us what problems you’re trying to solve or the problems that you think centralized exchanges have?

Will Warren: 04:49
So the most obvious issue with centralized exchanges versus decentralized exchanges is that centralized exchanges are responsible for custody of all of their users digital assets. When you’re using a centralized exchange you’re actually giving them full control over your cryptcurrency. And in the brief history of cryptocurrency existing at all, there’s been numerous examples of these centralized exchanges getting hacked for hundreds of millions of dollars. And, that’s going to continue to happen. Every six months or so we’re just going to find another centralized cryptocurrency exchange that’s hacked. And the reason why is because when you pool many thousands of people’s cryptocurrency in a single location, it just creates this enormous honeypot, this enormous financial incentive to hack that custodian by any means necessary. With a decentralized exchange, everyone that’s participating in the exchange or on this trading, they retain possession of their cryptocurrency at all times. And, when a trade occurs, it occurs in a peer to peer fashion where the assets that are being exchanged are moved between the two parties trustlessly and without any third party having to have access to their funds.

Laura Shin: 06:19
One thing here obviously is that people, they’re good at losing things at least I know I am. So while having a honey pot for hackers is not something that we should be doing. I think also people might worry about losing their own private key so are there any special mechanisms that are built in so that people don’t end up easily losing them?

Will Warren: 06:43
No. That’s a great point and I think that’s probably one of the biggest hurdles for adoption of this technology and not even decentralised exchange but just the adoption of cryptocurrency generally. Is that having good like private key hygiene is challenging. There’s a learning curve involved and if you mess up, you lose your money permanently. It’s gone forever and that’s pretty scary. But, I think that’s an issue that will probably require education and then better wallets. Better private key management solutions. It’s definitely more convenient to have your money just parked in a centralised exchange and ideally their security is really good and you don’t have to worry about it. But, I think history has proven that you should be very worried if your cryptocurrency is in someone else’s possession.

Laura Shin: 07:48
We’ve so far described what a decentralized exchange and we’ve talked about the problems that centralized exchanges have. But you are actually building not a decentralized exchange itself but a decentralized exchange protocol. So what is 0x?

Will Warren: 08:01
Going back to where we left off. I met Amir and we decided that someone needed to build out this decentralized exchange infrastructure. No one had done it and our original plan was just to build our own for profit decentralized exchange. So it was something that we owned it was proprietary. We would charge trading fees on every single trade that went through our system. And so we started working on it and as we spent more time in the Ethereum community and met with more projects in the space. We met with Augur and Gnosis and Maker, Melonport, all these different Ethereum projects that are kind of targeting different use cases. We realize that all of them required exchange functionality and they were all just planning to build out their own kind of one off implementations for exchange. And they all had kind of different approaches. So there was this mounting body of evidence that all of these different projects would require exchange functionality and you know it wasn’t something where our kind of for profit decentralized exchange can service all of their needs. So eventually it was just kind of overwhelming body of evidence that what we really needed to build was a piece of public infrastructure that anyone could plug into and use. That wouldn’t extract any rent or anything like that. So it would have to be free to use. It would have to be truly public infrastructure. And so that was kind of how we decided to transition from building our own for profit decentralized exchange and shift towards re-purposing our system for public use.

Laura Shin: 09:56
Is that why instead of being for instance a Dapp or a decentralized app on top of Ethereum, that it’s its own protocol?

Will Warren: 10:13
Yeah, by having 0x serve as an open protocol that anyone can plug into, anyone can kind of create their own for profit decentralized exchange on top of that. It opens up this single piece of infrastructure to a whole wide variety of different use cases. And instead of having a bunch of different projects kind of duplicating efforts, building their own kind of one off implementations. They can all just kind of use this solution that’s ready to go. But I think more importantly, like the benefit of having an open protocol that every single Dapp is plugged into rather than having each one of them build their own proprietary solution. Is that, if everyone creates their own solution, it will fragment liquidity across, like a patchwork of these different application specific decentralized exchanges. And that will decrease the liquidity for everyone. So it’s like a worse outcome for everyone, versus if all of these different Dapps kind of plug into the same decentralized exchange protocol or layer. It creates a global liquidity pool. It creates these network effects around liquidity and it’s a much more efficient solution.

Laura Shin: 11:34
But one thing is that the 0x protocol is only used to exchange Ethereum ERC 20 tokens right? So that liquidity only comes from that one pool. Is that correct? Like you can’t take tokens that are built on other platforms.

Will Warren: 11:51
Yes. That’s a good question. So the 0x protocol itself, yes. It is only designed to allow for the exchange of Ethereum based assets. So two thoughts on this. First I think that with cross-chain solutions like Polkadot and Cosmos and a variety of others I’ve heard about like Block Collider. You’ll be able to move your bitcoin from the Bitcoin blockchain onto the Ethereum blockchain or anywhere else you would like to move it. I think in the next few years, what we’ll see is that the native currencies of all these different blockchains will eventually be able to be represented as Ethereum tokens that exist on the Ethereum blockchain and that you can trade using 0x protocol.

Laura Shin: 12:47
How interesting. When people ask about it being interoperable is that the same thing. Or is that a different concept?

Will Warren: 13:04
Yes. I think interoperability can mean quite a few different things but I think one of the things that interoperability means is being able to bridge assets, bridge blockchains and move assets across those bridges. So actually, a really really interesting example that I think is worth checking out. Recently, the Truebit team has been making a lot of progress in bridging the Dogecoin chain and Ethereum blockchain and what’s really interesting is this might be one of the first examples where you can move the native cryptocurrency of the Doge blockchain over on to the Ethereum blockchain and just represent it as an Ethereum token.

Laura Shin: 13:04
Like an ERC 20 token?

Will Warren: 13:51
Yeah exactly. And it’s all trustless and I think it’s like a pretty interesting example of what’s to come in the next few years.

Laura Shin: 14:03
Doesn’t Cosmos do a similar thing to that or that’s what they’re intending to do?

Will Warren: 14:08
Yeah, so Cosmos will also allow for bridging different blockchains or they call them peg zones and I think they’re pretty close to having a working product as well. Which is pretty exciting.

Laura Shin: 14:21
Okay let’s talk about relayers on 0x. What is a relayer? How does one work?

Will Warren: 14:30
Okay. 0x protocol in its simplest form, allows any two people in the world to trustlessly exchange in a peer to peer fashion directly. So I can basically generate this 0x order. Which specifies the trade I would like to enter into. The assets that are being exchanged. The exchange rate. The time at which I’m no longer willing to honor that trade. And I can take this packet of data and cryptographically signed it and I can send that to my counterparty and this packet of data it’s just data. So I can send it to my counterparty through e-mail or through some sort of messaging app. Or, I could write it down on a piece of paper and mail it to them. All that really matters is that the cryptographic signature that indicates I’m willing to enter into that trade, that must be authentic. And, my counterparty just has to take this piece of data and inject it into the 0x smartcontracts. And, the smartcontracts will then move the tokens between me and my counterparty at the exchange rate that was specified. And assuming that order is authentic. So that’s how 0x protocol can be used in its most simple and most manual form. But typically, people do these large OTC deals directly with the counterparty. But typically, people want to go to an exchange. So a location where many different buyers and sellers are kind of aggregating their liquidity. And it makes it very easy to find a counterparty that is offering the asset you are interested in at a reasonable price.

So that’s where relayers come in to use your 0x protocol. So relayers are basically just any entity that decides to aggregate these cryptographically signed 0x orders and present them to the world in the form of an order book. And since the 0x orders are really just chunks of data that are cryptographically signed. If I want to operate a Relayer, all I have to really do is host a database and when people send me these orders, I store them in the database and organize according to price. And according to trading pair, etc. and then I served them to anyone that kind of comes to my website looking for a counterparty. And so at the end of the day, a relayer really is just a decentralized exchange that looks and feels like a centralized one. But since they’re not responsible for custody of assets, They’re not responsible for trade execution, they’re really aren’t an exchange, they’re really just relaying these messages back and forth between different people. So that’s why we call them relayers.

Laura Shin: 17:45
If a relayer gets hacked. Is there any negative outcome at all? Like obviously the user funds aren’t at risk. So is there any negative impact?

Will Warren: 17:54
No. So the hacker would simply be able to trade with the people that want to trade.

Laura Shin: 18:04
We’re going to keep discussing relayers and other issues around decentralized exchanges. But first I’d like to take a quick break for both of our sponsors. Now, a word from our sponsor, Preciate. Founded by Ed Stevens, Preciate is building the most valuable relationships on earth. Each episode, Preciate is recognizing an individual or group for their achievements in the crypto space. Give good and get good.
Today, we are recognizing the efforts of all the developers who contributed to Bitcoin 0.16.0, the 16th major release of bitcoin core. 0.16.0 added segwit features to the command line set and wallet user interface and supports native segwit addresses. According to the release notes, 251 developers contributed, including Samuel Dobson, Evan Klitzke, Gregory Sanders, Werner Lemberg, and Thomas Snider. Way to go, team!
If you know someone in crypto who should be recognized on a future episode of Unchained, go to preciate.org/recognize.

Laura Shin: 19:02
Interested in raising capital through a regulated ICO? StartEngine is your one-stop solution. StartEngine, an ICO platform with 140,000+ investors, was founded in 2014 by Howard Marks, co-founder of Activision/Blizzard. StartEngine’s mission is to help entrepreneurs raise the capital they need to succeed. Since the implementation of the JOBS ACT in 2016, StartEngine has helped over 150 companies raise capital.
The emergence of cryptocurrency presents an opportunity for entrepreneurs. In 2017, ICOs generated four-billion-dollars-worth of capital. The team at StartEngine leverages its experience and expertise in crowdsale and securities regulation to launch SEC-compliant ICOs. In fact, StartEngine can help a company to build its own tokens, and is creating a secondary market upon which those tokens can be traded. In short, StartEngine provides a complete token ecosystem. If your company wants to launch a regulated ICO just go to StartEngine.com/Unchained for a free consultation and a 20% discount on future ICO setup services. StartEngine does not provide legal advice.

Laura Shin: 20:05
I’m speaking with Will Warren the founder and CEO of decentralized exchange protocol 0x. To continue our conversation about relayers, I wanted to ask, if I become a customer of one relayer, then are the other sites of my trades. Are all of those people, customers of the same relayer? Or can relayers kind of interact with trades on other relayers or elsewhere in the protocol?

Will Warren: 20:35
Typically you’ll be trading with other people that are also using that same relayer as you. But, since 0x is an open protocol and all these different relayers are plugged into the same piece of infrastructure, it does allow for things like liquidity sharing and it allows for relayers to balance orders across different, other relayers as well. So it is feasible that you might end up filling an order on one relayer’s order book that originated on a different relayer.

Laura Shin: 21:17
Let’s say that I want to exchange a non top 10 token for another non top 10 token. if I wanted to get the most for my money then wouldn’t it be better for me to try to trade it for something like bitcoin or ether rather than some other less popular token? I just wonder how high that demand will be to trade some of these less popular tokens for other less popular tokens?

Will Warren: 21:44
I think that the trading pairs that we’ll see a lot of volume will be denominated in the most liquid assets. So things like ether or once bitcoin is tokenized on the Ethereum blockchain. You might see trading pairs where bitcoin is the denominating token or things like US dollar tokens. Once those are a thing, you’ll be trading these less liquid tokens against US dollar token or the bitcoin token. What I think is going to end up happening is rather than having a bunch of different relayer competing for market share of the same trading pairs. What I think we’re going to see is that there’s consolidation in the relayer market. And one or two relayers will end up dominating a specific market niche. But, what I think is going to happen and we’re already seeing it right now is that the number of tokens on the Ethereum blockchain is going to trend towards infinity. There’s just going to be an enormous number of tokens and diversity of tokens that exist on the Ethereum blockchain. So rather than having a relayer that offers millions of different trading pairs for your users. What I think is going to happen is that relayers are going to carve out a specific market niche and they will attempt to dominate the market share for that market.

Laura Shin: 23:30
Describe what you mean by market niche? What are some examples?

Will Warren: 23:38
For things like ERC E20 tokens today we’re seeing, there’s like a few thousand ERC 20 tokens that exist just from token sales. But, I think we’ll start seeing much more interesting kind of classes of ERC 20 tokens in the near future. So things like prediction markets, Augur, Gnosis, and even in prediction markets, there’s just a number of different verticals that people will be wanting to trade on the outcomes of different types of events. So like sports, sports betting, weather, science, politics all these things will be represented as prediction markets that have Ethereum tokens used to trade them. Recently, we’ve been seeing an explosion in this new class of Ethereum tokens that are called non fungible tokens. So you ERC 721 is the token standard that’s used to represent these things. And non fungible tokens are one of a kind collectible items and CryptoKitties is the first example that got a lot of interest in this class of tokens. But, I think we’re going to see an explosion in different Ethereum based video games and other sorts of digital collectible items that people are interested in buying and selling in the very near future, probably in 2018. I think we’re just going to see millions and millions of different types of assets that people are interested in exchanging. And each one of these kind of niche markets is going to have a relayer that is creating or tailoring their products to that specific use case and that kind of demographic of users.

Laura Shin: 25:30
I just wonder will users want to only exchange their collectible tokens for other collectibles. Or would we ever want to see someone with maybe a real estate token wanting to trade it for a security token. Or will someone with a security token want to trade it for a collectible. I would just wonder, might we see demand for relayers that have a bigger marketplace that doesn’t specialize?

Will Warren: 25:58
I think so yeah. I mean there will probably be both. If I had to guess the way that the relayer market might play out. There might be this one massive relayer that tries to serve a bunch of different marketsthere. And their relayer might look something like Reddit. Where you can go to Reddit. There’s an infinite number of people that kind of build their communities there. All sorts of different niche subreddits that you can subscribe to. And so, when you go to Reddit you find the different communities that you are interested in being a part of and you subscribe to them. And I think it will be similar with tokens and maybe a relayer that offers trading of those tokens. Where you go to this relayer. You kind of identify the different types of tokens you’re interested in potentially trading and you subscribe to those markets. But, the user experience… with Reddit you can create a subreddit that for your community. But there’s a limits to how much you can tailor that subreddit to suit the needs of your or your community and user base. So while there may be a single relayer that is kind of like a Reddit. Where you can trade whatever you want, in the same way that there are communities that organize themselves off of Reddit because they can create a more tailored kind of user experience or a more tailored product for their community. I think we’ll see the same thing with relayers. Where there’s just highly specialized relayers that allow their users to trade very niche types of assets like tokenized derivatives is one area where I think you really need a completely different user interface and different types of data that your users can look through in order to trade those markets.

Laura Shin: 28:02
A lot of people when they talk about decentralized exchanges wonder how they will overcome the liquidity issue. Which is a sort of chicken and egg type problem in which sellers may not want to go use such an exchange if there isn’t enough demand. And buyers may not think to sell them if there aren’t enough sellers. How would you solve this problem or how do you think this problem could be solved?

Will Warren: 28:26
Yeah so I think there’s quite a few strong incentives for people to use a decentralized exchange over a centralized one and it’s just these reasons alone, the fact that you don’t have to worry about the centralized exchange getting hacked and losing all of your crypto assets. I think those are some reasons why there will be a natural desire for people to use decentralized exchanges. It’s just a completely different product. But as far as how we kind of build liquidity in the ecosystem compared to where we are now, there’s not very much liquidity. I think, looking at the volume numbers for 0x protocol today there is $500,000 or a million dollars of trading volume each day. I think it’s early. I think there’s a lot of infrastructure that needs to be built out in order for market makers to come in and provide that liquidity to markets. And that just takes time. And there’s also education that needs to be done. But I think, probably the biggest bottleneck longer term for liquidity to come to these decentralized exchanges is scalability. Blockchains are designed to be highly redundant, censorship resistant networks that are hard to bring down and that does not necessarily translate into high throughput, low latency. The good news is that I think that today we’re in the dial up internet stages of blockchain. In 10 years from now, blockchains will probably look completely different than they do today. And being able to support thousands or hundreds of thousands of trades per second will be much more feasible. Whereas today, on the Ethereum blockchain we can support you know maybe 15 trades per second. It’s one of those things where it’s going to take time and we probably can’t cut corners or anything like that. We want to do it right.

Laura Shin: 30:59
And in a way, it sounds like your ability to scale actually really depends on Ethereum’s ability to scale. Not necessarily even your own effort.

Will Warren: 31:08
Yeah very much so. So today that’s true because 0x protocol is tied into the Ethereum blockchain. In the future, 0x protocol is going to be blockchain agnostic. So you can use this same exact message format and the same exact settlement logic but you can swap out whichever blockchain you want to use as your backend so to say. But it’s definitely a ways out. We could theoretically port 0x protocol over to some other chains today if we wanted to other EVM blockchains. But, if there aren’t tokens there, if there isn’t a healthy token ecosystem on a different blockchain, then there really is no reason for 0x to be ported to that blockchain.

Laura Shin: 32:02
Is there some sort of block time that you need to have the decentralized exchange protocol work? Because for instance, it doesn’t seem like it would work with 10 minute block times on the Bitcoin blockchain.

Will Warren: 32:24
Taking the fact that the Bitcoin blockchain is a UTXO blockchain. It can’t support rich state or tokens really. That would make it not really possible to have 0x function on the Bitcoin blockchain. Theoretically though if it could support those things, I can see people still using 0x protocol for big OTC trades. Where it’s directly peer to peer. Because then the block time doesn’t really matter as much. But if you want to have a decent user experience, where they can kind of pick an order off a publicly accessible order book and just kind of have the tokens they just purchased show up in their wallet a few seconds later, yeah I think block time does matter. What is like the ideal number? I don’t really know. I don’t know I’ll have an answer to that. Right now it’s a little clunky. So if you purchase some Ethereum tokens using 0x today, the block time on Ethereum is 15 seconds roughly. So it might be like 30 seconds before your tokens show up in your wallet. But again, I think we are in the dial up internet days of blockchain and these things are going to get better along a variety of different dimensions including block time.

Laura Shin: 33:43
You’ve written about how front-running can be a problem in a decentralized exchange environment. What is front-running and how will that happen in a decentralized exchange? And what solutions do you propose to prevent it?

Will Warren: 33:57
Front-running is an issue that isn’t specific to decentralized exchange. I think it’s something that people associate with decentralized exchange a lot today because it is one of the use cases that people are actually able to use right now. Front-running just generally, the way that blockchains typically work is that you create a transaction. You sign that transaction and you broadcast it to the peer to peer network. And that transaction isn’t necessarily mined. It’s never minded into a block immediately. What has to happen is it has to propagate through the network and before it is actually mined into a block, the transaction sits in what’s typically called like a pending transaction pool. So it’s just a big pool of different transactions that are waiting to be mined into a block but haven’t been yet. And all of the transactions that are sitting in this pending transaction pool are transparent. So you can look at all of them. You know exactly what all of them are going to do. And some of these transactions are going to for example buy up some tokens on a decentralized exchange. If you can see that that’s going to happen, that’s a piece of information that you can use to your advantage if you’re a trader. You can essentially know when a group of people are going to purchase a bunch of these tokens. So you can go in and kind of rebroadcast a similar transaction or the same transaction but set a higher gas price so that your trade will get minded into a block before the original person’s trade will get minded into a block. So that’s not very good. That means that smart people that are watching the pending transaction pool and can see what trades are about to happen and kind of jump in in front of them. And again this isn’t something that is specific to decentralized exchange. There’s a variety of different applications where seeing what other people are going to do before they do it, can give you an advantage. Like auctions and just a variety of different things.

Will Warren: 36:30
For 0x there’s a variety of ways that you can prevent front-running and make it not feasible. I guess maybe this would be a good time to discuss the different ways that relayers can function. So, the first way that a relayer can facilitate exchange and host an order book is called the “Open order book” model. This was the model that was presented in our white paper back in February of 2017. And in the open order book model, anyone can generate one of these cryptographically signed orders and post it up on a relayer’s order book. And, the relayer’s order book is like a post-it board. Anyone can look at the different orders that are up there. And, anyone can grab one of them and take it off the order book and inject it into the 0x smartcontracts. And this model is subject to front-running because the way that the orders are specified, anyone can fill the order. So, if someone sees that you are attempting to fill this order they see that your transaction is sitting in the pending transaction pool. They can just take that same exact order and attempt to fill it by setting a higher gas prices and jumping in front of you.

Will Warren: 37:56
The second way that a 0x relayer can operate a decentralized exchange is using something that we call the matching model. And the way the matching model works is every single order that is sent to the relayer. That ends up on the order book, specifies that relayer as the only entity that’s able to fill that order. So what happens is when this relayer gets orders on opposite sides of the market. The same exchange rate or an overlapping exchange rate. They take these two different orders. They package them together and inject them into the 0x smartcontracts and fill them synchronously and atomically in a single transaction. And in effect, this relayer is not only aggregating liquidity but they’re also taking on the responsibility of trade execution. So no one else can jump in front of an order sitting in the pending transaction pool. Only the relayer is able to execute these trades.

Will Warren: 39:14
And there’s also a variety of other ways that 0x protocol can be used. It’s a really modular and extensible system. And there’s some interesting ideas that we’re thinking about that combines the openness of the open order book model with the strong guarantees around trade execution that you get with the matching model. I don’t want to go too deep into it here because we could go super deep on it’s pretty technical subject. But, I have a blog post I just published recently called. “Front-running, Griefing and the Perils of Virtual Settlement” that really goes through the issues from first principals and then gets into some really interesting solutions that we’re exploring for the future.

Laura Shin: 40:06
One thing I wanted to point out was in your example, I think this applies only to the open order book model. But another issue would be if a miner wanted to do that then they wouldn’t even have to pay the fee to front-run. For them, it’s a no cost move. One other thing I want to ask about the model that’s just within the relayer. Does that mean that if the relayer only fills their orders in their own books that front-running can’t happen at all?

Will Warren: 40:43
Right, that’s correct. So with the order matching model, front-running cannot happen at all. Miners can’t front-run, other traders can’t front-run. But the relayer that is doing the matching, they could front-run. They have full control over the trade execution process. So there’s some degree of trust there. Generally, these are entities that are running for profit business. They have a reputation to uphold. So front-running would be a pretty bad idea for them if they wanted to continue to operate their business. But it is feasible that they could do that.

Laura Shin: 41:27
I actually want to switch over now to discussing some regulatory issues. How would a decentralized exchange deal with regulatory issues? For instance, what if there was a decentralized exchange that was selling, for instance, an unregistered security and the SEC wanted to stop that from happening. Would they be able to do that?

Will Warren: 41:50
I think it depends on a few different things. So relayers, these are people that are incorporating and running for profit businesses. And, I think there’s a lot of gray area when it comes to regulations in this space right now. But, the pioneers, the relayers that are creating businesses now. I think they’re pretty cognizant of that fact. They have good legal counsel and they’re doing their best to make sure they’re operating in a legally compliant way. But, I think there are ways that 0x protocol could be used to trade all sorts of different Ethereum assets that would be pretty hard to prevent. If I wanted to enter into a trade with someone else privately and do this private over-the-counter trade I don’t really think that there is anything to prevent that at the moment. But there’s these other projects that are looking at things like KYC and AML for being able to access securities tokens. So these would be registered securities on the Ethereum blockchain. Like Harbor and Polymaths are looking at things like that and that would be a layer underneath 0x protocol that would prevent people from accessing unregistered or would prevent people from accessing securities tokens if they hadn’t gone through a KYC/AML process.

Laura Shin: 43:38
KYC/AML stands for knowing your customer an anti money laundering processes. So it sounds like relayers can institute KYC and AML processes is that what you were saying earlier?

Will Warren: 43:55
Yeah absolutely. Whether or not they can. Whether or not they need to. Or, if it’s necessary, I don’t know. I’m not sure. It’s something we’re still figuring out.

Laura Shin: 44:04
I didn’t understand what you were saying about the Harbor and Polymath. I don’t know what they’re doing but is that something that’s different from the possibility of a relayer implementing KYC and AML processes?

Will Warren: 44:21
Yeah, Harbor and Polymath are creating a new token standard. These are separate projects so they have somewhat separate approaches but they’re basically taking the ERC20 token and they’re adding a white list of Ethereum addresses to that token and that white list contains Ethereum addresses that corresponds to people that have gone through an off chain KYC/AML process and only people that have gone through that process are actually even able to receive the token or hold the token. So if I have gone through KYC/AML. I own the security that is represented as a token on the Ethereum blockchain and I try and transfer that token to someone that has not gone through KYC/AML, that transaction will fail. And I would still have the token. And this is a layer underneath 0x protocol where if I own a security token and I try and exchange that token with someone else or whatever or ether, that trade would fail if my counterparty had not gone through that KYC/AML process. It’s kind of cool that these are completely separate projects and they’re tackling this problem in a different layer in the stack.

Laura Shin: 45:53
To go back also to a little bit more like a law enforcement type things. I also wanted to ask, if something goes wrong on a centralized exchange, it’s completely clear that that exchange is liable. But what if there were some incident that occurs on a decentralized exchange, then how does that work? In the case where EtherDelta got hacked. Was there someone that you could point to as saying look they messed up or any other example where something might go wrong with a decentralized exchange. Who would be considered liable?

Will Warren: 46:27
So that’s a tough question. I think it really depends on what was to go wrong. I don’t think there are very many things that could go wrong. That would be a systemic risk to everyone. I think with EtherDelta… so EtherDelta is a for profit decentralized exchange. They are running their own proprietary system of smart contracts. And I believe their DNS got hacked. So someone got access to their EtherDelta.com DNS. And the way that EtherDelta works is they allowed people to create an EtherDelta specific wallet in their browser. So generate a new private key and send their digital currency to that private key. And so when someone took over their DNS, it allowed the attacker to ask people to do some you know basically, send their private key to the hacker and some people did that and lost money. I think generally that was a really poor way of doing private key management. You shouldn’t be generating a private key on a specific website. And the way that the private key… it was bad private key hygiene. Ideally, you’ll be using something like a ledger hardware wallet to trade on the decentralized exchange. And your private keys is very far removed from anyone on the internet and every single action that you take that requires access to the private keys has to go through your ledger and you can examine exactly what’s going to happen in that transaction. So I think, EtherDelta the way they got attacked was a very unique attack. But I think generally, it’s going to be really hard for large catastrophic failures to occur for decentralized exchanges in the same way that they do occur frequently for centralized ones. Yeah there might be some people that get tricked into doing something with their private keys that causes them to lose money. But, I think that’s more of a new user experience or user interface type of issue that will be resolved.

Laura Shin: 49:08
Let’s talk about the ZRX token. What is the purpose of the ZRX token?

Will Warren: 49:15
This seems to be one of the questions that we get a lot of confusion around. But it’s pretty simple. So 0x is a governance token. The 0x protocol system of smart contracts is a pipeline of contracts on the Ethereum blockchain. These 0x orders enter one end of that pipeline and token balances are modified at the other end of the pipeline. And, the pipeline is broken into segments. So individual smart contracts that are responsible for different parts of the trade execution or trade settlement process and the ZRX token is used as a governance token that allows us to upgrade or swap out different sections of that smart contract pipeline without bringing all of the markets to a halt and without requiring us to deploy this brand new pipeline and migrate you know tens of thousands or whatever number of users over to this brand new pipeline. So we can just upgrade our current pipeline over time without making it a super disruptive process.

Laura Shin: 50:34
So how will these upgrades work? Will I vote with the token or how does that work?

Will Warren: 50:43
So today the governance process is not defined. We have a placeholder governance model that is just kind of a multisig with a speed bump that prevents us from doing anything malicious. But, that placeholder will eventually be replaced with some sort of decentralized governance system that uses the ZRX token as the primary lever over which these upgrades are either approved or denied. I think decentralized governance is one of the most challenging issues in both the blockchain space and in the real world. Creating a governance system that is functional but also robust and resilient to attack is really challenging and we did not want to jump into anything too quickly and potentially put our entire project at risk. Even if the system that we’ve designed is the perfect system for trades and for a decentralized exchange, the entire project could fail if we were to implement a mediocre decentralized governance system early on…before we were ready.

Laura Shin: 52:06
I do know that also the token will be used to pay relayer fees. Is that correct?

Will Warren: 52:15
So the reasoning behind this was that… this is actually a controversial point. Some people do not like the fact that we chose to have the ZRX token used to pay trading fees. It can feel kind of arbitrary. Like why wouldn’t I just pay with ether? It can be kind of annoying as you’re getting set up using trades. I want to go trade right now, but I have to go purchase some of these ZRX tokens. But, we spent a lot of time thinking about this early on and I think our rationale for having the ZRX token used for paying trading fees is a valid one and logical one. And the reasoning is that the primary purpose for the ZRX token is for governance. For upgrading this pipeline of smartcontracts without bringing all of the markets to a halt. But, who do we want to be holding on to these tokens? Who do we want to be driving the governance process forward? And if the only purpose for the token was strictly governance, the people that would be holding onto this token would be the relayers. So the different groups of people that have built for profit businesses on top of 0x protocol. And that would be OK. But, that’s only half of the ecosystem. So half of the ecosystem are these people that are building relayers and facilitating trades. The other half, are the people that are using these relayers. So the end users of the protocol. And if the only people that are driving the governance process and the evolution of the protocol over time are these for profit businesses, their incentives do not necessarily align with their end users. And what we’ve seen in the past is that if the governance system is favoring one group of people over another group. And the imbalance is too strong, the entire system will generally will rip itself apart. So we thought about this quite a while. We looked at the different ways that we could potentially ensure that there is a broader participation in governance and eventually decided that OK if you want to access 0x protocol’s functionality. You want to be able to access a relayer’s order book, you should be required to have a small amount of ZRX tokens in your possession. And this is a way to push the distribution over a wider body of people that are in the ecosystem.

Laura Shin: 55:00
But what if relayer set their fees to zero and then just choose to make money on the spread instead? Then will users really have an incentive to hold a lot of ZRX tokens?

Will Warren: 55:10
So this is an issue that we encountered recently with one of the relayers. First of all, we’re really close with all the different teams building relayers or at least we’re in contact with them. And, a large part of our job at this point is providing technical guidance, technical support and working with them to make sure that they’re successful. And one of the relayers that’s using the matching model basically found that it is more expensive for them to operate a matching relayer if they take ZRX in fees rather than taking a spread. And the reason for that is because, when we initially design the 0x protocol, the design was tailored towards the open order book model not the matching model. And so there’s some inefficiencies in the current design that make it more expensive for matching relayers. So in version 2 of the protocol, we’re going to eliminate these inefficiencies. And, at that point whether or not these relayers will take ZRX in fees or continue to take a spread. There won’t be any economic reason or rationale for taking a spread rather than taking ZRX. We’ll see what happens. I think that some of these relayers are really just focused on how do I build a business right now that is going to sustain itself and be healthy long term? How do I acquire new users and get the feedback loop going? But I think, once we make more progress in putting a decentralized governance process in place, I think at that point, it’ll hit home with a lot of these projects that, “OK well, eventually it isn’t just going to be Will and Amir and the 0x team that are driving governance in 0x protocol. I’m actually going to have to participate more formally and get involved.” And I think at that point, it might be easier for some of these projects to really understand the necessity of decentralised governance and the ZRX token.

Laura Shin: 57:43
All right, we will see. We’re running out of time but how many relayers do you have on 0x protocol now?

Will Warren: 57:51
Yeah. So were in contact with upwards of 12 different teams at this point.

Laura Shin: 57:57
Okay great. So I guess we’ll see how this continues to grow in the future. It’s been great having you as a guest. Where can people get in touch with you or see your work?

Will Warren: 58:05
I would recommend people follow us on Twitter @0xproject. Or, check out our website 0xproject.com We’re also pretty active in our chat messaging group on rocketjet.

Laura Shin: 58:22
Well thanks for coming on the show.

Will Warren: 58:22
Thank you very much Laura.

Laura Shin: 58:25
Thanks so much for joining us today. To learn more about Will, check out the show notes inside you podcast episode. Also, be sure to follow me on Twitter @Laurashin. New episodes of Unchained come out every single Tuesday. If you haven’t already, rate, review and subscribe on Apple podcasts. If you like this episode, share it with your friends on Facebook, Twitter or LinkedIn. Unchained is produced by me Laura Shin, with help from senior advisor Elaine Zelby and Fractal Recording. Thanks for listening.