Discover more from WE'VE MOVED TO thedefiant.io
Decentralized Money Shouldn't be Traded on Centralized Exchanges: Loopring Founder Daniel Wang
Wang went all-in on a Layer 2 scalability solution to build a non-custodial trading platform with the performance of centralized exchanges.
Hello Defiers! This week’s interview is with Daniel Wang, CEO and founder of the Loopring protocol. The exchange built on the protocol launched a little over a month ago, with the goal of providing a non-custodial platform, meaning it allows users to keep control of their funds, with similar performance in throughput and cost as centralized exchanges. There’s mind boggling technology with funny names behind this protocol —zero-knowledge proofs, Snarks, Starks,— which Wang demystifies and explains.
We talked about how scalability is a relative and not an absolute measure. To him that means Ethereum 2.0, an upgrade meant to increase the tractions per second on the network, won’t magically solve all scalability issues and Layer 2 solutions, which take part of applications’ data and computation off chain, will still be needed. To him though, users’ security is the wholly grail, and Ethereum is the best place to get it.
Wang also lamented lack of accessibility to Ethereum dapps and dexes in China, and talked about Loopring’s plans to launch a smart wallet geared for the Chinese market which will hopefully help solve this problem.
These are some of the key topics we discussed:
Loopring origins and having to give back most ICO funds
The team’s decision to go all-in on zero-knowledge proofs
The protocol’s tradeoffs: more centralization for faster and cheaper transactions
Why users should use non-custodial exchanges instead of centralized trading platforms
Lack of access to Ethereum dapps in China and smart wallets as the gateway to mass adoption
Ethereum dapps scalability issues and Layer 2 solutions with Eth 2.0
This interview has been edited for brevity and clarity and I’ve bolded my favorite quotes. Stay tuned for the podcast tomorrow!
You’re signed up to the free version of The Defiant, so you’ll get only part of the interview. Subscribe now for complete access. Click here to pay with DAI at 70 Dai per annual subscription ($100/yr normal price).
🙌 Together with Ampleforth, a digital asset protocol for a base money which doesn’t require collateral and is uncorrelated with the rest of crypto.
Daniel Wang: I first got into crypto back in I think it's 2013, when I was working for a Chinese company called JD.com, an e-commerce company. I worked there as a software engineer director. I watched the CCTV news about bitcoin and I got so interested that I think that night I read the white paper like four times. And I bought my first bitcoin the next morning and then I started looking for other projects. The first one I was interested in is the one started by the same founder of EOS. I think it's called BitShares.
I rented a lot of machines from AWS to mine the coin. And they suffered a loss, but I was still interested. In 2014 I started a centralized exchange back in China for crypto. It was called Coin Port, but it didn't really fly. I got interested in crypto trading especially because I believe the trading platform is a crucial part of the ecosystem as you cannot imagine what the the space would look like without an exchange of value. I thought if going forward I want to do an exchange, why not do an exchange using blockchain technology itself. It's ironic that we exchange tokens or coins with centralized technology, while in the meantime, we all believe blockchain will change the world.
Daniel Wang. Image source: GitHub
Camila Russo: It makes sense to trade decentralized money in decentralized exchanges.
Okay so you started this centralized exchange in China in 2014, but it didn't really work out. And then you thought about starting a decentralized exchange. So did that pan out back then?
Giving Back ICO Funds
DW: After the the close of the centralized exchange, I joined an insurance company. I stayed there for like two years. And then in 2017, I came up with the idea of Loopring which is very different from what we are doing right now. At that time I thought maybe we can put more orders into a small structure, which we called a ring so that people can exchange values in a circular way. So that's the first version of Loopring. The team got together in 2017, we did an ICO in China which was very successful. But unfortunately because of the new regulations in China one week after the close of the ICO, we had to refund most of our ether. So that's quite a story.
CR: What happened?
DW: Right after I think one week after the ICO, China issued a new guidance that said you have to refund all the ether you raised.
CR: How much money did you have to give back?
DW: So we raised a totally 120,000 ether. I can't remember the exact number, but I think it's 85%, or even over that, we had to give back. Giving back the funds took us even longer, because raising the funds is through the smart contract, but to give it back you have to ask people to go to come back so it was kind of a hard time for us.
CR: That's crazy. So, so then did you have to do a second raise because you still have your LRC token, right?
DW: We survived the new guidance. We kept using whatever was left in our pocket. We still have some remaining ether because we don't do a lot of marketing. Some people ask me why don't you do a lot of promotions. We have a small budget and we don't want to really spend money in marketing before the technology is ready. So over the last two and half year we mainly focused in engineering, in developing our own protocol. Going forward, I think we are good to raise another round, not through ICO, but through traditional equity fundraising.
CR: Going back to the very initial point, which was Loopring when it first started is very different from what it is today. And you mentioned this kind of ring of traders. Can you explain a little bit what that is? Just to better understand kind of the origins of Loopring?
DW: Sure. Usually the match engine in a lot of exchanges just match two orders, the bid and ask. But with Loopring we can match up to, I think at that time it was 16 orders together. So let's say Alice, Bob and Charlie, their orders are put together. So Alice can pay Bob, Bob can pay Charlie, Charlie can pay Alice. It's kind of a ring. I think there is also another project who is also working on this kind of ring structure for order matching, but they use an auction-based order matching. So anyways, that's a small feature to enhance the matching price and make sure that others that would not be able to match with each other will be matching with each other through the ring structure. I think the idea is a pretty good idea. The issue is still the performance. We had to rely on the throughput of Layer 1.
Image source: Loopring website
No Time to Wait for Ethereum to Scale
The mentality two years ago was that Ethereum is going to scale, and that this throughput issue, performance issue is not our issue, it's a Layer 1 issue. And if Ethereum doesn't scale, sooner or later there's another blockchain that will scale so we can just migrate to another blockchain, which is expected to be adopted by more developers if it scales. But you know, two years later I thought, maybe this mentality is not going to be successful because even if Ethereum can scale by like 1,000 factor, then there will be more developers looking for Ethereum resources, so probably the cost is going to be at the same level, stay at the same level.
And we cannot just expect Ethereum to scale without doing much about the scalability because as I said, we are not really well funded, so we probably won't last long enough to see Ethereum scale up and be ready for smart contracts. It turned out I was right in this judgment because it is quite a challenge for Ethereum to scale even now, although there are great minds behind Ethereum. I'm not saying I'm not optimistic about Ethereum, but it will take time to develop.
One year ago I talked to one of our engineers who later became our chief architect. I said zero-knowledge proof looks like the future. We don't know what's going to be the solution with zero-knowledge proof, but why don't you try it and figure out a design so that we can take a look.
It took him I think three months to write the design and then we had a rough implementation. And then I made a decision to just go all-in, in this Layer 2 solution and not going release a product based on our previous versions because it doesn't work. We thought, maybe we should just go all in a Layer 2 solution to make sure once the product is ready, some other teams are really waiting to use our solution, not just us, because we have a token there and we have to support the token with a story, and with a product that’s not so user friendly.
It was a tough decision but we are glad about the way it turned out. The design is really good. The design was later called ZK-Rollup. But when we worked on the solution, we really didn't realize it was ZK-Rollup. As a matter of fact, we provided some configuration options to make it not ZK-Rollup.
CR: Okay. But let me stop you there because we're getting into more and more complicated concepts. So the first thing I wanted to highlight is your view of “we don't have time and money to wait for Ethereum to scale. So let's build our own scaling solution.” And through your research and knowledge of the ecosystem you thought zero-knowledge proofs was the way to go for a Layer 2. Is that right?
Can you explain what that is, what zero knowledge proofs is, for somebody who has no idea?
DW: So, with the previous Layer 1 scaling solution, you could add data and computation on-chain to make sure the consensus is reached. With zero-knowledge proofs you need to make sure you prove what do you have done off chain to the on-chain smart contract so that the off chain part will have to follow whatever you have designed as a protocol. So you don't have to put all the details on chain, just enough information on chain to prove it. That means we are using Ethereum as a data layer, as a proof verification layer, but not as a computation layer.
CR: And then this computation layer happens off chain and, and that's what's called Layer 2, because it doesn't happen actually on the Ethereum blockchain.
Faster, Cheaper but More Centralized
And then if it's off chain does that mean that it's more centralized and has bigger risk of getting censored?
DW: Yes. I think the simple answer to your question is yes. So we still call our exchange, our protocol, a dex protocol. But in reality, I think a more appropriate, more accurate way to describe this type of exchange is non-custodial exchange. Which is still centralized because the relayer has a has a URL, has a domain name and it's a bunch of servers that we manage. If we got got censored, if we don't have the freedom to operate the servers anymore, then the product will stop working. Although we can use like IPFS to host our website in a decentralized way, but the relayer because of the use of DNS is centralized.
But that doesn't mean that doesn't have a solution. Going forward, maybe we can still use a decentralized exchange backend or the relayer. Although right now we don't have the incentive to do that. We are going to seek for compliance. Enabling bad things is not something we want to do. Solving the decentralized problem of the relayer is not our priority but going forward and maybe there's a solution like the 0x mesh or something like that.
CR: So that's an interesting clarification that for this system to work and, and be a solution that allows for faster transaction you are giving up some level of decentralization because while users are holding their funds computation is happening in a more centralized system.
DW: Yes. One thing I want to highlight is the the security level that we can provide. While part of it is centralized, the assets that people deposit into the exchange or any exchange on top of Loopring cannot be taken away by the operator because the operator doesn't really take custody of the user asset. The users' assets are in the smart contract. The only drawback is when the operator is not reachable or the website is down, it takes some time for people to to withdraw their money. The money could be locked there for a couple of days or several weeks, depending on the configuration of the exchange. And then people can just withdraw with their Merkle tree, which is on-chain, so that's the security guarantee that we provide.
CR: That's important because even though you're relinquishing some decent realization in favor of the solution, that doesn't mean that you're giving up control of your funds. You still have total control and there's no administrator or manager of the dex I've can come and take your funds away.
That gets to another question I wanted to ask you, which is why would somebody prefer to use a decentralized exchange versus a centralized exchange? So what's the specific value to that year you're bringing to users?
Security is the Main Value Prop for Dexes
DW: Still the security. So we designed a protocol for security. The user has some different risks using a centralized exchange. I think the first one is security. The security risk is not just for the users. Also for the operator. We have heard so many stories about centralized exchanges being hacked or have been hacked and people's money got lost. There's no insurance. There's no no solution for users. We want to have this problem solved. This is exactly the problem dexes are solving.
The other risks include listing some bad tokens and bad trading behaviors like pump and dumps. So this kind of behavior cannot be solved by any technical solution. It's a human behavior. And the other one includes market and information manipulation. I think many risks can only be mitigated by regulators so that exchange operators have to follow rules. So we are just focusing on the security aspect of the risk.
CR: So that's the main difference between a decentralized exchange and a centralized exchange. I also wanted to ask you about the differences between Loopring and other decentralized exchanges.
DW: Well with the current version I think the only one that is similar in design is StarkWare's solution. We are really different from Kyber and Uniswap because they are fully on-chain and they are more friendly for composability for DeFi product integration. I think that's their strength but they suffer from the throughput issue as we saw in March with the crash of the market and MakerDAO suffered from their performance issue. In the decentralized exchange domain, we are going to see a lot of different products. It's all about value exchange. We place ourselves into the subcategory called order-book based. So we are competing with centralized exchanges. We are not competing with Uniswap or Kyber or auction-based solutions.
Competing with Cexes on Throughput
CR: About throughput because I think that's the, the biggest benefit that you're bringing with your Layer 2 solution. Can you tell me more about, about that? What level of scalability can you reach with Loopring and how does that compare with both decentralized exchanges and centralized exchanges?
DW: Sure. There are two things we’re really focusing on in our protocol. The first one is throughput. The second one is the cost. Throughput is our number one priority because we emphasize the scalability feature in our protocol. Right now the Loopring protocol can settle up to more than 2,000 trades per second with Ethereum, but that's for all the exchanges built on top of Loopring, not per exchange. The per exchange throughput is limited by the performance of the relayer. So it depends on the relayer. With our current relayer implementation, we can settle up to 200 trades per second. There's still room for improvement. We are still working on that
CR: When you say relayer, is that the specific exchange that's built on top of the protocol or is it something else?
DW: So in general, we call the backend of any Loopring exchange, the off-chain part, a relayer system. It's a comparable tool the API server of the centralized exchanges.Right now that’s the bottleneck but I think even with 200 trades per second, it's still much better than a lot of centralized exchanges. If you look at some centralized exchanges, some small ones, they don't even have like 50 trades per second throughput, but they are very small. It really depends on how much money you want to put into the infrastructure. Like Binance, if you are well funded, you can use machines to scale up the backend server.
CR: How many trades per second does Binance do?
DW: Maybe 1,000 trades per second. But not too much more because it doesn't make sense to to provide a sustained high throughput when people are not trading that frequently. So throughout is roughly a solved problem right now.
$0.0001 Per Trade
The second aspect is the cost. The cost is more important for a a protocol or a product to be operated for a long period of time. If the cost is too high, nobody will want to really build a small business on top of your solution. With our current solution, we can settle one million transactions for only $125. So that's very, very good performance in terms of costs and of that number $125, less than $50 are spent on the zero-knowledge proof generation part. So off chain costs of trades is around $50.
CR: What's the cost for per trade?
DW: It’s 0.0001. And this is actually related to your previous question what's the difference between our exchange or protocol with others. A specific comparison is with StarkWare, right? StarkWare uses SK Stark, a different zero-knowledge proof solution. So we chose Snark and they choose Stark. No matter which one we use, the cost is really not very different from each other. The cost is low enough, that it is not going to be a problem at all. So the challenge for both of us for Loopring and StarkWare is not cost or performance, it's user experience.
Snarks & Starks
CR: Okay, before we get to that can you briefly explain or give an overview of, you mentioned ZK-Rollups, ZK Starks, ZK Snarks. What's the difference between all these terms?
DW: The ZK-Rollup idea is not a a technical specification. As long as you use zero-knowledge proof, no matter if it's a Stark or Snark, as long as you post the data on-chain to make sure you can reconstruct your off-chain world state, then you are using ZK-Rollup. So that's the overall idea.
And the Stark and the Snark. Stark is a new version of zero-knowledge proof technology. It has some pros and cons. The reason we use ZK Snark is because it has been there for like 10 years. So it's proven to work and there are some usable implementations already. So it doesn't really take us a long time to research a new algorithm, which really means more risks.
I think some properties we really prefer in ZK Snark is that the proof size is constant and the computation to verify the proof is also fixed. Where in ZK Stark if you have more data to prove then the proof itself will be larger. It's not linear, but it's going to be larger. And the time to verify the proof is also going to be larger than the Snark solution. So as I said the on-chain part of our product is about 60 to 70% of the overall costs. So we want to make sure the on-chain part remains a cost effective. If we use Stark, then the costs will go up a little bit. But as I said, the difference is really not meaningful anymore because the overall cost per million transactions is very low. So the difference between snark and stark doesn't really doesn't matter anymore.
CR: Okay. So to summarize this. Zero-knowledge proof is a technology which takes computation off chain and when the computation has been done it relays a proof of that computation on chain, on the Ethereum blockchain for example, and that gives it security and makes the computation faster because it's happening off chain. And that action of taking the proof on chain and the computation off chain, that's called a ZK-Rollup. And then there are different versions of how this is done with different algorithms and these are called Snarks and Starks and I guess they have some differences, but in general they should bring down the cost of transactions down on the speed up. Is that a good summary?
DW: Yes. I’d just add that the on-chain part has two different types of data. The first one, as you said, is the proof itself, which is really small. The other part is called data availability, which is the data to modify the off-chain state. So you have two parts and when we call it ZK-Rollup, the ZK part is the the verification of the proof on chain, and the Rollup is the data availability part.
Decentralization is Means to a Goal
CR: Okay. And why are we even doing all this and talking about this is because there's all this efforts to make transacting on blockchains as fast and cheap or cheaper than doing it on centralized exchanges because if people want decentralized money they want to also be able to use it in a more decentralized way. And so these technologies are a way to do it faster than just doing it all on the blockchain itself. Looking at the bigger picture.
DW: There's one more thing I want to share with is my understanding of the blockchain technology. I think decentralization is not the goal. It is one of the means with which we can achieve our real goal, which is security. We want our exchange to be secure but we don't care about whether it's decentralized or not decentralized, but it seems currently, security can be more easily achieved by decentralization. So when we design products, we should ask ourselves, what's the real goal? Do we really want to make sure it's 100% decentralized or do we want to make sure it's secure for the user and is very user friendly? For Loopring, we want to have a good user friendly product with security guarantees based on a mix of decentralization and centralization.
[ … ]
Paid subscribers have access to the full interview, including sections on:
LRC token use
Lack of Ethereum accessibility in China and smart wallet launch
Ethereum 2.0 scalability
Whether switching to another blockchain is worth it
Subscribe now so you don’t miss any of The Defiant content. Subscribers reading this post: Head to posts marked with the little lock to see the full content.
The Defiant is a daily newsletter focusing on decentralized finance, a new financial system that’s being built on top of open blockchains. The space is evolving at breakneck speed and revolutionizing tech and money. Sign up to learn more and keep up on the latest, most interesting developments. Subscribers get full access at $10/month or $100/year, while free signups get only part of the content.
Click here to pay with DAI.There’s a limited amount of OG Memberships at 70 Dai per annual subscription ($100/yr normal price).
About the author: I’m Camila Russo, a financial journalist writing a book on Ethereum with Harper Collins. (Pre-order The Infinite Machine here). I was previously at Bloomberg News in New York, Madrid and Buenos Aires covering markets. I’ve extensively covered crypto and finance, and now I’m diving into DeFi, the intersection of the two.