Unchained - Will Warren of 0x on Why Decentralized Exchanges Are the Future
Episode Date: March 6, 2018Will 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. Learn more about your ad choices. Visit megaphone.fm/adchoices
Transcript
Discussion (0)
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 at Laura Shin.
This episode is brought to you by StartEngine,
an ICO platform focused on issuing securities tokens in compliance with SEC rules.
StartEngine can help your business launch a regulated ICO.
Go to StartEngine.com slash Unchained for a 20% discount.
StartEngine does not provide legal advice.
Unchained is sponsored by Appreciate.
Founded by Ed Stevens,
Precate is building the most valuable relationships on Earth.
Each episode, Pre-Sheet is recognizing an individual or group for their achievements in the crypto space.
Give good and get good.
Who in crypto 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 ZeroX.
Welcome, Will.
Thanks, Laura.
Happy to be here.
So I wanted to have you in the podcast because I think everyone believes decentralized exchanges or dexes will be a big theme in 2018.
But before I get to that topic, I wanted to hear you.
your history first. What were you doing before you got into crypto and how did you get into the space?
Yeah. So I was originally on like a research track and I was planning to either go into
research and 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 continued to follow it.
My wife, Linda Shea, who was my girlfriend at the time, ended up joining Coinbase in 2013.
And naturally, I just got more and more interested through Linda. And then eventually,
when Ethereum came out later, I basically lost interest.
and everything else.
And, you know, at the time I was a PhD student at UC San Diego studying engineering.
And I decided to drop out just to focus on building on Ethereum full time.
And how did you come up with the idea to do a decentralized exchange protocol?
Yeah.
So when I dropped out of grad school, I was initially working on tokenized derivatives on the
Ethereum and blockchain. And the idea was that, you know, 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 kind of creating this standard for tokenized derivatives,
people would be able to hedge against that volatility. And so that was the idea I was working on.
I spent around six months.
I kind of like flushed out the whole system, built it out, wrote up like a technical spec.
And then I met my co-founder, Amir Bandioli.
And we were thinking about, all right, how are we going to bring this product to market?
And we realized that like tokenized derivatives just aren't very useful if there's nowhere to exchange them.
I think, you know, 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 like back before Ether Delta was around.
So Ether Delta was like the very first decentralized exchange that people started using
on the Ethereum blockchain.
So, yeah, I mean, Amir and I, you know, I think we just kind of assumed that this
infrastructure for exchange would exist and it didn't. So we, you know, we just decided, all right,
well, I guess we'll just go build this ourselves. 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. Yeah. So, I mean, so the most obvious issue with centralized exchanges versus decentralized
exchanges is that centralized exchanges are responsible for custody all of their users' digital assets.
So when you're using a centralized exchange, you're actually giving them full control over your
cryptocurrency. And in the very, you know, 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 just 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, you know, that custodian by any means necessary.
So with a decentralized exchange, everyone that's participating in exchange, everyone that's 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.
And so one thing here, obviously, is that people, you know, they're good at losing things. At least I know I am. So while having a honeypot for hackers is not something that we should be doing, I think also people might worry about losing their own private keys. So are there any special mechanisms that are built in so that people don't end up easily losing them?
No. So that's a great point. And I think that's probably one of the biggest.
hurdles for adoption of this technology and just not even decentralized exchange, but just
the adoption of cryptocurrency generally is that having good 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 kind of private key management solutions. So yeah, I mean, it's definitely
it's more convenient to have your money just parked in a centralized exchange and not, you know,
ideally their security is really good and you don't have to worry about it. But, you know,
I think history's proven that you should be very worried if your cryptocurrency is in someone
else's possession. And so we've so far described.
what a decentralized exchanges, 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 zero X? Yeah, I think, so kind of going back to where we left off. So I met
a mirror 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 just 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,
so we met with Auger and Nosis and Maker and Melimport, all these different Ethereum projects
that are kind of targeting different use cases, we realized that,
all of them required exchange functionality.
And they were all kind of, 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.
And so, you know, there was just kind of this mounting body of evidence that all of
these different projects would require exchange functionality.
And, you know, it wasn't something where we could necessarily.
our kind of for-profit decentralized exchange could service all of their needs.
So, yeah, 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, you know, 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 repurposing our system for public use.
Is that why instead of being, for instance, a DAP or a decentralized app on top of Ethereum, that it's its own protocol?
Yeah, yeah.
So having, so zero-x, but by having zero-x serve as an open protocol that anyone can plug into,
anyone can kind of create their own for-profit decentralized exchange on top of it.
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, the benefit of having an open protocol that every single DAP 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 apps 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.
But one thing is that the zero X 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.
Yes, that's a good question.
So Zerox protocol itself, yes, it is only designed to allow for the exchange of
Ethereum-based assets.
But I, so two thoughts on this.
So first, I think that, you know, with cross-chain solutions,
like Pocodot and Cosmos and a variety of others I've heard about like Block Collider,
you know, 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.
So, you know, I think in like the next few years, what we'll see is that the native currencies
of all these different blockchains will eventually be able to be able to be
represented as Ethereum tokens that exist on the Ethereum blockchain and that you can trade
using Xerox protocol. Oh, interesting. Okay, so there will be, is that the same thing? So when
people ask about it being interoperable, is that the same thing or is that a different,
is that a different concept? Yeah, so I think interoperability can mean a few, quite a few
different things. But yeah, 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
interesting example that I think is worth checking out. Recently, you know, the the Trubit team
has been making a lot of progress bridging the the Doge coin chain and the 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 onto the Ethereum blockchain and just represent it as an Ethereum token.
So I think that's like an ERC20 token.
Yeah, exactly. And it's all trustworthy. And yeah, I mean, I think it's like a pretty interesting example of what's to come in the next few years.
Doesn't Cosmos do a similar thing to that, or that's what they're intending to do?
Yeah, 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.
Okay.
Let's talk about relayers on 0X.
What is a relayer?
How does one work?
Okay.
Yeah.
So zero X protocol on its simplest form allows any two people in the world to trustlessly exchange in a peer-to-peer fashion directly.
So I can, you know, I can basically generate this zero-x order, which specifies sort of the trade I would like to enter into, you know, the assets that are being exchanged, the exchange rate, the, the time at which I'm no longer.
longer willing to honor that trade.
And I can take this packet of data and cryptographically sign it.
And I can send that to my counterparty.
And this packet of data is really just, it's just data.
So I can send it to my counterparty through email 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, you know,
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 smart
contracts.
And the smart contracts will then sort of move the tokens between me and my counterparty
at the exchange rate that was specified and, you know, assuming everything, you know,
assuming that order is authentic.
And so that that's how 0X protocol.
all can be used in sort of its most simple and most manual form.
But typically people don't, you know, people do these large OTC deals directly with
a counterparty, but typically people go to, people want to go to an exchange.
So a location where many of different buyers and sellers are kind of aggregating their
liquidity.
And it makes it very easy to find a counterparty that, you know, is offering the asset
that you are interested in at a reasonable price.
So that's where relayers come in to zero X protocol.
So relayers are basically just any entity that decides to aggregate these
cryptographically signed zero X orders and present them to the world in the form of an
order book.
And, you know, since these zero X 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 them
according to price and according to trading pair, et cetera.
And then I serve 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, you know, they're really, they really aren't in
exchange. They're really just relaying these messages back and forth between different people.
So that's why we call them relays. So if a relayer, sorry, 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? No. So the hacker would simply be able to trade with the people
that want to trade. Okay. 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, Appreciate. Founded by Ed Stevens,
Appreciate is building the most valuable relationships on Earth. Each episode, Appreciate 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 Klitsky, Gregory Sanders, Werner Lumberg, and Tompard.
Thomas Snyder. Way to go, team. If you know someone in crypto who should be recognized on a future
episode of Unchained, go to appreciate.org slash recognize. That's appreciate.org slash recognize.
Interested in raising capital through a regulated ICO, Start Engine is your one-stop solution.
Start Engine, an ICO platform with 140,000 plus investors, was founded in 2014, by Howard Marks,
co-founder of Activision Blizzard. Start Engine's mission is to help entrepreneurs raise the capital they need to
succeed. Since the implementation of the Jobs Act in 2016, Start Engine has helped 150 companies raise
capital. The emergence of cryptocurrency presents an opportunity for entrepreneurs. In 2017,
ICOs generated $4 billion worth of capital. The team at Start Engine leverages this experience and
expertise in crowd sale and securities regulation to launch SEC compliant ICOs. In fact, Start Engine can
help a company to build its own tokens and is creating a secondary market upon which those tokens can be
traded. In short, start engine provides a complete token ecosystem. If your company wants to launch a regulated
ICO, just go to startengine.com slash unchained for a free consultation and a 20% discount on future
ICO set up services. That's start engine.com slash unchained. Start engine does not provide legal advice.
I'm speaking with Will Warren, the founder and CEO of decentralized exchange protocol 0X.
So to continue our conversation about relayers, I wanted to ask if I become a customer of one relayer,
then are the other sides of my trades,
are all of those people, customers of the same relayer?
Or can relayers kind of interact with trades on other relays
or elsewhere in the protocol?
Yeah.
So you can trade, typically you'll be trading with other people
that are also kind of using that same relayer as you.
But since ZeroX is an open protocol,
and all of these different relayers are plugged into the same piece of infrastructure.
It does allow for things like liquidity sharing, and it allows for relays to kind of balance orders
across different, you know, other relays as well.
So, you know, it is feasible that you might end up filling an order on one relayer's order
book that originated on a different relayer.
Let's say that I want to exchange a non-top-10 token for another non-top-10 token.
If I wanted to kind of 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 the demand will be to trade kind of some of these less popular tokens for other less popular tokens.
Yeah, yeah. So I think the trading pairs that we'll see a lot of volume will be denominated in the most liquid asset. So things like Ether or once Bitcoin is tokenized on the Ethereum blockchain, you might see trading pairs that are denom, you know, where Bitcoin is the denominating token or things like U.S. dollar tokens. Once those, you know,
are a thing. You'll be trading sort of these less liquid tokens against the US dollar token
or the Bitcoin token. So what I think is going to end up happening is rather than having a
bunch of different relayers kind of competing for the same, you know, 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 enormous number of tokens and diversity of tokens that exist on
the Ethereum blockchain.
So rather than having a relayer that, you know, 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, you know, attempt to kind of dominate the market share for that market.
And describe what you mean by market niche. What are some examples?
Yeah. So, you know, just for, for,
for things like ERC 20 tokens today we're seeing, you know, there's like a few thousand ERC 20
tokens that exist just from token sales. But I think we'll start to see much more interesting
kind of classes of ERC 20 tokens in the near future. So things like prediction markets,
Augre and Nosis, and even in prediction markets, there's just a number of different
verticals that people will want to kind of people will be wanting to trade on the outcomes
of different types of events.
So like sports, sports betting, weather, science, politics, all of these things will be represented
as prediction markets that have Ethereum tokens used to trade them.
And recently, we've been seeing kind of an explosion in this new class of Ethereum tokens
that are called non-fungible tokens.
So ERC-721 is the token standard that's used to represent these things.
And non-fungible tokens are kind of like one-of-a-kind collectible items.
And they can be, you know, 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.
And so 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 kind of tailoring their products to that specific use case and that kind of
of demographic of users.
With Amex Platinum,
almost every purchase made with your card
can be covered with points,
including new tastes,
new fits,
and virtually everything in between.
That's the powerful backing of Amex.
Conditions apply.
When McDonald's partnered with Frank's Redhot,
they said they could put that shit on everything.
So that's exactly what McDonald's did.
They put it on your McChrispy.
They put it in your hot Honey McNuggets dip.
Even put it in the creamy garlic sauce on your McMuffin.
The McDonald's Frank's Red Hot menu.
They put that shit on everything.
Breakfast available until 11 a.m.
At participating Canadian restaurants for a limited time.
Franks Redhot is a registered trademark of the French's food company LLC.
But 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?
want to trade it for a security token
or someone with a security token
want to trade it for a collectible.
So I was just wonder,
might we see demand for reliers
that have a bigger marketplace
that doesn't specialize?
I think so.
Yeah, I mean, there will probably be both.
So if I had to guess
the way that the relayer market
might play out,
there might be this
kind of like one massive relayer
that tries to serve a bunch of
different markets 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 kind of find the different communities that you're interested in being a part of and you
subscribe to them. And I think it'll 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 kind of subscribe to those markets.
But the user experience, I mean, with Reddit, you can create a subreddit that, you know,
for your community, but there's limits to how much you can tailor that subreddit to suit
the needs of 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, you know, 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 relairs that, you know,
allow their users to trade very niche types of assets like, you know,
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.
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 that there isn't enough
demand and buyers may not think to sell there if there aren't enough sell there. So how would
you solve this problem or how do you think this problem could be solved? Yeah. So I think there's
quite a few strong incentives for people to use a decentralized exchange over a
centralized one that, you know, and it's just these reasons alone, the fact that you, you know,
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 just will be a natural desire for people
to use decentralized exchanges. It's just, it's just a completely different product. But as far as
how we kind of bridge or 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 zero X protocol today, there's, you know,
$500,000 or a million dollars of trading volume each day.
But I think it's early.
So 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.
The, you know, 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.
And, you know, the good news is that I think that today we're kind of in the dial-up
internet stages of blockchain.
And, you know, in 10 years from now, blockchains will probably look completely different
than they do today.
and, you know, being able to support thousands or hundreds of thousands of trades per second
will be much more feasible.
Whereas today, you know, on the Ethereum blockchain, we can support, you know, maybe 15 trades per second.
So, yeah, I think that's, it's one of those things where it's going to take time and we probably
can't cut corners or anything like that if we want to do it, right?
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.
Yeah, yeah, very much so.
So today that's true because Zero X protocol is tied into the Ethereum blockchain.
In the future, Zero X protocol is going to be blockchain agnostic.
So you can use the same exact message format and the same exact settlement logic logic.
but you can kind of swap out whichever blockchain you want to use as your back end, so to say.
Oh, interesting.
Yeah, but that is, you know, this definitely a ways out.
You know, we could theoretically port zero X protocol over to some other chains today if we wanted to other EVM blockchains.
But, you know, if there aren't tokens there, if there isn't like a healthy token ecosystem on a,
a different blockchain, and there really is no reason for ZeroX to be ported to that blockchain.
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.
So Zero-X protocol, so, I mean, taking the fact that the Bitcoin blockchain is,
UTXO blockchain and not like it can't support rich state or tokens really I mean you know that would
make it not really possible to have zero X function on on the Bitcoin blockchain theoretically though
if it if it could support those things I could see people still using zero X protocol for kind of big
OTC trades where it's just directly peer to peer because then then the block time doesn't really
matter as much but yeah 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 these, the tokens they just purchased show up in their wallet,
you know, a few seconds later.
Yeah, I think clock time does matter.
You know, what is like the ideal number?
I don't really know.
I don't know if I have an answer to that.
Right now it's a little clunky, you know,
so if you purchase some Ethereum tokens using X-Thing X today, you know,
the block time on Ethereum is 15 seconds roughly.
It might be like 30 seconds before your tokens show up in your wallet.
But, you know, 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.
You've written about how front-running can be a problem in a decentralized exchange environment.
What is front-running and how would that happen in a decentralized exchange and what solutions do you propose to prevent it?
Yeah, front running is an issue that isn't specific to decentralized exchange.
So 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 kind of use right now.
So front running just generally, the way that blockchains typically work is that, you know,
you create a transaction, you sign that transaction, and you broadcast it to the peer-to-peer network.
And that transaction isn't necessarily mine, it's never mined 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, you know, if 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.
will get mined into a block before the original person's trade will get mined into a block.
So that's not very good.
That means that smart people that are watching the pending transaction pool can kind of 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 kind of seeing what other people are going to do before they do.
do it can give you an advantage like, you know, options and just a variety of different things.
So for zero X, there's a variety of ways that you can prevent front running and make it not
feasible. So I guess maybe this would be a good time to kind of 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.
And 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 kind of generate one of these cryptographically
signed orders and post it up on a relayer's order book.
And the relator's order book is kind of just like a post-it board.
And anyone can kind of look at the different orders that are
there and anyone can kind of grab one of them and take it off the order book and inject
it into the zero-x smart contracts.
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 know, 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 price
and jumping in front of you.
The second way that a zero-x 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 and
that ends up on their order book specifies that.
relayer as the only entity that's able to fill that order.
And so what happens is when this, when this relayer gets orders on opposite sides of the market
at, you know, the same exchange rate or an overlapping exchange rate, they kind of take these
two different orders, they package them together and inject them into the zero X smart contracts
and fill them, you know, synchronously and atomically in a single transaction.
And in effect, you know, this relayer is not only aggregating liquidity,
but they're also kind of taking on the responsibility of trade execution.
And so no one else can kind of jump in front of an order sitting in the pending transaction pool.
Only the relayer is able to execute these trades.
And there's also a variety of other ways that zero-x protocol can be used.
It's a really modular and extensible system.
And, you know, there's some interesting ideas that we're thinking about that kind of combines the openness of the open order book model with the strong guarantees around trade execution that you get with the matching model.
And I don't want to go too deep into it here because it's a pretty, you know, we can go super deep on it.
It's a pretty technical subject.
But I have a blog post I just published recently called front running,
griefing in the perils of virtual settlement that really goes through the issue from first principles
and then gets into some really interesting solutions that we're exploring for the future.
Yeah.
And 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 minor wanted to do that,
then they wouldn't even have to pay the fee to front run.
So for them, you know, it's a no-cost move.
Right.
Yeah, and one other thing I want to ask about the model that's, you know,
just within the relayer, does that mean that if the relayer only fills the orders
in their own books that front-running can't happen at all?
Right.
That's correct.
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 you have to, you know, there's some degree of trust there.
Generally, these are, you know, entities that are running a 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.
Okay. I actually want to switch over now to discussing some regulatory issues. How would a decentralized
exchange deal with regulatory issues? Like, 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?
Well, so I think it depends on a few different things.
So relayers, you know, 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, you know, the pioneers, the relairs that are, that are, you know, creating businesses now,
I think they're pretty cognizant of that fact.
They have good legal counsel and they're, you know, doing their best to make sure they're operating in a legally compliant way.
But, you know, I think there are ways that Zero X protocol could be used to trade all sorts of different.
Ethereum assets, that would be pretty hard to prevent.
You know, if I wanted to enter into a trade with someone else privately and man,
kind of 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 also, you know, there's these other projects that are looking at things like
KYC and AML for being able to access.
securities tokens. So, you know, these would be registered securities on the Ethereum blockchain.
So like Harbor and Polymath are looking at things like that. And that would be kind of a layer
underneath Zero X protocol that would that would prevent people from accessing unregistered,
or would prevent people from accessing securities tokens if they hadn't gone through a K-Y-C-A-M-M-L process.
And KYC AML stands for know your customer and anti-money laundering processes.
So, okay, so it sounds like relays can institute KYC and AML processes.
Is that what you were saying earlier?
Oh, yeah, absolutely.
I mean, whether or not they can, whether or not they need to or if it's necessary, I don't know.
I'm not sure.
I think, you know, it's something we're still figuring out.
Okay.
And then 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?
Yeah. So 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 correspond 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, you know, if I have gone through KYC-A-M-L, I own this.
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 would fail, and that would
still have the token. And this is kind of a layer underneath ZeroX protocol, where if I own a
security token and I try and exchange that token with someone else or whatever Ether, that trade
would fail if my counterparty had knocked on through that K-Y-C-A-M-L process.
So, yeah, so it's kind of cool.
There's a completely separate project, but they're, and they're tackling this problem that,
they're tackling this problem in a different way or in the stack.
And to go back also to a little bit more like law enforcement type things,
I also wanted to ask, so if something goes wrong on a centralized exchange,
It's completely clear that that exchange is liable.
But what if there's some incident that occurs on a decentralized exchange, then how does that work?
In the case where Ether Delta got hacked, was there someone that you could point to as saying, like, you know, they messed up?
Or, you know, in any other example where something might go wrong with a decentralized exchange, who would be considered liable?
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, you know, that would be kind of like a systemic risk to everyone.
I think like with EtherDilta, so EtherDilta is this kind of like for-profit decentralized exchange, running their 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 EtherDeta works is they kind of allowed people to create an EtherDeta-specific wallet in their browser.
So generate a new private key, send their digital currency to that private key.
And so when someone took over their DNS, it allowed the attacker to kind of,
of ask people to do some, you know, basically, you know, 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 know, you shouldn't be generating a private key for, you know, a specific website and the way that the private key was kind of, it was bad.
private key hygiene. You know, ideally you'll be using something like a ledger hardware wallet
to trade on a decentralized exchange. And you, you know, your private key is very far removed
from anyone on the internet. And every single, you know, every single action that you take
that requires access to the private key has to go through your ledger. And you can kind of
examine exactly what's going to happen in that transaction.
So I think, you know, I think Ether Delta, the way they got attacked was like a very unique attack.
But I think generally, you know, 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, you know, tricked into doing something
with their private key that, you know, causes them to lose money. But I think that's more of a
user experience or user interface type of issue that needs to be resolved.
Let's talk about the ZRX token. What is the purpose of the ZRX token?
Yeah. So this seems to be one of the
the questions that we get a lot of confusion around. But it's really, you know, it's pretty simple.
So Xerox is a governance token. The zero X protocol system of smart contracts is a pipeline of
contracts on the Ethereum blockchain. These zero X orders kind of enter one end of that pipeline
and token balances are modified at the other end of the pipeline. And the pipeline, 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 XRX 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 kind of 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, we can just upgrade our current pipeline over time
without, you know, making it a super disruptive process. So how will those upgrades work?
Like how will, will I vote with the token or how does that work? Right. So today, the governance
process is is not defined. We have a placeholder governance module that, you know, is just kind of a
multi-sig 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 or are either approved or
denied. And, you know, I think decentralized governance is one of the most challenging issues in,
both in 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, you know, we did not
want to jump into anything to 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 decentralized
exchange, the entire project could fail if we were to implement a mediocre decentralized
governance system early on and, you know, before we were ready.
Okay. Yeah. I do know that also the token will be used to pay relay our fees. Is that correct?
Yeah. Yeah. So the reasoning behind this was that, so 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 to do some trades.
Like, you know, oh, I want to go trade right now, but I have to go purchase some of these XRX tokens.
But we have, you know, 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 a logical one.
And the reasoning is that, you know, the primary.
purpose for the ZRX token is for governance, for kind of upgrading this pipeline of smart
contracts 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 Zerox
protocol.
And, you know, that would be okay.
But, you know, that's only half of the ecosystem.
So half of the ecosystem are these people that are building relays and facilitating trades.
The other half are the people that are using these relays.
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.
Well, their incentives do not necessarily align with their end users.
And what we've seen in the past is that if governance, if the governance system kind of is favoring one group of people over another group,
and the imbalance is too strong, that the entire system just generally will rip itself apart.
So, you know, we thought about this quite a while.
We looked at the different ways that we could potentially, you know, ensure that there was a broader participation in governance and eventually decided that, okay, if you want to access Xerox protocols functionality, you want to be able to access a relayers order book, you should be required to have a small amount of ZRX tokens in your possession.
And this is a way to kind of push the distribution over a wider body of people that are in the ecosystem.
But what if relays 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 X tokens?
Yeah. So this is an issue that we encountered recently with one of the reliers.
And I think, you know, so first of all, like we're really.
close with all the different teams building relayers, or at least, you know, we're in
communicate, we're in contact with them. And, you know, really like 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 relays that's using the matching model basically
found that it is more expensive for them to operate a matching relayer if they take ZRX
and fees rather than taking a spread. And the reason for that is because when we initially
designed ZeroX protocol, the design was kind of 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 two of the protocol, we're going to eliminate these inefficiencies.
And at that point, you know, whether or not these relays will take XRX and fees or continue to take a spread,
there won't be any economic reason or rationale for taking a spread rather than taking XRX.
You know, we'll see what happens.
I think that some of these relays 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 kind of get the feedback loop going? But I think,
you know, once we make more progress on putting a decentralized governance process in place,
and I think at that point, you know, it'll kind of hit home with a lot of these projects that,
okay, well, eventually it isn't just going to be Will Amir and the zero X
team that are driving governance in zero X protocol.
I'm actually going to have to participate more formally and get involved.
And I think at that point, it might kind of make, it might be easier for some of these
projects to really understand like the necessity of decentralized governance and the
ZRX token.
All right.
Well, we will see.
We're running out of time, but how many relays do you have on Zero X protocol now?
Yeah.
So we're in contact with upwards of like 12 different teams at this point.
Okay.
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?
I would recommend people follow us on Twitter at ZeroX project.
or check out our website, zeroxproject.com.
We're also, you know, pretty active in our chat messaging group on Rocket Chat.
Okay, great.
Well, thanks for coming on the show.
Thank you very much, Laura.
Thanks so much for joining us today.
To learn more about Will, check out the show notes inside your podcast episode.
Also be sure to follow me on Twitter at Laura Shin.
New episodes of Unchained come out every single Tuesday.
If you haven't already, rate for review and subscribe on Apple Podcast.
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.
