New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Mopro: Make Client-side Proving on Mobile Easy

Devcon 7 SEATue, Nov 12, 2024, 08:12 AM · 15:59

Mopro is a toolkit for ZK app development on mobile. Mopro makes client-side proving on mobile simple. Mopro aims to connect different adapters with different platforms. In this talk, we will share: - How to use Mopro to develop your own ZK mobile app. - What is the current development progress, including the current supported proving systems, supported platforms, and mobile GPU exploration results. - Moreover, we will share the challenges that Mopro faces and our future roadmap.

Transcript

A scaling research perspective. Yeah, so we had raised, well, first we were supposed to write the book on Plasma. And every single time, remember I was a Bitcoiner transitioning into the Ethereum world. And every single time I finished writing a chapter, the research space had progressed enough that I would have to delete the chapter and rewrite it. And then five rewrites later, I was like, this is not what I got have to delete the chapter and rewrite it.

And then five rewrites later, I was like, this is not what I got paid to do. Five rewrites later, we were like, wait, this is definitely an implementable design. So we implemented it, we published it, we launched a test net, we got all these likes on Twitter. I remember we had 1,000 likes. I remember screenshotting it to my parents and sending it to them.

And it wasn't the same as product market fit. And so, you know, after like three months of our Plasma network, I was like, we've done it. We've scaled Ethereum. Why isn't everyone cheering? Why isn't mass adoption coming?

And there had been a total of, I think, four transactions on the test network. And all four of them were our transactions. So after that, we went back to the drawing board, and we hit up some people at a firm called IDEO. And they introduced us to the concept of talking to your users. And it explains a lot about crypto.

This is like a year into the development of Plasma. So for the very first time, we spoke to some users, and we said, we've got theoretically infinite transactions per second. You just have to adopt this completely new Plasma predicate system, and you have to learn a new programming language, which we've just invented. And people were like, you know, I actually don't want to do that. I'm a product manager at Coinbase and I've got a lot of shit to do and I'm not going to rewrite all my contracts.

We're like, okay, Uniswap. Uniswap should be simple enough. And Hayden was like, bro, my shit is 100 lines of code. I'm not about to rewrite that shit in a brand new language. I'm doing just fine.

My users are just fine paying the fees. And so we realized that what we had built was not actually what people wanted. There wasn't enough usage in crypto at the time to warrant having theoretically infinite TPS. What people wanted was cheap transactions and fast transactions. A single transaction averaged anywhere between $5 and $25 depending on what was happening.

So we went back to the drawing board. But the only problem was I had raised a total of $300,000 in grant funding. And it was enough to pay each of us like $40,000. Our office was my studio apartment in New York City. I lofted my bed.

Everything under my bed was like my room, and we shared one Ikea table. And it turns out if you have kids, so like if you have any experience doing any kind of work, you didn't want to work for us. And I remember offering a very senior staff engineer $120,000 a year because I thought that that was a lot of money. And he was like, no, I'm thinking like $250,000, and that was crazy to me. So tried to raise another round of grant funding.

Didn't work, which was surprising to us because Omise Go, this company that had raised $30 million in ICO funding, didn't want to give us more money. The other projects that had forked our code base, including Matic, which is today Polygon, also didn't want to give us grant funding. So how could it be? Did nobody want what we were building? So we went back to the drawing board and built out a demo of the first optimistic rollup with Uniswap.

The idea was we needed one-click deploy. TPS was not the optimization target. We were optimizing for fast transactions, cheap transactions. And we demoed that, and we went and raised a round of VC funding. VCs were like, how are you planning to monetize?

No idea, but all I knew was we needed to start hiring more than just four half-brained kids who didn't even have their frontal cortex fully developed and have never heard of a product manager before. And that's where we are now today, four years later. Yeah, I mean, I think the way that I saw the research side of this, right, is basically that in the beginning, there were state channels. Actually, Bitcoin came up with state channels first. It was just called payment channels, and then it was called the Lightning Network.

And it turns out that the Lightning Network has a lot of problems. But then state channels in Ethereum, thanks to Ethereum smart contract properties, were more powerful. But even still, there is this problem that they only supported a very narrow class of applications. And then in 2017, Plasma came along, and Plasma actually supported arbitrary scale, scalability for payments. And so at first, there was Joseph Poon's paper back in the summer.

Then there was Minimal Viable Plasma, which is a post on ETH Research. And then Carl and I, I think on a train in France, came up with Plasma Cash, which is like Plasma but more scalable, right? Because like Bitcoin Cash is like Bitcoin but more scalable. And so, but then even that still, like it only supported payments, right? And then we went into this rabbit hole of like using RSA and like cryptography.

And then we did plasma prime but then eventually we got like to this point where we realized that like with the technology at the time actually plasma just could not be made to be general-purpose and that just became more and more obvious and then at some point like basically the idea of roll-ups so started to come out and like people just realized that doing a roll-up that actually supports a full EVM was actually the obvious choice and what I think is interesting right is like I think short term like that was completely true right because there was also this other project from 2020 called Loopring that did a ZK rollup using, that was like fully functional, like even got to stage two very quickly, very cheap, but then nobody cared because people did not want payments, people wanted the EVM. And so then stuff switched to the rollup direction. And then more recently we realized like, wait, ZK-SNARKs exist, they're amazing. And like actually there's, with ZK-SNARKsnarks there's a lot of plasma stuff that you can do that was not actually possible before. So like I actually think there's a good possibility that in a couple of years things are gonna go like fully full circle.

Oh and one foot as you could tell V was like kind of behind the scenes like doing all these things and one thing one thing I remember, I was in a car, and I was like, wait, so if you post the data in the call data, it saves X amount of money. And then Vitalik was like, oh, that sounds like Shadowchains, this thing that I wrote about in 2014. Anyway, it was a whole weird melting pot of ideas and things that all, you know, now we're here. Personally, I feel like the entire industry is doomed to talk about the same like six ideas on like an eight month loop to infinity. Maybe I'll be convinced that I'm wrong in a few years, but this is my current thesis.

So just trolling a little bit. Yeah. Well, so I think switching gear a little bit, since Hayden cannot make it here, Uniswap also has a really interesting story like Carl mentioned. But it may be one of the earliest and most usable applications. And there's a lot of MEV in there.

There's a lot of how to build an application on Ethereum. Like I would say lessons learned. So yeah, maybe I'll give it to V first because he's, yeah, I guess. Sorry, what's the question? Okay.

Okay, I'll grab it. Basically, I mean, there is a untold Uniswap side of the story, which I told Hayden that I would also do, so I feel obligated to answer your question. I hope you don't mind. Which is that Hayden also was behind the scenes talking about this. And I talked about this in a presentation, DevCon 4 or whatever.

But basically, I remember many times we were in Brooklyn with Hayden, with the Uniswap team, going to their office saying, hey, check out our new design. It's so scalable and it's so great. And as Jing said, it was a predicate design or whatever. And then Hayden was like, okay, but can it support Uniswap? And the answer was, no, it cannot.

And we went through design after design after design after design. And eventually we finally, finally came to this you know to the optimistic role of design which actually could support Uniswap and so Hayden and really the Uniswap team has been like you know very much you know kind of a guy a guiding light for what it means to build a successful application because Uniswap is a successful application that has users. Surprise, surprise. Not like our plasma design. Anyway.

Yeah. I mean, one other fun thing about Uniswap is I think there's this, like, other even deeper rabbit hole where the ideas came from, right? Which is the whole theory of automated market makers, which before was actually, like, backported from prediction markets, right, which is the whole theory of automated market makers, which before was actually, like, backported from prediction markets, right? So basically what happened was that people were thinking about prediction markets all the way since, like, the 1980s and 90s. And then one problem that they faced is, like, situations where they wanted the market to stay liquid even in the face of, like, relatively few users.

And they wanted a way for people who are publicly interested in learning the outcome and willing to pay for it, a way to subsidize the market. And so out of that, there were these ideas that were called market scoring rules that were basically like the equivalent of making an infinite number of infinitesimal bids and asks at every price level, right? And if you actually do the math on this, this just converts into very basic functions. There's one that's called the logarithmic market scoring rule. There's one called the quadratic scoring rule.

And I knew about these because I was a prediction market fan. And then at some point, this idea clicked and I wrote this Reddit post that basically said, let's run on-chain decentralized exchanges the way that we run prediction markets. And the idea there was, well, there were on-chain DEXs before. They used order books. They had horrible spreads.

They were ugly to use. And so let's, like, use this idea of, like, just having an on-chain curve that you can, like, buy and sell along and let's figure out the curve. And then I wrote this post and then about six months later I wrote another post basically defending why you can't like drain the thing of money and then about a year later like basically Haydn came along and like that actually yeah became implemented right and then of course since then like those this and then prediction markets themselves turn into designs where like you just issue tokens and you just have an AMM between tokens so like everything went full circle multiple times I'm sorry I got too markets themselves turn into designs where you just issue tokens and you just have an AMM between tokens. So everything went full circle multiple times. I'm sorry, I got too excited.

But just as all good ideas are recycled, the good idea of building an X times Y equals K market maker was really Vitalik being like, Carl, this is very obviously something that needs to be built, and no one is building this idea that I have. And I'm like, oh, well, I happen to have someone, as you said, who's right there for it. So anyway, good old me. I was actually very offended by the early Uniswap designs, because I was like, oh, my God, these people, they want their kind of libertarian like info prediction market so bad that they're not thinking about the consensus consequences of exposing all this MEV and what it's going to do to validators, stake centralization over time, kind of concentration to places like Wall Street. And I sent Vitalik like a super angry rant.

It might have even been all caps. I don't have it anymore because I used to run my own email server and that got nuked by a third tier VPS provider. But that's its own rant. But I was like, wow, this is horrible for a consensus. How can we advocate this design?

This is literally unlimited MEV per block. The entire liquidity, the entire order flow, it's like, it could not be worse. Can't we do something more like the EtherDelta design with a little limit kind of system, maybe an off-chain component? It's not great. It's a little more centralized, but it's at least how we know how to solve the problem right now.

And it doesn't expose infinite MEV the way this design was. And I think Vitalik sent back one line. He was like, well, we can maybe just consider this fees for users to have their transactions executed. And I was super offended. I was like, what do you mean fees?

Like, how do you extract this? How do you, like, blah, blah, blah, blah, blah. And I think now what we have in production is Uniex, which in some ways was, like, my original suggestion to them to what to do instead. When they launched it, I was like, what are you doing? Like, you finally fixed all the problems with, like, the old design.

It's finally convinced, like, me that it's the right thing. And now you're going back. Like, so, yes, TLDR, I do feel like we're just circling, like, the same four things. We're probably going to see permissionless AMMs come back at some point. This is kind of like a call to the room in various settings, this is my opinion, that are kind of even decoupled from L2s completely.

So sorry, optimism, but it's going to be both. So that's my trolling today. Yeah, so, well, speaking of things going back in circles, that Robin Henson today just, or these past 48 hours just launched a prediction market on aetherium right it's kind of crazy and to think about how the real world is you know impacted well I guess we are in the real world. So speaking of that, I know Vy needs to bounce at some point. Skedaddle.

I have no idea what that is. OK. It's cool kids say that. So maybe I'll leave you with two questions. And the other panelists can continue to remain on the hot seat.

So what are the cool applications? If there are eight, name all eight of them. If there are more that you have recently came to realization, please share them. And also maybe just share your definition of decentralization since we are at the Ethereum decentralization night and leave everyone here with an open challenge. Okay, so for applications, I think, you know, this is the year of caring about users, and so I'll name the last eight applications I actually used.

So number, let's see, ENS, Polymarket, of course. Let's see, Railway. Just like ETH as a payments mechanism okay what else I guess I mean Farcaster yes five that's not an application that's a that's an L2 okay now I'm trying to think five I've I've, I mean, then there's the question of like, are swapping applications applications, or are they infra? Yeah. OK, let's like count them as an application.

I think I'm trying to, OK, I'm trying to remember if I used like Uniswap or Cowswap or Kyber. I think ultimately I used the Rabi interface, and so I don't know. So one-third of a point for all three. Okay, that's number six. Wow, what else do I remember actually using?

Gnosis. Which part? Gnosis Safe? Is that an application or is that infra? Okay, fine, it counts.

Gnosis Safe, okay, that's also an application. And, okay, great, I need number eight. Wow, thanks, you guys are actually, like, that's not an application. Is Dogecoin an application? No.

Okay, wow. It's like, now we're going to ask, like, are meme coins an application? Well, are they? Okay, so is, like, that last round of selling meme coins to pay for charity, like, is that an application? I don't know.

Okay, that's number eight. Okay. Okay, so those are the eight. Okay, definition of decentralization. I think, I mean, when I think about decentralization, I generally think about, like, maximizing the number of independent things that have to fail for a system to break, right?

And so, like, that thing, it could include, obviously, a number of different people that have to collude for a system to break it could even potentially include like geographics decentralization so number of countries that need to go crazy for a system to break or number of companies it could include number of software implementations so I think like number of software implementations. So I think number of things, especially number of uncorrelated things that need to break for your application to break is like the intuition pump, and you can get the different types of decentralization out for architectural, political, logical, and so on out from below that. And last one is a call to action. So I think mine is just like basically, like don't think about what is a mature space in 2024. Think about what is a new space in 2024.

Think about what is in that same situation today that Plasma and Optimism and Uniswap were at back in 2018. What is in that same situation where nobody has any freaking proof that you can make profit off of it? It's something that still appeals to basically computer geeks and people who love math and people who love ideas. But something where if you make the right idea, it is something that is just this missing thing that could suddenly really bring the next level of power to the whole ecosystem and potentially create the next wave of problems. So figure out what it is.

Hopefully avoid creating problems and go and battle it. Do you have any free gifts for unbuilt ideas? OK. I mean, as they say, gift is the German word for poison. So be careful with that one.

Yes, you can check. Look it up. OK, actually, yeah. So OK, gifts. OK, so one category of idea that I think is interesting is, so back in 2018, there was this interesting, there was this like fun application that you could use where it was solving the problem of like getting people to sign up for meetups but like not having this situation where like 100 people sign up and only 30 people come and like you don't know how many people come.

And the way that it worked is like basically you had to put down a deposit and it was like small deposit, like maybe 0.02 ETH to sign up. And then if you don't come, you lose your deposit. And if you do come, you get back your deposit plus a share of the deposits of people who didn't come, right? And like this actually got used and like basically people are like signing up for Ethereum meetups like actually became reliable.

And I'm not sure why people ever stopped using it. It might have just been like crappy UX and crappy fees and problems that don't exist anymore in 2024. So I think that kind of idea is worth bringing back. Another class of idea, I think, is like what I call like multi-commitment mechanisms. So basically imagine like each individual person puts down a deposit, but they don't put down a deposit for one event.

They put down a deposit for an entire class of events that they're willing to participate in. It could just be a list of events. It could potentially be something more complicated, like combinatorial academic fancy people can figure out the optimal version of this eventually, but you could just make it a list at the beginning. And then you could have people that propose events. And when they propose events, then, like, they would also specify a minimum number of people that would need to come.

And then if there is an event that has enough people who have capital that, where they specify conditions that say that they're willing to participate, then all of their deposits get, like, yanked immediately, and then the event gets turned on and it happens. And so basically you have this very capital-efficient way to just very quickly gather up capital for arbitrary events. Could be meetups, could be pop-up cities, could be eventually building entire cities if we have another couple of bull runs. And basically allow this stuff to happen without requiring some centralized actor in the middle to take on all of the risk. So random fun idea.

You figure out if it's like poison or if it's cool. I think it's cool. So enjoy. All right. Well, feel free to skittle, whatever that word is.

But skedaddle. But oh, wait, Jing, you are not done because you're here to scale Ethereum. And, yeah, we have more questions. Yes. So we have more questions about scaling Ethereum for our optimism friends.

So, you know, take a couple steps back. There's a really cool hipster application called Uniswap that Phil does not approve because of this concept of MEV back in the days. And rented as an advisor against building it, but then it was built. And then I saw MEV Auction as the defining early blog post. So how did all of this come together?

Does anyone know where to start? I'm going to front run it to just say MEV Auction is hot again today. It is everywhere right now. I mean, it had a quiet moment, and it's the same reasons it offended me back then a little bit. I'm sorry, Carl.

I love the idea. I just thought the execution was it could be a little more efficient in some ways. It's the same complaints I have with it now. So I'm, again, stuck in the same eight-idea loop. But I think that was a good one it was kind of like the idea of like okay if we do want to have this vision where the MEV is useful and it's not this purely negative thing and it's going to exist anyway how do we use it for something that's actually good or that we like or that like feels good and makes sense and maybe I'll let Carl and Jing speak to this.

Actually, Phil hated it so much that FlashBoss exists now. Yay! So I mean, Meeva, as we wrote about it, is unimplemented. So what is it about the execution that you take issue with, and what have you done differently? Yeah, so I think the hard part is when you have an auction that's happening for something in the future, it's a very different market structure than like a mechanism that's expressing current real-time value as an oracle.

It's like a very different set of actors that end up participating, and it's a very different like way you participate. And my thesis at the time was like it would be hard to like actually play this auction in a way that wouldn't be centralizing to basically the people who control this pot to be distributed, this kind of power in the system. Specifically, there's some recent posts that we have out of Flashbots about a priority auctions and the tradeoffs, how you price them, how that changes based on volatility, based on your signals, based on what kind of trader you are. It gets much more into those questions, which I felt at the time were not answered in a satisfying way for L2 or L1, versus I think the Flashbots philosophy was more like, let's accept some centralization because we need to build something that isn't just like a validator hedge fund, but let's try to get to this economic mechanism that gives us the properties we want, which is kind of this permissionless oracle for real-time MEV, where anyone can come in at any point in the process, whether or not they've won an auction, whether or not they've participated in a previous step, and kind of express their value if the system has time to process it. To me, that's like the holy grail of MEV mechanisms in action.

And if you're excited about that, come see my DevCon talk tomorrow, because it will be featuring that and many other spicy takes. Did that answer the question, or was it unsatisfying? I mean, I have more questions, but maybe I should just go to your talk tomorrow. So I guess a couple more questions here. So why did you guys choose not to build Miiva back then?

And like 2019, 20-ish? Well there was no value to extract yet. So we wanted to build the chain and then, like, put shit on it that you could use, and then there would be something valuable, and then Miva would be more of an issue. And turns out, building the chain infrastructure is actually really fucking hard. And so it's cool that you see all these chains popping up here and there today and that there's so many forks in different companies that are iterating on top of the OP stack with a different set of features or a different set of assumptions or a different proof system.

But the fact that they can do that with the six month development cycle is because we did the six year development cycle, building that in the first place and MIT licensing it. So now the question is we're coming back into the zone, as Phil says, of discussing the same dumb ideas every eight months. But I think we make progress on the ideas every single time they do cycle back around. Yeah, maybe if my hair were longer, I'd have a more cynical take. But I think, you know, now there's value.

And one thing that we didn't expect was that people kind of enjoy running their own sequencers. And so is that like a user research is really difficult to conduct because there's this kind of like sex appeal about running your own infrastructure. Like you show up to the conference and you're like, yeah, we run our own sequencer and people think you're cooler, genuinely, you know? So do people actually want to be running their own sequencers? When our customers propose new features, they're like, yeah, we want to change the size of the mem pool.

And it's difficult to ask the seven levels of why to get to what they really want, which is almost always cheaper fees, more gas, faster transactions. And so, you know, previously we thought Miva would, you know, the assumption that Miva made was that all sequencing rights would kind of accrue in this big pool, like a Bitcoin mining pool, and, like, tons of different miners from all over the world, extractors from all over the world would come and bid on the rights to sequence out of this pool of computation demand. And we're not really sure if that's the case. Different chains want different sequencing policies. It's a lot of fucking work to build out a marketplace and nobody seems to need it quite yet.

So that was quite a journey. Thanks for sharing that. So maybe just taking one step back, if I recall, Carl, when I first met you, you wouldn't stop ranting about the Internet government amongst many other, amongst many other things. Sometimes I forget that, yeah, that was a defining moment for me. And so, also, like, your rapping is just, like, you know, world class freestyle.

That needs to happen at some time. But so what is really optimism scaling? Like, what is the reason why you're still building after so many years? And things are hard and challenging, and eight-month cycles and whatnot. I want to give this mic to Ben, because you have observed this dream or vision coming to life and still going, this journey.

So the question is what are we all building for? I mean, there's a few levels of, you know, it depends on how AI doomer you are. If you take an extreme Carl stance, it's something like, we are in a race to align humanity before superintelligence comes owned by an unaligned human. So there's one answer at that level. I think maybe a more measured answer is that it's about solving the tragedy of the commons within the context of funding public goods.

Jing told a lot of this story before about our early days and our struggles to work as a non-profit. And, like, that's just what we are. We were this little ragtag non-profit group. Like, hey, can you please donate some money and we'll produce, you know, good papers on EtherSearch. And it's very apparent that that doesn't scale.

And, quite frankly, I think if you look at the... you you you you you you you you you you you you you you you you you you you you you

Automatic transcript — names and jargon may be misspelled.