"We Believe the World is Going to Become More and More Tokenized:" 0x's Will Warren

Hello defiers! 0x’s ZRX token holders yesterday approved a proposal to upgrade the 0x decentralized exchange protocol, whose relayers are among the top five dexes transacting the most volume. Sharing an interview with 0x co-founder Will Warren, who explain...


Hello defiers! 0x’s ZRX token holders yesterday approved a proposal to upgrade the 0x decentralized exchange protocol, whose relayers are among the top five dexes transacting the most volume. Sharing an interview with 0x co-founder Will Warren, who explains what the change will entail; how it tries to better answer the question “does your protocol really need a token?” and improve liquidity and prices for its users. He also talks about his larger vision for a future where millions of assets will be tokenized and traded on Ethereum. Before doing all of that, he lays down the basics of decentralized exchanges so that we can all be dex-perts :)


I edited the interview for length and clarity and bolded by favorite quotes. Subscribers get the full version.

Camila Russo: Before we get into the latest with 0x, it would be great if you could give me an overview on how the different decentralized exchanges work. I’d like to really understand how the different pieces fit together.

Will Warren: There are many different ways that decentralized exchanges have been designed on Ethereum. The first dex that was ever created was OasisDEX. Maker created their own dex because in order for Dai to be useful, there has to be markets for it. OasisDex took all the functionality of a traditional centralized exchange and put it into a smart contract on Ethereum. The order book, the list of offers to buy and sell different assets, was stored within a smart contract.

The problem with this approach is that interacting with Ethereum is expensive. Every single time you want to place an order on the order book or cancel that order or modify the price, you have to create an Ethereum transaction, and it's costly. And so basically the takeaway from it was that it's really inefficient.

Then there’s a class of decentralized exchanges called automated market makers, and this is Uniswap and Bancor, and there are a few other projects too. Basically, you get a smart contract and you put in two different types of assets into that smart contract. So say you want to trade ether for Dai. You get this big pool of ether and this big pool of Dai, you put them in that smart contract and then that smart contract will look at the ratio of those two different assets and it will offer a price that you can buy and sell at. So if the the ratio changes and maybe there's more ether and less Dai, the price of Dai becomes more expensive.

It's very elegant because it's simple and has a smart contract taking care of a lot of the things that traditionally an exchange or a market maker would. But the downside is that due to its simplicity, you can't really support large markets. And you can't have large trades because if you try and buy or sell too much of an asset, you're going to rock the price up or rock the price down. And so you're kind of limited in how much can be traded by the size of the pools of assets in the smart contract.

I kind of view them as like more of a toy honestly. And I don't mean that in a condescending way. I just mean that they're really cool gadgets, but they're not necessarily designed for really robust exchange markets.

CR: But the problem with the order book model is that while it does allow for maybe more sophisticated trading, it's more expensive to have everything on chain, and I imagine slower too, right?

WW: It's way more expensive and you're right, it is slower.

CR: Which type of exchange is more susceptible to front runners?

WW: Front running is relevant for on-chain order books. It's relevant for automated market makers, and it's also relevant for certain types of off-chain order books too, which is what 0x is focused on.

CR: So what 0x is doing unlike on chain order books and liquidity pools, is that you have an off chain order book model. Can you explain what, how that works?

WW: So it's good to note that on 0x you don't have to have an order book at all. The way that most people use 0x is through an order book, but 0x is actually like a message format. It's a way for people to settle trades. The important part here is that you're only interacting with the Ethereum blockchain when a trade is occurring. But if you're not actually moving value, then the blockchain isn't being used. And so the way 0x works is it's an off-chain order relay. On-chain order book orders are living in a smart contract, but in 0x these orders are pieces of data that have the assets you want to trade and the price and how long you're willing to do that trade.

It's just a chunk of data that lived off-chain. And then you cryptographically sign it with your private key and it's still off chain. Then you can share that order with anyone in a private way. But if you don't know your counterparty, then you'll probably use an order book. And so the analogy I use for off-chain order books is a check. You can write a check and it gives someone the right to pull money out of your bank account if someone cashes it. But they could just keep the check and not cash it and nothing would happen. In this case the bank is the blockchain and the check is the order. The order isn't on the blockchain until it gets cashed out at the bank.


Will Warren, 0x co-founder and CEO

CR: And that piece of data, or the check in the analogy, where does it actually live? Does it live on a 0x server or where specifically?

WW: So that's the important piece is that the 0x protocol doesn't say that there is a specific place or server where that order has to live. The protocol only cares that you're following the format as defined and that eventually if it is sent to the Ethereum blockchain so that a trade will occur. You don't need to have a server. I can just create an order right now on MetaMask and I could just send it to you over this video chat and then you could go and submit it and fill it. But if I don't know a counterparty, then you need a server to host the order, and this introduces the concept of relayers. Relayers are basically companies that have a database and a server. And what they do is they allow people to come and share their orders with them and they take those orders and arrange them into the form of an order book and display them.

CR: So there are relayers that work specifically with 0x orders, with people who want to trade using the 0x protocol. Are they just like independent companies?

WW: They're just independent companies and they can charge fees because they're the ones hosting the server. They only accept specific orders that meet their needs and in their case their need is a fee. So they'll say you can send in your order and I'll host it, but your order has to pay me a fee, otherwise I'm not going to accept it.

CR: And I guess what's interesting there is because you can allow competition between relayers, fees should tend to not be as high, right?

WW: Yeah, that's right. And there are a bunch of different types of relayers and actually it isn't just as simple as they host a server with orders inside of it. There are different ways to have the market work as well. Some relayers charge zero fees right now because they're just focused on getting users. Some of them charge a percentage of the trade. It really varies and it also varies depending upon what kind of markets that they're supporting.

Radar Relay focuses on supporting liquid ERC20 tokens. It really looks just like a traditional, centralized exchange. Another type of relayer works the same way underneath the surface, but trades digital collectibles, like cards and Cheese Wizards and stuff like that. You create these orders off chain, they host them in their server and then someone else can go to the website and find your order there.

CR: So there's these off-chain order books and then what happens? A trade is executed, then that goes on the Ethereum blockchain?

WW: Yeah, exactly. So the relayer isn't doing anything. They're just hosting the orders. The trader is actually going and picking that cryptographically signed order off of the website and sending it to MetaMask and telling it to send this order to the 0x smart contract. So the 0x smart contracts, all they are able to do is accept these orders that are sent to it, process the orders, make sure that all of the conditions that need to be satisfied for a trade to occur are satisfied. And then it will move the assets between the different parties on either side of the trade.

CR: Okay, and for a trade to be made, you still need to wait for that transaction to be confirmed on Ethereum.

WW: Yeah. So it isn't like a centralized exchange where it's instant, it takes 30 seconds or so.

CR: And so what have you learned so far about this system? What are some of the pros and cons that you're seeing versus the other ones?

WW: I'd say that because it's off chain it is more efficient and it can support more liquid markets than automated market makers. But because it uses this architecture, it isn't as like simple and intuitive for people. Uniswap is much easier for people to develop with and trade because it's either buy or sell and that's it. On 0x you actually have to get these orders from somewhere and it's either a counterparty directly or it's from one of these relayers and then you have to send that order to the 0x smart contract. And so it's a little bit more work to integrate 0x.

CR: And it also supports more liquidity and maybe more functionality?

WW: Yeah, it definitely supports more functionality. So 0x supports all of the popular token standards today; ERC20, 721, and then this kind of second-generation token standard called ERC1155. Most dexes today only support ERC20. We think that there are going to be all sorts of different types of assets that people want to trade and we want to make sure everyone can trade them.

0x also supports significantly better prices, with a lot less slippage, than Kyber or Uniswap because of its architecture.

CR: How does this immediate new update fit in into that? Like what are your trying to achieve with it?

WW: Yeah, so there are a few different main points here. The first one is that we completely redesigned the token economics. So the first thing to note there is there is a token associated with the protocol. A lot of people see a token associated with 0x and they're like, come on, does that really need to exist? That's definitely a fair question, but the answer is actually yes, it really does have to exist. The problem that we're solving for with the token, I think now with this new update we'll finally be able to address it in a much better way than we have been to date.

CR: So what’s that problem?

WW: 0x isn't just one smart contract, it's actually a pipeline of multiple contracts strung together and they allow for 0x to do all sorts of things like support different types of token standards. 0x is evolving rapidly. Almost every aspect of the technology stack we're building is changing. Take the upcoming is Istanbul hard fork for Ethereum. It's actually changing the way the Ethereum virtual machine works. And so some things are going to become more expensive to do and that's actually breaking a whole bunch of smart contracts. That's just one example of why upgradability is super important.

The system of smart contracts is designed to be upgradable, but if the system is moving what we hope is billions of dollars every single day, deciding who gets to upgrade the system is a really high stakes issue. Even today, there are a bunch of businesses that are building on top of 0x and if it was just our team that was able to decide on when upgrades occur, that could be like kind of dangerous for these other people that are building on it.

We needed a way to allow the people that are actually using the protocol to be able to decide on upgrades in a coordinated way. The only way to get a signal on how the users of the protocol are thinking about a potential upgrade is to have them vote. And the way to measure the weight of their vote is through a governance token. We want ZRX to be this public infrastructure. We want it to be free, non rent seeking, and we want the people that are actually using it to decide on upgrades and to govern the system.

CR: So is the main functionality of the token to have users vote or does it do something else? Because what's the incentive for users to hold it, other than voting

WW: Yes. So this is actually the problem that I think that we finally solved with this upcoming upgrade. At first, we didn't really have a good incentive for someone to hold the token because it is a governance token first and foremost and voting in itself isn't a very good incentive. We didn't really have like a good idea for how to solve it. The best solution we could come up with was that basically market makers and takers have to pay a fee to the relayer that is posting that liquidity and that fee is comes in the form of ZRX token.

The idea was if we kind of force fees to be ZRX tokens, the token will end up being in the hands of the people that are consuming liquidity, providing it and the relayers that are facilitating the markets. We very quickly realized that instead of creating an incentive for someone to want to own ZRX we were forcing them to have ZRX in order to use the system, and people absolutely don't want that.

So in the new design we have three different categories of users: We have the people that are called takers, they're consuming liquidity. We have the market makers that are providing liquidity. And then we have the relayers which are facilitating these markets. Early on we didn't really have a strong hypothesis around who is the most important category of user.

We just thought like they're all important and they should all like be involved in governance. But actually over the last couple of years we've learned a ton about our different ecosystem users and we've developed a pretty strong hypothesis around market makers being the users that we need to govern the network. Takers, the people that are consuming liquidity, they're happy to use any dex. The relayers have the natural incentive to build a monopoly or oligopoly and of they control governance, they can make changes to the protocol that are anti-competitive that give them benefits, like cranking up fees. That's not necessarily in the best interest of makers and takers.

So the market makers are the ones who are naturally very aligned with what we we envisioned for ZRX as public infrastructure. Market makers don't make money from fees, they make money from trading volume and so they have a natural incentive to grow the system with us. There typically is an oligopoly in for market makers, but in the world we envision where are like millions of different types of markets, that will create a more decentralized voter base for the protocol.

CR: So how do you make it so that they're the ones who are holding the tokens?

WW: So in every single trade over 0x protocol version three, the taker is going to pay a small fee in ether to the protocol. The fee is equal in value to the gas price they pay to fill in order. All of these fees accumulate in a liquidity reward pool. Basically, it’s just a big pool of ether that fills up as people trade and every 10 days, we call them an epoch. So at the end of each epoch, that entire pool of ether is paid out according to a specific kind of reward function.

The two main parts of the reward function are how much of the liquidity in the reward pool did a market maker contribute, and then that's multiplied by the amount of ZRX tokens that are staked within this specific market makers' staking pool relative to all staked ZRX tokens. And so it creates this overlap, where you want to maximize these two things.

CR: So to be a market maker, you need to also have a pool of staked ZRX.

WW: You don't have to, but if you don't, it's economically inefficient because these fees that are going to be charged on every single trade are going to be paid out to the staking pools. So if you're a market making and you don't have a staking pool it's kind of just like leaving money on the table.

Other people can put their tokens in market makers’ pools. They'll get some percentage of the ether that's paid out, and market makers get 50 percent of the voting power for all of those tokens when it comes to governance decisions. And so like what this system of incentives and naturally ends up doing is that the market makers that are doing more volume, they have more voting power and the ones that are doing less volume have less voting power.

CR: Got it. And so what’s the second big piece about v3?

WW: The second big piece is that 0x is now going to be able to absorb liquidity from these other on-chain liquidity pools like Kyber, Uniswap, and OasisDEX. So now when you are using 0x, you can not only trade by filling orders that live off-chain, but you can have smart routing where you're getting the very best prices from these other dexes. Ultimately it means that 0x becomes like a single entry point and you get access to four different sources of liquidity and that will provide like better prices.

What will happen is that the system will look at the prices on 0x, but also on the other dexes and it will say, in order to get the very, very best price, you should split up this say, $10,000, across these four different options in this exact proportion. And so maybe like 40 percent of it is filled by 0x, 20 percent by Uniswap, and the remaining by Khyber.

CR: Cool. I wanted to also ask you about about the news on dYdX dropping 0x markets because they didn't want to pay the fees that will come with this new update. What was your reaction and are you concerned about others doing the same?

WW: I think the narrative was probably taken a little bit out of context in the article. We've known the dYdX team for a really long time and we've been talking to them about their roadmap for months now and we've known that they were working on their own native dex functionality. There are a couple of reasons for it. The main one was that the number one feature request from their users was the ability to place limit orders. And basically that wasn't possible using external sources of liquidity. Now that V3 is going to be out, we'll be able to like focus on adding that functionality. But they're a really fast moving team and we couldn’t offer it in their timeline.

In order to support that functionality, they had to switch to this matching model where they’re taking orders and filling them together in batches. So dYdX is acting like a matching engine. This model is more familiar for market makers and it allows them to support more aggressive prices. The trade off is that it's like much more centralized and from a regulatory perspective, I think that it's much riskier.

CR: Going forward what's your larger vision for foresee dexes?

WW: It goes back to our vision for what we think blockchain technology and Ethereum are going to allow, which is we believe the world is going to become more and more tokenized and all forms of value will end up as tokens on public blockchains. This includes things like fiat currencies, traditional stocks and bonds, derivatives, things like prediction markets to airline miles. We really think that there are going to be millions of different types of markets that people want to trade. An in order to support all of those markets, there needs to be a technical standard that everyone can use and that is low cost and that there's one reliable system of smart contracts rather than having to use like 20 different smart contracts to trade different types of things.

CR: So you want to be the dex standard for all of these different tokens that you believe will be on Ethereum in the future.

WW: Yup.

Hope you enjoyed this interview! If you did, please consider sharing with others you think might like ti too.