Epicenter - Learn about Crypto, Blockchain, Ethereum, Bitcoin and Distributed Technologies - Amir Bandeali & Will Warren: 0x Protocol and the Decentralized Exchange Frontier

Episode Date: February 16, 2018

Decentralized exchanges have been a holy grail in the cryptocurrency space, since at least the MtGox hack. They promise to derisk the act of exchanging cryptocurrency by leaving custody of funds in th...e hands of the users. And they should be resistant to regulatory pressure, creating a permissionless way to trade cryptocurrencies. Among decentralized exchange projects, 0x has gained by far the most traction in the short time since launching. Co-founders Will and Amir joined us to discuss the 0x protocol, the emerging 0x economy and the vibrant community they’ve built. Topics covered in this episode: How Will and Amir started 0x The definition of a decentralized exchange and why decentralized custody is key The 0x architecture Why 0x built a protocol and not just a decentralized exchange The role and business model of relayers The 0x token and its economy The 0x governance process Episode links: 0x: The Protocol for Trading Tokens 0x Whitepaper Front-running, Griefing and the Perils of Virtual Settlement (Part 1) Front-running, Griefing and the Perils of Virtual Settlement (Part 2) This episode is hosted by Brian Fabian Crain and Meher Roy. Show notes and listening options: epicenter.tv/222

Transcript
Discussion (0)
Starting point is 00:00:00 This is Epicenter, Episode 22 with guests Will Warren and Amir Bandiali. Hello and welcome to Epicenter, the show which talks about the technologies, projects, and startups driving decentralization in the global blockchain revolution. My name is Brian Fabian Crane. And I'm Meher Roy. Today we are going to talk on the topic of decentralized exchange with Will Warren and Amir Bandiali, who are the co-founders of the Zero-X project. The 0X project had a very successful token sale last year and followed that successful sale
Starting point is 00:01:09 with daily good releases on their technology and development of their community. Will and Amir, welcome to the show. Thanks for having us. Pleasure to be here. Yeah, thank you. Very excited. So I should actually also make a disclaimer right now because I did participate in this token sale. So I am not unbiased.
Starting point is 00:01:32 All right. So with that disclaimer, let's get into your background, Will. Tell us how you ended up starting this project. Yeah, absolutely. So I initially became interested in Bitcoin around 2011. I was in the investment club at UC San Diego. I wasn't, you know, my background's not in kind of investing or anything like that. I was studying engineering. and I think I came across an article about Bitcoin on Hacker News or something like that. I thought it was interesting technology.
Starting point is 00:02:10 There weren't really any use cases for Bitcoin at the time, except like Silk Road, but I thought it was really interesting technology and kept an eye on it. My wife, then girlfriend, also thought Bitcoin was really interesting. and once Coinbase kind of legitimized the technology and the use cases by partnering with Overstock, she left, you know, New York, she was doing finance in New York, she left to join Coinbase pretty early on. And when she joined Coinbase, you know, I kind of became much more interested in cryptocurrency and was, you know, keeping up with it much more closely. But I was kind of on a research track.
Starting point is 00:03:00 I was doing, you know, I was kind of planning to do research for my career, either in academia or in industry. I was, I was in grad school studying engineering. But when Ethereum came out, it struck me as like the most important invention since the internet. and I really quickly lost interest in everything else and basically decided to drop out of grad school to focus on Ethereum full-time.
Starting point is 00:03:34 And so what I was focusing on, this was back in June of 2016, what I was focusing on back then was creating essentially a standard for tokenized derivatives and the rationale for that was that, you know, cryptocurrencies are extremely volatile assets. And it makes it makes cryptocurrencies not that useful for quite a few different use cases. And I felt like, you know, derivatives would provide the ability to hedge against this volatility.
Starting point is 00:04:11 And that felt like an important thing to work on. So kind of got pretty far along building. out that project and that's about the time I met Amir in San Francisco. And so we were, Amir and I were focused on kind of, you know, how do we take this technology and bring it to market? And what we realized is that tokenized derivatives are not very useful if there's nowhere to exchange them. And so this, you know, Amir and I met and we started working.
Starting point is 00:04:48 together formally in October of 2016. Back then, you know, Ether Delta wasn't a thing. There were no decentralized exchanges that people were using at the time. You know, so we basically decided, okay, you know, if no one else is going to build this infrastructure, no one's going to, you know, if no one else is going to work on this, then, you know, someone needs to do it, so it might as well be us. So I just want to kind of ask here. So you said when you discovered Ethereum, So you knew about Bitcoin, right? You were kind of following Bitcoin, but then when you discovered Ethereum or when Ethereum came about, you felt like, oh, that was the most important thing since the Internet.
Starting point is 00:05:27 Like, why that reaction to Ethereum? Yeah. I think it's because, you know, I've been following Bitcoin for a long time. You know, the technology, a completely open and globally accessible ledger for payments is really compelling. But, you know, this, I think this. This was around like, you know, late 2015, early 2016. You know, Bitcoin was chugging along. It was doing fine, doing payments.
Starting point is 00:06:00 But there was also a lot of, like, infighting in the community. And, you know, it seemed like not much innovation was occurring. People were talking about layer two solutions and stuff like that. But, you know, at the end of day, it's really just a network for payments, which is incredibly valuable. But, you know, Ethereum held the promise for, you know, basically, you know, an infinite number of different use cases. And it just, you know, it felt like something completely different.
Starting point is 00:06:33 Yeah, so a little bit about my background too. So I have a background in trading. I was a trader for about five years, first at a company called Chopper Trading in Chicago, and then later DRW. Got into Bitcoin, I think it was 2014, right around the first run-up. And initially it was mostly from the trading angle,
Starting point is 00:07:02 just watching these crazy price moves. But I started learning more and more about the technology, became a pretty big believer in Bitcoin. And then learned about Ethereum in early 20s. 2016, started getting more into the technical aspects of things, and ended up meeting Will through a mutual friend. And I knew he had just recently dropped out to work on this derivatives project and decided to join Will in San Francisco to work on that. Sorry, Amir, when I look at your LinkedIn profile, the thing that stands out and jumps out is, like, your educational background is not in computer science, it's finance, and then you work for five years as a trader. Yet you are the chief technical officer of zero X.
Starting point is 00:08:00 Tell us, like, did you go through a phase where you transitioned, like, you changed your field, from like traditional finance to cryptocurrency, but did you have to spend a lot of time to build a completely new skill set in order to do this? So it wasn't completely new to me. I was minoring in computer science in college. Also, you know, I ended up not completing the minor because I just got a job and graduated a year early. But yeah, I've been kind of coding along the way, did some like data analysis and stuff like that
Starting point is 00:08:36 when I was trading. But yeah, I had to definitely build it up over the years. I think in the crypto space, there are very few experts, at least back then. So when I started learning about it, it was kind of on a more even playing field
Starting point is 00:08:54 with everyone else. And I've just been, you know, really deeply diving into the tech since then. So super interesting. Perhaps you can start with, discussing decentralized exchanges in general. Tell us what is a decentralized exchange? Yeah, so I think first of all,
Starting point is 00:09:16 before we discuss what is a decentralized exchange, it's probably first important to discuss what is a centralized exchange and what exactly are the implications of having an exchange that is centralized and trades cryptocurrencies. So a centralized exchange is, you know, in some ways,
Starting point is 00:09:34 the back-end infrastructure or at least a blockchain infrastructure for a centralized exchange is a massive, you know, hot wallet and cold wallet. So, you know, all the people that are trading on this centralized exchange are depositing their valuable digital assets. They're basically handing it off to this team that's operating the centralized exchange. and all of this money is being, all of this cryptocurrency is being pooled in one central location. You know, oftentimes hundreds of millions or billions of dollars just sitting in one address. And on top of, you know, on top of that kind of blockchain infrastructure is, you know, some infrastructure for exchange. So when you deposit, when you give your money to this centralized exchange, they can,
Starting point is 00:10:29 credit you with some virtual cryptocurrency that exists on a database that they maintain and that they own, and they kind of allow you to exchange those virtual units of value with other people that are also plugged into their centralized database. And so, you know, in the brief history of cryptocurrency existing at all, you know, there's just been numerous examples of centralized exchanges getting hacked and losing hundreds of millions of dollars or billions of dollars. And it just happens consistently every six months or more frequently even. And so, you know, now getting back to the question of what is a decentralized exchange? You know, so a decentralized exchange, you know, first of all, it's decentralized in the sense that custody of the cryptocurrency or the or the digital
Starting point is 00:11:25 assets remains in control of each kind of individual, each peer in that network. So there's no large kind of honeypot where all the cryptocurrency is being pooled. And it's also, you know, a decentralized exchange is trustless. So, you know, there's a variety of different kind of architectures for how a decentralized exchange can be designed. But, you know, generally across the board, a good decentralized exchange allows you to remain in custody of your cryptocurrency and you do not have to trust anyone to, you know, not get hacked, not run off with your money and so forth. So the custody aspect is one, but you also think it's an essential part of the
Starting point is 00:12:11 decentralized exchange that you don't have to trust anybody that it's fair, you know, that I actually get kind of the best deal compared to other people. Yeah, so it sounds kind of like you're asking, like, is transparency around kind of price time priority, or is transparency around trade execution kind of a piece of that system? Yeah, transparency and fairness, right? So, so, I mean, one thing is, okay, I know nobody can steal my funds, but another thing is I know that there's no central party that can, for example, you know, match my orders suboptimally to their advantage or something like that. I would say that's like, I'd say that's, I mean, it's super important. I would say that that's probably secondary to catastrophic failure, right? So like, what's the first thing I want to work?
Starting point is 00:13:09 You know, what's the first problem I want to solve? Well, I don't want someone to, you know, steal all my money. I don't want catastrophic failure. You know, once that box is checked, it's like, okay, well, now that I'm not worried someone's going to steal all my money, you know, how do I insure? that when I am trading, I'm getting a decent deal. And I think that that's also, you know, it really depends on the architecture of the decentralized exchange.
Starting point is 00:13:34 And I think it's extremely important, obviously. So, yeah, I mean, I guess, you know, maybe, you know, are you saying is that kind of like a requirement for an exchange, a decentralized exchange to be considered trustless? Yeah, I think you kind of answered the question, right, in putting these in a, in order of priorities. So I think that makes perfect sense. I'm curious, did you guys, I guess you guys anticipated,
Starting point is 00:14:05 because we have seen this huge explosion of interest in decentralized exchanges over the last years. Did you guys foresee that this was gonna happen? And what do you think are the main reasons why this has occurred? I definitely did not foresee this explosion happening this quickly. I mean, it was all
Starting point is 00:14:25 always our thesis that this would happen and that there would be thousands, potentially millions of tokens on various blockchains. Why has it happened? I mean, it seems like institutions and just the general public has started to become aware of cryptocurrencies. I think most people recognize that the impact it will have is just massive. It's not a question of if it will have an impact. It's kind of a question of when it will have an impact.
Starting point is 00:15:00 So, yeah, there's mass speculation on that front right now. So if I scan across the decentralized exchange space, there's lots of different projects, right? So there's Ether Delta, which is probably the first that came online. There's Idex. there's air swap and of course there's zero x in addition to that there are these like there are theoretical proposals for cross-chain mechanisms like walk us through the different architectures
Starting point is 00:15:40 that are being pioneered by these projects and what does the design space of decentralized exchanges as a whole look like A lot of the decentralized exchanges that we're seeing today or that already exist are, they're kind of like for-profit operations that are owned by a small group of people that, you know, kind of set up this system that, you know, they bring people into and they can kind of extract rent. They can charge fees. So, yeah, back when Amir and I got together in October of 2016, you know, our original plan was, you know, let's create a for-profit decentralized exchange that we own and that, you know, all the fees that we charge,
Starting point is 00:16:35 we get to, you know, feed into our, you know, our corporation or whatever it might be. And, you know, we were working on it. But the longer, you know, the longer we were in the Ethereum community, And the more that we talked with various projects in the space, the more apparent it became that what the community and what the ecosystem really needs isn't a kind of walled garden. There's all of these different decentralized applications that require exchange functionality. So things like prediction markets, decentralized fund management platforms, like stable coins, and a variety of others as well. And, you know, so we would meet with the different projects that are building these things and discuss with them. And they all need exchange functionality.
Starting point is 00:17:31 And so, you know, what we kind of came to realize is that rather than having each one of these projects create their own. walled garden, their own kind of custom and proprietary smart contracts for exchange. You know, what there really needs to be is a public piece of infrastructure for decentralized exchange that any DAF can hook into that's completely free to use and that's, you know, you know, completely open and globally accessible. And so that was like, I think that was like a huge realization for us is that, you know, maybe instead of focusing on building something that, you know, we want and that will like make a, you know, allow us to kind of generate a revenue stream, maybe we just like build something that everyone can use
Starting point is 00:18:21 and that benefits everyone. And maybe, you know, we don't need to have a business model attached to it. So, you know, that's kind of, you know, I think it's important to like bring that up prior to jumping into like the different decentralized exchanges that exist and their architectures. I think it's important. One of the things that really makes Zero X unique is that it is a protocol. It's public infrastructure. Anyone can build their own for-profit business on top of it. Anyone can create a decentralized exchange and charge fees.
Starting point is 00:19:00 And I think that we'll see a big shift towards this model compared to, you know, things like Ether Delta were, you know, they're really, you know, when Ether Delta was the only game in town, it really wasn't much competition around fees and user experience. And yeah, I think we're starting to see that now, which is really a good thing for everyone. So you talked about this kind of shift to thinking of X more as this base layer infrastructure that, you know, wouldn't be owned by you guys. Was this also driven in part by this coming of ICOs and of basically funding through tokens and creating communities that, did that shape kind of you develop in that direction?
Starting point is 00:19:52 Actually, not really. So we were pretty much set that building an open protocol was the way for us to go around January of 2017. It just seemed like it would add the most value for the most people. But back then, like, that was way before the ICO craze had really taken off. You know, I think, like, the biggest token sale at that time was, like, Golem, and they raised, like, $8 million or something like that. I think, like, one of the things that the ICO praise kind of embraced is that projects, raise a bunch of money pre-product.
Starting point is 00:20:42 But that was like, you know, that was definitely not something we were interested in doing. So, you know, back in March of 2017, when we kind of decided that we wanted to build this open protocol, you know, we raised a small seed round. It was led by polychain capital. It was just enough money to cover our legal fees to hire a couple people. and enough to kind of get us to the point where we had a fully functional product that people could use. You know, in the following months, that's when we really saw the ICA craze start to gain, you know, kind of take off. And all being, you know, it was just insane.
Starting point is 00:21:25 But, yeah, I don't think that our decision to create an open protocol was at all driven by the kind of ridiculous. amounts of money flying around and the irrationality of speculators. Like that was, that's actually something that like we very, we very much want to distance ourselves from because I think that's like kind of a toxic culture and we don't want that. Yeah. I don't know. Does that answer your question?
Starting point is 00:21:53 Yeah, sure. I mean, I think you can, you can look at ICOs in several ways, right? As one, as, you know, having all these aspects you mentioned, but the other one, of course, also there's enormous power in building a community. and incentivizing people and all that. And to be honest, you know, when the zero-x, when you guys did your token sale, I actually put in money,
Starting point is 00:22:19 really, I didn't actually look very deeply at zero-x as a technology, but I really liked how you approach a token sale, which was also very novel and very different, and I felt there was a lot of issues in how token cells were happening at the time. So we had these crazy things like, for example, Brave, they did the bad token, right? So the idea is this is browser that hopefully, you know, billions of people will use. I guess that's their plan, right? And you have this token that can then be used to kind of pay for, you know,
Starting point is 00:22:53 have advertisement and pay for attention and stuff like that. But then they had their token sales sell out in three blocks, three Ethereum blocks, so about half a minute or a bit more. and there was some, I don't know, 100 people, or some tiny number of people basically bought the entire token zone. So you also have these perverse distributions and it's totally contrary to, I think,
Starting point is 00:23:19 the idea of a decentralized technology, where you have also control that's decentralized and it's owned by community, if in the end it's really a bunch of sort of, you know, oligarchs that control it. So I really like how you guys went in a very different direction with the token sale. And, you know, I felt that was great. Yeah, wide distribution was super important to us.
Starting point is 00:23:47 You know, ZeroX protocol is a platform. And it's nothing without people building on it. So we wanted there to be as many stakeholders as possible. And I think it's really worked out in our favor. I think that's a big part of the reason. and why there are so many people developing on ZeroX right now and why we have such a great community. Of course, the other nice part about tokens is,
Starting point is 00:24:13 as you mentioned, as Will mentioned, that ZeroX is not trying to be a central player that extracts rents out of each trade that is happening on using the technology essentially, right? So it is basically a set of smart contracts and protocols and ways to do things, ways to do exchanges that other parties can use in order to build their own systems. And at some level, we might argue that zero X is solving a public goods problem. right so a decentralized exchange a generalized protocol for decentralized exchange on Ethereum is valuable yet if there isn't a very obvious rent-seeking mechanism in
Starting point is 00:25:10 the in the protocol itself then who exactly would build it and from that perspective the ICO model at least the past year and this year seems to work well to bootstrap these projects. So that's sort of my opinion. Like that's, I think the strength of the ICO model that these people are willing to put money to fund public goods development without necessarily the expectation of like revenue flowing in to the token itself. But perhaps we are jumping a little ahead of ourselves. and should really talk about what 0x is. So Will, tell us what exactly is 0x in the nuts and bolts of it.
Starting point is 00:26:09 At its core, 0x protocol is a message format. So a way of kind of specifying your intent to enter into a trade. And you know, so you can think of this large chunk of data, that consists of different parameters such as the different tokens that you would like to exchange the exchange rate and of how long you're willing to honor that commitment to trade. You can specify whether or not you want to enter into a trade with a specific counterparty or you can leave your kind of order open to be filled by anyone. And so,
Starting point is 00:26:55 So the message format basically specifies how do you create an order and arrange that data into a packet so that everyone can interpret it and know exactly what it means. And the second component of ZeroX protocol is a system of smart contracts that exist on the Ethereum blockchain. this system of smart contracts is broken into a couple different modules. The first module is a smart contract that accepts these packets of cryptographically signed data, processes them, and allows trades to be settled on the blockchain. And, you know, that module is responsible. for authenticating cryptographic signatures,
Starting point is 00:27:59 making sure that both parties have the sufficient funds to actually settle that trade, ensuring that an order hasn't already been filled, or that, you know, it is expired. So it's kind of the core business logic for settling trades. The second module is a governance module, and the governance module allows the the
Starting point is 00:28:25 trade settlement module to be upgraded over time. I think it's kind of early right now. There aren't very many decentralized applications that have existed for very long. So, you know, I think a lot of people
Starting point is 00:28:42 the need to upgrade a system of smart contracts doesn't really hit home for many people. But I think it's extremely important that this system of smart contracts, that all of this infrastructure is being built around, and that all of these smart contracts and businesses are plugging into, can be upgraded without bringing all of the markets to a halt. And by reducing the friction associated with
Starting point is 00:29:12 migrating to a new version of that exchange logic over time. And just for an example, I think Ether Delta is probably the best example. It's, you know, Ether Delta is a decentralized exchange, kind of owned by one person. It's been operating for a while now, probably one of the longest. The DAPs has been around for the longest. And Ether Delta, you know, Ether Delta had to upgrade their smart contract four times. So there are, you know, there's Ether Delta versions 1 through 5. And I think that's, and that's not a knock on it.
Starting point is 00:29:52 I think, you know, that just tells you that, you know, it's important to upgrade smart contracts. The technology stack that we're building on top of is rapidly evolving. And there are, it's unavoidable that we're going to need to upgrade these smart contracts over time. It's new token standards come out, et cetera. But, you know, with Ether Delta, every single time. there was an upgrade. You know, it was one person that was making that decision. Everyone that was using the old smart contract would have to kind of withdraw their funds and then deposit into a brand new smart contract. If they were responsible, they would probably want to see a security
Starting point is 00:30:37 audit report of the new smart contract to make sure that it does what it's advertised to do. I think people just kind of accept that, you know, the person that created a contract was was not going to steal their money. But that's like a very disruptive process. And so the way that ZeroX protocol is designed, we have this logic for settling trades. We have this logic for upgrading the system over time as new token standards emerge, et cetera.
Starting point is 00:31:09 And it allows us to upgrade the system without requiring users to migrate, without making all of the markets stop functioning and you know I think ultimately like that'll be a model that we see much more frequently going forward and you mentioned governance before as one of the core modules and now we've been talking about upgrading so is governance the way to upgrade the system and both now and is that what you see the role in the future yeah I mean absolutely it's kind of crazy just the between when we did our token sale and now,
Starting point is 00:31:51 the crazy amount of developer interests that we've seen, I don't think Amir or I were really expecting, I think we thought we would have to really kind of go out and convince people to build on top of Zero X protocol, but we've kind of seen this explosion of interest in development activity. And it's really exciting, but it's also a lot of responsibility because at the end of the day, all of these people have kind of changed their career trajectories.
Starting point is 00:32:23 And now their, you know, their career is building this business on top of infrastructure that, you know, we're building. And that's, you know, if I were them, I would be kind of terrified if, you know, it was if we had 100% power to make all the decisions about how the protocol should change. You know, so I think one of the reasons why all of these different relays, these decentralized exchanges that are building on top of zero X, I think one of the reasons why they took that risk is because we've been very clear from the beginning that this is public infrastructure. It's owned by the public. And the people that are actually using the system, the people that are stakeholders,
Starting point is 00:33:13 they're the ones that are going to drive the governance process and make the technology evolve over time. Not Amir and I. That's too much responsibility for a small group of people. It needs to be the entire ecosystem that drives the governance. We could compare it to sort of Ethereum. So in Ethereum itself is being upgraded and there's this EIP process, Ethereum improvements process, which is basically a set of new standards and like potential commits that are discussed over GitHub.
Starting point is 00:33:58 And once the community, which probably is a quorum of people that are involved in Ethereum development, are comfortable with it, get included into the next. upgrade. How will a future 0x, how will this look different in the future for 0x? What changes from the way Ethereum improvements are done today? So right now the process is very similar to Ethereum, but in the future there will be some form of token voting, you know, where your vote is weighted on the amount of tokens you own. And I I think the reason this works better specifically for zero X than an Ethereum-like process kind of goes back to the reason we made zero X in the first place.
Starting point is 00:34:57 So the decentralized exchange ecosystem was very fragmented. There are all these different siloed exchanges. And it's more important that we have, you know, sort of a way of soft working on chain. using our governance to keep everyone on the same shared protocol. If we, you know, we're just like pushing out upgrades in a centralized way and people are like deciding to stay on the old version or whatever, you kind of just end up back to square one where you just have this fragmented decentralized exchange environment.
Starting point is 00:35:39 So on the topic of token voting, right, So essentially you have this 0x token. And the way we could imagine it is in the future, let's say you have right now, let's say it's version 0.8.0. And your team develops version 0.9.0. It might be some other team that develops that version as well. And there's a proposal to accept 4.9.0 as the canonical version of it. and we say that we're going to have a vote of all of these zero X token holders and provided a sufficient quorum and majorities reached,
Starting point is 00:36:22 then the upgrade will take place. My question with a mechanism like that is, does this process actually enable the best people to have their voice heard? So let's think of it like this. So you have Emin Gunsir's team at Cornell, right? Now, that team might have very talented PhD students, and these PhD students might be of the kind that can actually analyze a protocol upgrade
Starting point is 00:36:54 for its security, for its challenges. But if you know the American PhD student, you pretty much know that American PhDs don't get paid a lot in stipend, right? So you cannot expect people like constituents like this to actually hold a lot of zero X tokens. And therefore these people will not have a lot of voice in that governance process. Yet they might be the ideal people to actually vote in the process. How do you resolve this problem or do you even seek to resolve it?
Starting point is 00:37:35 Yeah. So I think you've identified that, you know, not just decentralized governance, but real world governance is an extremely challenging problem. You know, specifically to your point around are the right people govern, you know, are the right people driving the governance process? That is, yeah, that's absolutely something we're thinking about. So, yeah, just to provide a little background. Right now we're collaborating with the Aragon team.
Starting point is 00:38:11 And they're a really interesting project. They're creating a general tool set and framework for decentralized governance systems, kind of plug-in-play building blocks. And one of the things that we're collaborating with them on is research into this concept of liquid democracy. And the way liquid democracy works is that the people that that stakeholders in the ecosystem can delegate their voting power to someone that they deem, you know, capable to vote on their behalf. So, you know, this is, I don't want to like, I definitely don't want to claim that like liquid democracy. is the way and it's the best decentralized governance approach. But I think it's an interesting step from fully centralized towards more decentralized.
Starting point is 00:39:16 And it allows the people that, you know, have expertise and that are comfortable voicing their opinions to kind of have voting power within the system without necessarily having financial resources at their disposal. And yeah, I think that's one interesting approach that we're considering right now. Cool. Yeah, I mean, I agree. I think that's going to be one of the very exciting things about blockchain is because it will necessitate all this innovation around decentralized governance, decision-making. Of course, there are also very revolutionary things down the line, like using prediction markers and future key to do things like that. Maybe that will also work.
Starting point is 00:40:09 So we started talking about how zero-x works and what kind of the architecture looks like. So you talked about how people can basically send these messages, right, with orders, and then you have a set of smart contracts allows those traits to be executed and settled on a blockchain. But there's also in zero X, right, the whole, you know, different kind of ecosystem, participants that have roles in that. In particular, there's that role of a relayer. Can you explain what a relier is and what their function is in X X? Yeah.
Starting point is 00:40:46 So a relayer's job is essentially to host an order book and broadcast that order book to the public or in any way that they see fit. Since all of the orders in zero acts are stored off chain, this is a requirement in order for people to actually, you know, find counterparties to their trades. I think initially the first decentralized exchanges were largely using on-chain order books, which means that people are paying transaction fees whenever they even place an order and value is not necessarily being transferred. and this is just not sustainable in the long term. But yeah, by having an off-chain order book, you can drastically decrease the cost of trading, but you do need some mechanism to find a counterparty,
Starting point is 00:41:42 and that's kind of the relayer's job. And they earn fees for doing that. So what is the trust model between a pair of users wanting to exchange using 0x and a relay? So I might be the buyer of maker for ether. Brian might be the seller. And Will might be the relayer. What are the kinds of trust we are putting on will?
Starting point is 00:42:11 Just to preface this a little bit, there are various strategies relators could use with varying degrees of trust. I would say the most basic strategy would be just a more open order book model, kind of similar to EtherD delta. I'm broadcasting my order book to the public. Anyone can see an order and fill that through their own Ethereum node.
Starting point is 00:42:35 That's probably the most trustless model. You know, Relayer can't really do anything to steal money or anything like that. I think the worst they could probably do is hide orders, but I don't see why that would be in their best interest. There are other models that involve a little bit more trust. For example, the relayer can act as a central matching engine. And then obviously, you need to trust the relayer to actually match your orders. We kind of touched on this earlier, but all of these models are non-custodial.
Starting point is 00:43:13 And I think that is probably what matters most. But it's up to the end users to decide which relays they're comfortable using. Is there also a risk here that, let's say I as a minor, I see, you know, you're sending, well, can I game this somehow? Can I, like, front run it? Or I see, oh, there's this kind of order coming in and I'm going to interject my own and then kind of take an opposing position elsewhere and make an arbitrage or something like that? So it really depends on the way that the relayer is structured, the way that they're kind of operating. So, you know, one of the ways, I actually, I've been writing a blog series on front running specifically. And the different ways Zero X protocol can be A, the ways that it can be used and the ways those different,
Starting point is 00:44:21 approaches can be games or front run. And so generally speaking, if I create this zero X order and I allow it to be filled by anyone in the world, anyone that just happens to see it, that type of order is subject to front running. So, you know, someone, you know, maybe my counterparty sees my order. They want to take the other side of that and enter into a trade. They kind of inject that quarter into the Ethereum kind of pending transaction pool, a mempool, and that transaction will kind of sit there waiting to be mined into a block.
Starting point is 00:45:07 And so anyone that's watching the pending transaction pool can see what I am attempting to do, or can see that my counterparty is attempting to fill my order. And so, you know, anyone can kind of take that order, say, oh, actually, I'm going to fill this order, and they can set a higher gas price and, you know, they could front run my counterparty. And they would be my new counterparty. And, you know, what's interesting is that miners, they don't even have to think about gas prices. So miners can They can They can order trades
Starting point is 00:45:48 Or they can arrange transactions Into any order they want It can be completely arbitrary They can they can mine BINers can mine blocks with zero transactions in the block You know typically a rational miner will Prioritize transactions that pay the highest fee Per unit of gas
Starting point is 00:46:09 But But if a minor is attempting to front run sort of one of these open order books, they can do whatever they want. It's kind of like God mode for them. So that's not very good. You know, the good thing about Xerox protocol is that it's, you know, we don't define the way that people enter into a trade or the way that, you know, these orders are transported off chain. So there's a variety of different ways that zero X protocol can be used. So the first way that I just discussed is called the open order book strategy, and this is kind of like the EtherDalta approach.
Starting point is 00:46:50 A different approach is sort of this order matching strategy. So the relayer, which in this case we call the matcher, they only accept orders onto their order book if they are specified as the only party able to execute that trade. So what they do is they wait for two orders to show up on either side of the order book that are equivalent in price or overlapping in price. And then they kind of batch fill it. They kind of package those two orders together, inject them both into the zero X smart
Starting point is 00:47:27 contracts, and kind of batch fill them simultaneously. And so in that model, the matcher has full control over trade executions. So, you know, you can imagine that's, that can be a really good thing. It prevents front running from traders and miners. You know, no one is able to kind of see that batch of transactions sitting in the pending transaction pool and able to like kind of go and swoop in. Like it just doesn't work. They're locked out and miners can't, you know, minors can't do that either. But you can also imagine that maybe giving this matcher, kind of full control over the trade execution process. Maybe you don't want to give them that, that truck, you know, you don't want to give,
Starting point is 00:48:15 like, kind of, uh, give up that ability, that power. So there are, and there's a variety of other ways that zero X protocol can be used to kind of, you know,
Starting point is 00:48:25 it solves both of these problems at once. So I, instead of getting too deep into it, uh, right now, I would encourage people to go check out the blog post I wrote. It goes, it's real,
Starting point is 00:48:34 it goes real deep. Uh, it's called front. running griefing in the perils of virtual settlement. And there's part one and two that are out right now. Cool, that's super interesting. Thanks so much for expanding on this. Now, it's just something kind of came to mind here.
Starting point is 00:48:50 I mean, there's a lot of projects in the kind of adjacent blockchain space that are trying to create tools so that you can basically run code on a server that, you know, it's a central server, but that someone else, from outside can say, okay, this was done correctly and kind of tamper-proof and stuff. So Intel SGX is one example, but there are others. Wouldn't you be able to build basically some kind of like matching engine using something like Intel SGX that, you know, the I as a user can have a very high trust that this is fair, there's nothing funny going on, but at the same time, it can have all the benefits. of being a centralized entity on a server, it can be performant. And of course, also that way immune to the front running of the miner that you talked about.
Starting point is 00:49:47 I think there are directions that are worth exploring that, yeah, like, I think potentially there are ways that a matching engine could be designed to be trustless. So kind of like what you're saying, you know, perhaps instead of relying on a person to do trade, kind of do trade execution, according kind of whatever rules they said, instead let's all agree on what the rules are and kind of dump them into an Intel SGX type of system where, you know, we can all kind of publicly observe what's going on and we know that it's being done, you know, according to the rules we all agreed upon.
Starting point is 00:50:36 I do think that there are challenges around that that need to be explored further. So things like data availability. So like, you know, it's very easy if everyone agrees upon the current state of an order book and everyone agrees on the kind of time at which different orders are kind of coming in, you know, if we all agree about that data set and we all agree about the rules that we're kind of enforcing over trade execution in this Intel SGX type system, then yes, we can we can all, you know, say, okay, this trade execution system is performing exactly how we want it to. Everything is good. But, you know, I think the most challenging part there is ensuring that everyone
Starting point is 00:51:27 has the same kind of state of the order book and everyone is viewing these orders coming in at the same exact kind of cadence or in the same order. So that's kind of like the data availability problem. And I think that's a pretty challenging, it's a challenging problem to solve, but I absolutely believe that we can create interesting systems that work. It's just going to take some time and more people exploring them. And I think one of the challenges with these more theoretical approaches to solving front running is that a lot of them are not going to give the user experience that we want. You know, they're going to require like security deposits, long lockups, long withdrawal periods. And this really reduces the ability for other decentralized applications to like plug into the
Starting point is 00:52:26 system. And then the second point I wanted to make is that I think front running is actually one of the larger problems in the blockchain space in general. I think people view it in the context of decentralized exchange a lot because decentralized exchange is like one of the first use cases in production of smart contract-based blockchains. But yeah, I think we'll see more and more applications having these issues as they start going into production.
Starting point is 00:52:59 And I can see in the long run, the end solution, be something like zero knowledge mining where you can't actually tell, or you can't look at a transaction in the mempool and see all of its properties, but you could only prove that that transaction will pay the mine or X amount of fees or whatever. So one other aspect of this model of relays and users is the question of privacy, right? So today in the zero X model and in virtually all decentralized exchange models, when I'm making an order or I'm taking an order, the linkage between what asset is being traded, how much is being traded, and my address is visible on the blockchain, right?
Starting point is 00:53:59 this address traded this in this much quantity for this much price. Do you see a lot of innovation coming from your side or in the ecosystem around obfuscating this linkage? And what are the interesting approaches and projects here? Yes, I think privacy is a pretty big challenge. I think in the context of decentralized exchange, there are, Probably people would prefer for everything to be private. I think there are some advantages of things being transparent as well.
Starting point is 00:54:37 If you see someone doing something shady like wash trading or something like that, that's pretty easy to notice. But I think in the long run, we do want everything to be as private as possible. I think both ZK Snarks and ring signatures are potential approaches. that we can take to that. The issue right now is probably the cost associated with doing those things. It's just not viable to have private transactions because the per trade cost is going to be too high. But yeah, I'm excited about a handful of different approaches. I think Keep Network is doing some good stuff in that space as well.
Starting point is 00:55:27 different signature types also, I think, can add a decent amount of privacy. We're looking into BLS signatures right now, which comes with the benefit of being able to share fees in a more private way. So we were speaking about real-Irease before now, it seems you guys have, I mean, this is one of the amazing things, and you guys mentioned it a little bit before, that I have noticed sort of from the brief, that after your token sale, there was all these announcements, okay, this project's building a X, X, X, X, projects, X, projects, X, projects. So there's really this kind of vibrant startup ecosystem that's developed, which is, I think, quite unique actually, for blockchain projects or projects I did at token sales, especially
Starting point is 00:56:18 as recently as you guys. So what are the business models that people are trying to realize? when they're building these tier X businesses. So I think the business model is very straightforward right now. It's just host an order book, broadcast that order book, and charge fees for trades. And I think that's actually a big part of why we've been so successful. The business model is just so clear. And this is kind of one of the first ways to monetize blockchain applications in a very cheap way without doing a
Starting point is 00:56:56 token sale. I think down the line, we're going to, we're going to see more business models where you have things like wallets who are just rebroadcasting orders from other relairs and taking a cut of fees. And I think that's when we'll kind of see an explosion in use of zero X. Yeah, absolutely. But what I'm curious here, it seems to me that layers I mean as a as a user I don't really care too much about you know which relayer right in the end if my order gets settled it's on the chain right they get the other tokens and and I just want the best price I want like reliable execution I don't like you don't care about brand you don't care it's not really trusted very much as we've talked about right
Starting point is 00:57:50 so I don't have to worry too much about you know someone like coin base have to been around for years. Do they have all like insurance? All of these things are not not relevant. So how how would it be possible for those relays to build a sustainable, profitable business? Is that not just going to be kind of a little commodity thing that's going to get, you know, driven to zero when it comes to their profit margin? We're definitely going to see competition, uh, between the different relays. And I think it's going to be extremely healthy for the entire kind of decentralized exchange ecosystem as a whole. You know, EtherDalta, you know, has been extremely successful.
Starting point is 00:58:37 And I think that, you know, it's incredibly impressive what, you know, Zach Coburn, the founder of EtherDilta did on his own. That being said, I think, like, you know, teams, you know, some of these relayers, since you know, we kind of massively lower the barrier to entry for new, new dev teams entering the space. I think what we're going to see over time is just, you know, competition around user experience and as a result, and this is something that we desperately need in the blockchain space, you know, creating a decentralized application that talks to the blockchain and, you know, does it in a way that the user can understand and feel comfortable with is extremely hard. And,
Starting point is 00:59:23 And if there's multiple teams that are competing for market share, one of the first things is providing a great user experience. Everyone benefits from that. Competing on transaction fees, I think fees will not go to zero, but they will go to an economic equilibrium that makes sense. And that's also very healthy for everyone that uses decentralized exchanges. But I think one of the big assumptions that it, one of the big assumptions that kind of plays into this, you know, hey, there's like 12 different relayers. They're all kind of trading the same tokens. Like, do we really need 12 relays that are doing the exact same thing? And I think the answer is no.
Starting point is 01:00:11 But what we'll end up seeing kind of what, what's an assumption that's built into that statement is that. there's a finite number of tokens people are interested in trading. And I think that's, that is going to turn out to be false. You know, I think that over the next few years, just, you know, there's been this explosion in the number of tokens that exist. And I think that's going to continue. And there's going to be a massive number of tokens that are kind of created through token sales. There's going to be just a Cambrian explosion.
Starting point is 01:00:47 of non-fungible tokens and video game items that are coming out once the community can kind of come to consensus on the token standard for non-fungible tokens. I also think that like securities tokens are going to just be an incredibly huge new area where there's tokenization. And so, you know, over the next few years, I think the number of tokens that exist is going to trend towards infinity. And, you know, relayers are not going to list millions of tokens. What they're going to do is they're going to find a market niche. They're going to kind of plant their flag, carve out that market niche. And, you know, there will probably be one or two relayers that dominate, you know, a specific market niche. But there is going to be hundreds of market niches.
Starting point is 01:01:43 and, you know, relayers that focus on real estate tokens, that's going to have to be a completely different user experience than relayers that offer, you know, prediction market tokens. And even within prediction markets, there's so many different kind of verticals that can be focused on, like basketball, you know, betting on basketball games, you know, betting on elections, politics, science. there's just like an infinite number of niches that can be kind of captured by relayers that want to kind of create kind of tailor their their product for that specific market I mean my my feeling is and of course I don't know nearly as much about this as you
Starting point is 01:02:32 and it's just sort of an intuition but this sounds kind of weird to me I mean it feels to me that you know let's say something like Google right well they can do email right they can do Gmail, they can literally have most of the world. I mean, they could have the entire world running on Gmail, right? If people wanted to, they would be able to build out that kind of capacity. I mean, I agree that probably you, when it comes to user interface, that will vary. And when it comes to marketing and, you know, maybe community will matter and stuff like that, right? So I could see there being maybe one or a few kind of relays that,
Starting point is 01:03:11 just dominate air thing and then maybe them having some sort of affiliate type things where anybody can build their real estate funnel on top or their security token funnel on top of that. So Brian has
Starting point is 01:03:29 sketched out this future. I don't know. I don't sort of agree with Brian here. And maybe I can sketch out a different future and then we can discuss sort of what will lead to either of the two futures being realized. Like if we look historically on how bullets have monetized, it has almost always been through referring users to exchanges.
Starting point is 01:03:59 So when you go to Jax and you click on, okay, I want to sell my Ecer and get light coin, Jax refers you to Shapshift and Shapeshift makes the transaction fee on that exchange and Shafshift forwards part of those
Starting point is 01:04:19 transaction fees to Jax. Strangely enough in the token economy the UX maker seems to have this kind of power to influence where the transaction fees are going to flow
Starting point is 01:04:34 and I think that this is going hold true for prediction markets and the real real economy. So it might be the case that the application with which people access their CryptoKitties, there might be a few successful applications that people download in order to get access to their CryptoKitties. The Ux makers of those, of those few two or three applications can basically make or break the reliers in the CryptoKitty exchange market. So if there's a company like Google that let's say tries to dominate each and every kind of
Starting point is 01:05:18 asset in the relayer space, right? It might be the case that there might be a small startup that comes into the market and focuses only on being a Cryptokitty's relayer. And then it makes really good deals with the UX makers of the CryptoKitties application. And because these CryptoKity UX makers always refer to this small startup for the exchange needs there,
Starting point is 01:05:46 that small startup is still able to carve out a niche against that big Google-like player that's trying to dominate every niche. But this is just a feeling, I'm not sure, maybe Brian is right, and this is like one real, one relay or a couple of relars to rule them all. What are your opinions on it?
Starting point is 01:06:04 this large relayer that kind of dominates everything, I think rather than being like Google, I think it would be more similar to like a Reddit where there's literally infinite number of topics and communities that, you know, kind of form around very specific topics. And you can go to Reddit and you can find your community and then you can subscribe to that community
Starting point is 01:06:33 and you can become a part of that community. And you can kind of just click on the different communities that you want to become a part of. But it, and, you know, I could see something similar to that happening with relays where there's this large, you know, kind of this large dominating relayer that's kind of similar to Reddit and they offer these sub-communities. But if, I mean, it's kind of hard to come up with a great example
Starting point is 01:07:00 off the top of my head. But if you can, if you compare like, Reddit and its ability to kind of create communities. You know, there are still, there are still like places where communities form off of Reddit and that provide like a more tailored experience for the community that they're serving. You know, there's a limited amount of customizable that you can provide to your subreddit community
Starting point is 01:07:29 using Reddit. So I don't know. I could see both of them existing in parallel. I don't know if that analogy was very clear, but that was my sense. I also think that there are just going to be enough ways to differentiate yourself as a relayer, and some of those ways kind of compete with each other in a way that a single relayer probably won't do all of those. So to give an example, you know, maybe one relayer is offering trades with like a certain derivatives and margin trading protocol. And another relayer is offering that with a different protocol.
Starting point is 01:08:15 I highly doubt you're going to have one company that's offering both protocols, but like those both might cater to different users. that in combination with the various different strategies you could take as a relayer that would significantly affect user experience and the APIs you're available to provide to end users. You know, kind of like the difference between the open order book model and the matching model that we discussed earlier is pretty big and it's not really something that a single relayer would not really be able to offer both of those things. So I think if you take all these different product offerings, all these different strategies, all these different, you know,
Starting point is 01:09:03 demographics that relators are targeting, we're going to see a pretty diverse environment. So, of course, there's a X token. What do you see the X token, kind of its evolution or the economy, the economy of the Xerox token? What's that going to look like in the long run? So the zero X token, first and foremost, it is a governance token.
Starting point is 01:09:28 It allows us to upgrade our system of smart contracts over time without bringing all of the markets built on top of zero X to a halt. And the second thing that the XRX token is used for in Xerox protocol is for paying transaction fees to relayers. So relayers, they get to, if they want to, they can charge trading fees on every trade that kind of goes through their order book. And, you know, I think a lot of people kind of view this, you know, XRX as a payment or is like a fee token. They kind of view that as like, oh, this is why the XRX token exists. It's, you know,
Starting point is 01:10:10 it was kind of like a fundraising mechanism that was kind of bolted on as an excuse for us to, you know, do our token sale. But like, it really couldn't be further from the truth. So the XRX token is a governance token. And the reason. The reason why we made the design decision that the ZRX token should be used to pay fees is because we think it's super important that all of the stakeholders in the ecosystem or, you know, all of the people that are accessing the protocols functionality have, at least we're driving them to participate in the governance process by forcing them to have some amount of XRX tokens to access the protocol's functionality. And, you know, like one of the problems that we're trying to avoid is, you know, if the only people participating in the governance process are the relays, that could be really bad because they're for-profit businesses and their incentives and their interests do not necessarily align with their end users. And so, you know, it could be feasible that if the relays band together, they could change the protocol. in ways that are not in the best interest of the people that are actually using this infrastructure. I guess it's the other half of the people using the infrastructure, the users, the people trading.
Starting point is 01:11:36 So, you know, I think this is like a really controversial point. A lot of people do not like that the ZRX token is used to pay trading fees. A lot of people think it feels pretty arbitrary. It's kind of annoying that you have to like go and acquire some of these tokens. But, you know, I think it really makes sense for the long-term health of the ecosystem. You know, typically if the governance process is really imbalanced to serve one group of people over another, that ecosystem or that civilization tears itself apart over time. And we don't want that to happen.
Starting point is 01:12:23 everyone that uses X-R-X protocol to have a stake in the way it evolves over time. Cool. No, that makes perfect sense and it will be very interesting to see how those governance experiments in X turn out. Yeah, hopefully it doesn't rip itself apart. Yes, exactly, although that would also be interesting to watch that. It would be interesting, but very sad, I would say. It would be sad, yes. So tell us what is kind of the roadmap and timeline and what can we expect from X in the next 24 months? So, yeah, currently we are working on V2 of the protocol.
Starting point is 01:13:03 Major changes are going to include, like, there are a bunch of efficiency gains, essentially. It's going to become much easier to arbitrage across the different relays. per trade transaction costs will be lower. We want to support new token standards, such as non-fungible tokens, and then we want to improve our upgrade mechanism so that adding new token standards would be easier as well.
Starting point is 01:13:37 And we're also going to, this is kind of a technical piece, but without getting too into the weeds, we're going to make it a lot easier for people to kind of build higher level protocols on top of zero X. They could essentially like funnel all of their trades through their own smart contracts, which would enforce any arbitrary set of rules or logic around filling an order. So that's kind of on the timeline for the next version.
Starting point is 01:14:09 But I think V3 will see some more decentralized governance built into the system for sure and then you can really go anywhere from there right there are scalability solutions we're interested in plasma chains potentially you know having like a cosmos zone things like that launching on other EVM compatible blockchains yeah I think it's it's gonna be wild but B2 is kind of what we're looking at right now cool that sounds that sounds very interesting and yeah so thanks so much for joining us today guys thank you so much it's been a pleasure yeah thank you for having us this is great yeah and of course thanks so much
Starting point is 01:14:59 for listening to once again joining us we're going to have links in the show notes to you know some essential things to check out about zerox white paper will's blog posts and some other resources if people want to learn more about x and try it out and yeah so thanks so much for joining us so we put out new episodes of Epicenter every Monday you can subscribe to the shows in iTunes SoundCloud favorite podcast app or you can also watch the videos on youtube.com slash Epicenter Bitcoin and also we just started a Gitter community so we're trying this out so if you want to go there you can do that and it's at Epicenter TV slash Gitter so and of course you can leave us an iTunes review which helps new people find the show so thanks so thanks so much and we look forward to
Starting point is 01:15:41 being back next week. Thank you.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.