Jinglan Wang & Karl Floersch: Optimism – The Optimistic Approach to Ethereum Scaling (#336)
21 Apr 2020 · 1:00:28
Optimism co-founders Jinglan Wang and Karl Floersch join Epicenter to explain how their nonprofit Plasma Group research evolved into the Public Benefit Corporation Optimism. They cover how Optimistic Rollups achieve layer 2 scaling on Ethereum, how the approach compares to sharding and zkRollups, and the role of aggregators in submitting and finalizing transactions.
Speakers
Topics
Transcript
this is epicenter episode 336 with guests Jin Ling Wang and Carl flourish [Music] hi welcome to epicenter my name is the best temperature today our guests are Jin Ling Wang and Carl flourished are the co-founders optimism optimism is a new company was founded just a few months ago and it's essentially a spin-off of the plasma group so the plasma research was led by this non profit group of researchers and they were building layer to scaling solutions for aetherium and that has
morphed into a public benefit company which is continuing on that work optimism is building optimistic roll-ups as a scaling solution for eath one point X and this could be used in e 2.0 and as you'll hear in sunny and fetes interview optimism is benefiting from the many many lessons that were learned during the plasma era I'm gonna say it upfront this is a pretty technical episode and I'm not the most knowledgeable person about the details of plasma and optimistic roll up implementations but I'm gonna try to sum up the advantages of optimistic roll ups as I understand them so with optimistic roll ups the data is stored on the main a theorem
change so the data available problem that it existed in plasma essentially goes away optimistic roll ups also offer upwards of 100 X in scaling which is pretty impressive now in terms of limitations because the data is stored on chain optimistic roll ups could have higher fees than with plasma since one has to pay for that storage and as with plasma there is a waiting period of about a week in order to exit onto the main chain to cash out effectively and this is due to the dispute mechanism needing time to detect fraudulent transactions just as with plasma here's what you learn in this interview Jin Lang and Carl's background and how they came to work together how the plasma
group and all the plasma research evolved into optimism how get coin funded most of up and the lessons learned from donation funding what are optimistic roll-ups and how they achieve scaling how to make an optimistic roll-up chain optimistic roll-ups compared to other skilling solutions like true--but sharding and ZK roll-ups how optimistic roll-ups fit in the theorem to put a roadmap the role of aggregators and how to become one submitting transactions the fees involved and the different finality levels problems that could arise from mining transactions on incorrect states and who is using the optimistic virtual machine ovm and what's next for the
project as you know I'm organizing reset everything it's happening on April 29th and this is where academics entrepreneurs and thought leaders will come together to discuss the lasting effects of the kovat 19 crisis let me tell you about some of the amazing speakers we have lined up for this conference we have jeff jarvis professor at CUNY and author of what will Google do brian behlendorf cory doctorow Robin Hanson who's been on podcast before associate professor of economics at George Mason University Reva tez senior director of strategic technology in Ephesus at Intel Bryan selcas who was on the podcast recently dr. Yelena Hickman avec who is a clinical psychologist at Georgetown University and an expert on anxiety and the list
goes on and on so to check out the full list of speakers go to reset everything that events and you can also get your free tickets here once again it's happening on April 29th we've all heard of different projects talking about how they recently completed a security audit and sure security audits are important but security should be incorporated into every aspect of your project and your organization so the eath 2.0 spec was just audited by leased authority and leased authority approaches project to reviews from a holistic perspective and they engage with teams on different levels they do one-time code audits digital security consulting and they also do ongoing security support and they cover requirements for each project
by involving different team members to best utilize their various specialized skill sets this is the security by design approach so to help you get into the secure by design mindset least Authority is hosting their first security sessions on April 30th this is a free online meetup where you will learn about the low-hanging fruit common vulnerabilities that you can fix today what a security audit actually looks like from start to finish and exciting developments and blockchain security research you can ask questions to their team of experts security researchers and get advice about the things that you're most concerned about and it's free so to sign up go to least Authority comm slash Meetup
once again it's on April 30th and there will be several sessions to accommodate for all time zones and with that here's our interview with Jin Liang Liang and Carl flourish so we have with us on the show jinglun wang and called flourish who are the co-founders of optimism and previously the plasma group Carl you've been on the show once before and Jing you're new to the show so let's start with you could you tell us a little bit about what your background is and how you got involved with aetherium and in the blockchain space in general I guess I used to be a Bitcoin er but I quit Nasdaq to work on handshake with Joseph poon and he introduced me to a bunch of aetherium people and I was like wow
these people are really nice I don't know there wasn't like a strong reason it just happened and Carl last time you came on you were working with the etherium foundation and can you tell us a little bit about what you've done since then and also how you guys started working together we actually started working together on crypto economic stats study even and then crypto economics that study was an educational resource and kind of went over all of the blockchains fun stuff if two seemed to get a lot of good attention there are a lot of great researchers that were joining Justin Drake and it was like looking really good and so the thing that needed the most attention you know I felt was plasma and so then we started working on plasma group we founded that
together as well with Ben Jones another co-founder and Kelvin and then we you know worked on plasma for a really long time kind of came up with this whole plasma predicate design and then you know was noodling around and figured hmm you know plasma gives us this in its scalability but do we really need that infinite scalability off the bat and so one thing led to another we you know release this whole optimistic roll-up post and is then unipeg and that kind of led to the formation of what is now called optimism so optimism did emerge out of the plasma group and it was very much a non-profit
venture at first and now it somehow has turned into this for-profit thing so tell us about the evolution of the project plasma group was a research group so we didn't want you know profit motives or business models to get in the way of doing the research if you don't know yet what the thing you're building looks like then how can you commit to a timeline and a business model and all that however there are difficulties with being open source nonprofit public good in crypto as you know a lot of people talk about this on Twitter a lot of people have experienced this themselves how do you find a sustainable source of funding and so even though we set out to
solve the scaling problem we ended up thinking a lot and spending a lot of time trying to figure out the funding problem as well there is overlap between the leadership of plasma group and optimism but they are very much separate projects separate entities separate goals but emotionally it feels very similar because of the human overlap we stopped working on plasma group because we did some user testing with I do which is an awesome VC firm and a design consulting firm in San Francisco we got a bunch of aetherium power users together in one place and we asked them look at this really awesome thing we
built don't you want to use it and nobody wanted to use it you know it's the journey to finding product market fit and he recently raised 3.5 million from paradigm and ideal right so basically what's the plan for operating this as business we're still in the process of trying to find product market fit building something that people will actually use with you know a better developer experience than plasma actually talking to more users on the way to building the final thing this time in terms of how we turn this into a business I think it's really important to everyone on the team that this remains always open source and always a public good which excludes a
lot of business model types like SAS or whatever and it's also important to us that this becomes more decentralized over time even if it doesn't start out that way I think me ba minor extractable value oxygens is you know one of the key ingredients that we've been noodling on but I'm sure we'll come up with other mechanisms to sort of you know support me BA or it may be even different mechanisms if we don't have you end up using it but the business model part is not the main thing that we're thinking about at this stage if you're talking about me before lessness is do you mean something like having giving - the right
or selling the right to reorganize transactions in a single block so as to basically is extract like the things that otherwise you know like front runners and so on what if enable tree extract is that what are you referring to that's correct miners already do this on layer one and we're just imposing a harberger tax like mechanism on layer two to just return some of that value back to the users because the users are the ones getting shafted by it how big do you think that value is that actually currently goes to the miners in addition to the transaction fees so can you kind of put a cap on that one of our great friends is Phil dying we have heard from our friends the money that is extractable
from things that are not just plain old transaction fees is actually extremely high some estimate like as much as the transaction fees themselves some estimate even more in fact their instances where in one day there is $300,000 that was you know potentially extractable by miners when we had that whole flash loan fiasco just a few weeks ago so we can be very very high this money should not be just going straight into you know the pockets of miners who we don't necessarily know don't necessarily support the community I'm sure that many of them do and you know my heart goes out to them however I think that the miners would agree that
giving back and kind of supporting the ecosystem by you know we spend transaction fees the money from our transaction fees goes back to be reinvested in the protocols that we use in the not just protocols but in the just general social services that we could create on aetherium so that's like a real just such a potent vision that I cannot wait to see it unfold and I really want this community I want to live in an ecosystem that is self-sustaining and so that you know never again will we have to raise money you know we'll just be living off get coin grants and you know happy happy lala land majority of my time at plasma group was spent finding funding and I
think because you know we have Karl's great track record in the community and rapport with organizations as well as Ben Jones and Calvin it was relatively easy for us to find grant funding but it still wasn't easy and the problem with donations is that it's just not reliable I think get coin is a really amazing distribution mechanism for funding and we're thinking okay if we can rely on get coin as a distribution mechanism can we create like a money out of not completely thinning or but a little bit mechanism a sustainable revenue source there we go as of last episode when Cara was on you
know you were talking about plasma cash and I was kind of following along with plasma and you know I understood plasma I understood MVP understood cash like I'm just a debit and then came all this stuff pause my prime proud my leap I just lost track and could you give us a bit of a catching up on like what was the saga there what ended up happening to the plasma era plasma is dead all the research has been thrown out I'm just kidding that is absolutely false all of the plasma research all of these projects and protocols are alive and well and in fact inform all of the new flashy you know terms that we use to describe our protocols and like little-known fact
for instance Stark where is building a plasma their their whole data off chain and using the snark and then they have a data availability mechanism so the plasma is well and alive and in fact you said leap plasma leap is super cool and almost feels like a you know first stab at the kind of goals that we were trying to tackle when we started talking about this whole optimistic roll up thing because one of the key insights was that okay we really need general-purpose computation we need smart contracts we can't do you know UT exo's we can't like impose a new programming paradigm on developers it's way too much and so we kind of went back and forth looking for
designs they got us further and further along that spectrum to like aetherium normalcy until we realized one a little bit sobering fact about plasma and that is that because plasma has data availability challenges there can be liveness failures that are imposed by the you know the quote operator the main guy in charge or even the consensus protocol if there's a you know 10 Derman consensus in charge there can be aliveness failure it's not a safety failure so it's not horrible but liveness failures break a lot of kinds of smart contracts and so that's why we kind of move towards the roll-up you know the roll-up paradigm
just for the kind of constant liveness properties but all of that research has been used and serves as the foundation for what we're building could you tell us then a little bit about what is optimistic roll-up and sort of what the history is did it is it sort of something that came out of plasma research or is it something that kind of happened in parallel and you guys decided to kind of like jump rails to this one a couple things happened at the same time in the wake of our sobering realization that nobody wanted to use our extremely complex esoteric developer tooling to build predicates custom on plasma like some flavor of plasma that
they didn't understand anyways you know we started talking to a lot of people in this space like dan Robinson Vitalik butyrin and most notably barry white hat at a conference that we hosted called scaling ethereum where we realized that roll up was super dope and that we should think more about it similar concepts have been dreamed up by others in the past notably shadow chains from metallic in 2014 are Bertram was also super early at Felton also in 2014 I think a lot of the concepts that are swimming around in layer 2 are all very similar it's tempting to add a new name onto it because then you feel like you discovered something new but we really
are just renaming prior work by calling it optimistic roll up and building the unipeg demo really catapulted it into hype twitter hype and we named the optimistic roll up our implementation you know optimistic execution roll up with fraud proofs all that fun stuff and importantly smart contracts like it scales smart contracts but since then the community has kind of taken the term and adapted it to mean just generally you roll up with fraud proofs so not everyone who calls themselves an optimistic roll-up scales smart contracts or has the optimistic virtual machine it's a crazy universe out there we're like there's a million different
articles with you know random little different tidbits about optimistic roll-up and one of the known tidbits is I always explain a optimistic roll up to someone and they were like huh that sounds like a lot like polkadot and I was like oh yeah that's right and hilariously you know so like you know crypto kitties is doing a kind of similar kind of roll-up scheme but it turns out that the idea of coming to consensus on data availability first and then building things on top of that this whole like roll-up paradigm that's really where the kind of ideas I guess really were started just exploding right there was so many different ways to use this data availability and you know
there the concept of roll-ups generally at least the term come from Barry White I don't put me on that but I know that Vitalik was talking about you know his whole ZK snark design with 500 transactions per second and so then taking that but there is you know ZK snarks oh why don't we use fraud proofs instead of ZK snarks and so that's the kind of the distinction between optimistic roll-up and ZK roll-up and it kind of was this natural evolution that fell out and you know merged Minimum Viable consensus like all of these different protocols kind of built on the same theory we're deep dive here in a second but can you give us an overview in a nutshell of how optimistic growing up actually achieves scaling the way
that optimistic roll-up scales is it scales computation not data availability and so the base layer the kind of a layer one blockchain is used to post all of the data and that allows us to recreate the head state at any time because we can download the genesis state we can download all of the different transactions and then we can play them and recreate the head state and that's what gives us that liveness property because we always will have the full record of transactions and then on top of that there is you know the whole fraud proof mechanism which is essentially a kind of interactive game which serves as an Oracle to make sure that everyone is downloading and starting from the same correct state and that's what allows you know aetherium to
know oh this coin was burned on this optimistic roll-up and now I should invent something on the theorem so could you walk us through how does optimistic roll-up work what are the steps involved like how do we make an optimistic roll-up chain the first step is deploying a smart contract which has the kind of optimistic roll-up Genesis state built into it it says this is the first state and then the second step is someone posts transactions to a kind of a smart contract that serves is just a log of what transactions have happened they don't store information the actual transaction data they store kind of an accumulator of what transactions were
added so you start building up this list of transactions and then once you have a list of transactions you play an interactive game to determine what the actual state resulting state of applying those transactions is and so you can generate this you know this head state and so someone submits the transaction and then it could be the same person it could be a different person submits a state route which is a kind of claim that this is what the state is after applying that transaction and then you wait a while and this is optimistic roll-up notably so in Zeke a rollup is even simpler you literally just post the transactions you post the head state and you prove that the head state is valid then in optimistic roll-up it's a little bit more complicated but it actually has
some great benefits you post the head state and you wait a timeout so you wait a week you wait a day and you say okay well if no one has proven this head state wrong in that time frame then I'm just going to accept it as fact and so after you know the timeout period that state route becomes finalized and you can you know move on with your life and you can use that head state to for instance withdraw your coin and so you what you do is you get the kind of availability properties the liveness properties of aetherium and you also get the you know safety properties of aetherium assuming this interactive fraud proof game plays out correctly it's relatively simple and the only
difference between this and plasma is that in plasma you don't post the transaction data on chain that's it is this sort of similar to like true--but I remember and true--but we're like you know there people would post these like computation that was supposed to be done on chain and then you had someone would go ahead and post a solution and then there was a challenge period so is this sort of basically using true--but to build a chain essentially and that's why I was saying plasma leap is like especially interesting because plasma leap was building a true bit like interactive fraud proof game for arbitrary computation and they're just using plasma which had that like liveness
failure you know difficulty but yes it is like true bit in that it is a kind of interactive game which evaluates the validity of arbitrary computation but in particular our kind of what we call the ovm which is the way that we run this computation in a way that is fraud provable right that is compatible with fraud proofs this ovm actually doesn't share a lot of similarity with true bit because in true bit you have to implement a kind of machine virtualization scheme and you have to have this interactive fraud proof game and it's extremely inefficient to play the state transitions on the main chain using a kind of machine virtualized virtualization layer this is I will go
into the too much detail but we instead with the ovm built something like docker which is you know much more efficient and allows us to kind of break instead of segmenting up our computation into like computational steps we're segmenting up them up into transactions that are just normal aetherium transactions so it's much you know lower granularity we'll come back to the ovm in a second but let me unpack this first so we see the way that I understand optimism now and the way that it sits on layer one is that basically our data is posted on a theorem layer 1 then computation is conducted off chain on in layer 2 and then basically the results are posted back to layer 1 so it seems to me that in plasma putting our
data on Shane was always considered infeasible so why has this changed like largely the reason was just was promised billions of transactions per second trillions of transactions per second and the reality was no one needs that much speed and you can actually do the calculations and you get like you know thousands of transactions per second using Optimus to grow up and so at that point it's like who cares if you have so many transactions it's just not an issue and like we all we need a hundred x scalability increase we don't need a million X scalability increase at least right now there are some
applications that do need that level of scalability there are a lot of teams working on that you know like crypto economics lab is looms still doing plasma I don't know o Mesa go a lot of people are still working on it if you have like a custom chain for your specific decks plasmas great I think a lot of people classify IED X's optimistic roll-up as more of a plasma and it seems to work really well for them so no shade it's just that no one wanted to use our plasmas how would you describe how this is different than sharding because this sounds to me to be very similar almost I mean it seems to be what sharding was at least from when I was really focused on sharding maybe like two years ago this seems to have
accomplished that what separates this from what you know maybe eath to call charting or a polka dot call charting and whatnot so I think I was the most annoying person at the most recent like III search you know jam session there was this big little event because I went around to every researcher and I was like hey I just realized this roll up stuff and the sharding stuff seems really similar I have a roll up design that is so stupid is it a shard and the role of design is literally you put the data on chain and then you evaluate the state-transition on chain but you do them in separate steps and I'm like this has the exact same liveness and you know validity properties as aetherium is this a shard
I don't know and so you know how it got into a bunch of debates but I think there is at least some consensus that depending on how you use the term roll up roll up is very close to synonymous with shard it's a little different you can like come up with distinctions all of these names are arbitrary but if someone were like oh that's a rollup or oh that's a shard they have such similar properties in effect there's asynchronous communication between different roll-up chains right there's de synchronous communication with different charts the distinction is is not very clear and that's a good thing because it means that the technologies that we're coming up with are kind of coalescing around similar designs but in the long term
what we're probably sees we'll see like shards are the you know this one level of abstraction that people will use Owlman on the shard but then they're going to be inside of that shard inside of a rollup so it's all probably gonna get a little messy why aren't we done with charting then like you know I used unipeg which is the demo you guys put together and it seemed to work so why is like roll-up not part of the current eath - roadmap it is very much part of the current youth - roadmap and in fact the designs with roll-up have heavily influenced where the you know the direction has been going like people have said that sharding phase one is just like the roll-up chain you know phase essentially and people it's just
thinking oh Vitali would be totally fine if we got to eath to phase one and then we had a bunch of big roll-up chains and we called it called it a day that's true don't toast me for other people but like no one what I'm trying to communicate is like no one is particularly attached to the kind of evolution of this organic system and I think that we will be building eath - and we will be you know building these shards and building these roll-ups all at the same time and we're just gonna have to watch it all play out and watch everything happen like I think it's they're all fighting for the same cause I think it all depends on timing
like if East - phase one comes out and that skills data availability and optimistic roll-up not only gives applications like the composability and interoperability they're used to but also gives these shards native smart contract support and it ready at the right time then I'm not nice to researcher or implementer but I don't know if that scales aetherium then why you know go through all this extra legwork to build native smart contract support in a different way also super bullish number of italics estimates of roll up TPS on least to phase one is a hundred thousand transactions per second and right now we're hitting we'll say two hundred by the way there is one
thing that's notable and that is eath to provides two things in phase one it provides data availability kind of guarantees certificates right the other thing that it will provide in phase two is data is state transition validity certificates or you know guarantees so it's a you use the consensus protocol to know that data is available in phase one and then you use the consensus protocol to know that data is valid in phase two and so this is not to say that if two kind of data validity you know guarantees are not useful in fact they are extremely useful and they may be the the easiest way to get the highest level of you know immediate
guarantees of data validity but there's also an alternate universe where ZK snarks or whatever just become just incredibly efficient for arbitrary computation and we just start proving everything upfront and using the data availability layer you know just pretty heavily but not the validity layer we'll get back to this later but for now I'd actually like to understand how the rest of the protocol works so I understand that the data availability is solved because the data is available on the main chain so how do the fraud proofs wack so they see how do I make sure that the computation that is done off chain is actually valid the way that it works is we have something called the ovm so the optimistic virtual
machine and in fact you could call it the AVM which is like optimistic aetherium virtual machine because it is and it is basically you know an EVM and so the way that it works is actually very simple what you do is you initialize a priest state it's almost like a stateless client if you have and to know what this is but you initialize a priest state which is the you have a state root and then you prove a few storage slots in that state root and so you have the kind of current state of the chain and then let's say someone committed a state root the next state root the post state root and they committed it incorrectly it was invalid so the way that we prove that it was invalid is the stupidest simplest way
possible we literally prove that it's invalid on the main chain by doing the computation itself so you just load up the pre state take the transaction play the transaction on the main chain do a bunch of computation and then output a post state and then check to see if the post state root equals the post state root that was committed and that's it extremely simple so how expensive is this to sort of rerun a transaction on chain cuz I my assumption was that you know it is always assumed that that was a relatively expensive operation it is in the normal way that one would do it however we do have a very nice scheme
which is kind of borrows from docker so the way that docker works is essentially it creates a like containerized you know set of storage and variables and you know directories and so this is very similar we get to like create this like container of contracts and then what we do is once we have the container of contracts we can literally just proxy all of the calls to make sure that they stay within that container so we have two kind of key components that that enable this is we have a purity checker on chain so make sure that the contracts that you're running run through this
purity checker and all of the opcodes are going through our kind of execution manager and the execution manager is making sure that everything is routed to only contracts and only storage that is you know relevant to the fraud proof because you don't want to like reach outside of your container and you know touch aetherium state because then you can kind of get a virus you're like you know polluting your info so we create this you know containerized thing and so we actually only end up adding with this and a transpiler that we have written that turns your solidity code into solidity that kind of gets routed through this system we won't we add you know let's say it's something like a 20% overhead to s loads it's you
know pretty pretty pretty solid and even in our unoptimized version we have something like a hundred thousand 50,000 gas added for the kind of initialization step of you know running these transactions so it's actually not so bad and then you can use this as a foundation for even more optimized fraud proofs but it's not worth going into those sorry so just sort of make sure I understand this correctly so what's happening is let's say I deployed a specific contract on the ovm like on the on this like optimistic chain are you saying that like I basically also deploy the same contract at the EVM layer and
so how we do the fraud proof is when we need to verify this contract call I you instead do it run it on the EVM like on the base chain rather than like kind of doing every step by step like your bit did you just like have the same contract on two different spots is that am i getting the right idea here exactly and you have to initialize the state so it matches it perfectly and that's the this is the most naive version there are optimizations you can make cut it down even further but in a sense yes code merkel ization etc so does this mean that this would only really work with like the EVM like because let's say I wanted to do II was um based ovm right the problem is how would I run how would
I run II was um on the base layer EVM exactly and this is why I kind of called it a like a via like the OE VM because in its current instantiation it is an EVM you know optimized system you know of course the same techniques could be used in you know uh I mean if we had a ewaz and base layer right but the right now this is just EVM focused I've tried following the ERC 20 demo that you guys had and here I works pretty smoothly to be honest I'm not quite sure what I did but you know I followed the distract directions and all the tests fast understanding is is you
know bit of a harder problem but it was pretty cool like you know all I had to do was just change like okay look I instead of compiling using the normal Saul C compiler I just pointed to your compiler and proof I suddenly have magic scaling does this mean I can do this with literally any contract or are there like limitations are there like certain types of contracts that are not going to be portable there might need changes or lit anything literally any solidity contract portable in this way we're pretty much one-to-one compatibility there's some like weird things like block cache block number timestamp that like have slightly different behavior for a very strange technical reason static call has a slightly different behavior but it's almost one-to-one and
that's that's because we're doing this really crazy docker eyes tack cool but eventually like you know what once this thing is out of alpha or whatnot it should be every contract can I copy the entire state of like the current a theorem chain onto the ovm chain if I wanted to we're thinking about like customer acquisition or adoption or whatever you call it we're like oh how do we get all these companies to migrate and someone was like oh you just you know put up a bunch of hackathon prizes for people to clone popular aetherium projects onto optimistic roll-up so yeah you could so the computation happens off chain it's done by so-called aggregators right so
what what exactly is it that an aggregator does and how do I become one that is a great question the in the most plutonic form aggregators submit state routes that's all they do and they have a bond and if they submit a state route that's invalid their bond gets slashed note that anyone can submit a transaction it's just the people who are testing to the state those are the aggregators and they can get slashed however in our you know in the way that we are doing it we are using Mema and so in me of O we actually have what is called a sequencer and the sequencer is it kind of like privileged aggregator and what they have the the right to reorder transactions for a short period of time so like 10 minutes
or so and they're also probably going to submit a bunch of state routes so the aggregator is all you need is a bond and a computer that is that can run it and in you know what we're building you have a sequencer and for that you need to win the ameba auction so we see if I'm an aggregate and I behaved maliciously I'm slashed so I have to put up a bond how large is this bond in houses determined because in principle if I'm in aggregate and they act maliciously and I want to censor certain transactions I want to prevent certain things from happening it's very difficult to actually put a price tag on that right absolutely so in the Wow I'm juggling to do two different approaches but they're one one approach
is the kind of the simplest which is you have these you know Vitalik wizard two like 10 10 eath bonds or something like that something really really small on a per state root basis so you know each state route you submit is you know you have a ten each bond the the kind of designs that we're moving towards these days is we're kind of interested in having a much larger bond and a kind of single sequencer that has a really large bond that is doing most of this State Route proposal and the reason why is because we end up seeing in practice that there's really only one aggregator that like wins the race to the main chain over and over and over again and people kind of coalesce around it and so
instead of building a solution that kind of like tries to ignore that fact we're trying to build the incentives around that fact to then you know make sure that everything you know the the incentives are still aligned in that context and that's why we have this home Eva so it's the aggregator then in a sense and operator like you know an operator you would have on a plasma team they are similar except they cannot cause liveness failures of you know at least in the sequencer you know model of more than 10 minutes and it's not even a liveness failure in me kind of in some sense it's liveness failure in that you don't know the transaction ordering but you do know your transaction will be included now I want to look at this from the user
perspective so basically I want a transaction included who exactly do I submit it to do I submit it to that single aggregate or is there full what's the limit so is it more bandwidth limit or of a computation limit yes so the you submit it at first you submit it to the sequencer and you probably will want to submit this in a commit reveals you know using a commit reveal scheme so you send them the the contents of the transaction in a you know encrypted version and then you send the key shortly after once you get a guarantee that it will be included how it is currently done in our implementation that is correct cuz that's hard but this is definitely the the form that you know it needs to be
and then if that does not go through you can submit it to a kind of backup aggregator if you want but the most reasonable is just submit a transaction to the main chain and the transaction can be anything arbitrary it can be you know get me out of here it can be you know any number of arbitrary state transitions the point of the priority aggregator is to get the instant transactions you don't have to come to consensus on the ordering of the transactions which is super fast but we have this like backup free-for-all you know mechanism as well for censorship resistance so I don't know I don't think we actually expect anyone to be using it unless the aggregator these
sequencer is misbehaving okay and basically the aggregator gets some sort of kind of the transaction fees or similar yeah also they you know have the very profitable ability to actually order the transactions which is you know the dark money that miners make on ethereum that people don't talk about and we're being very explicit about it in layer two we know it's gonna happen you can't prevent it I mean you could but it's hard and so you might as well you know allow them to make money for it and pay a fee for the privilege and how does this relate to the layer one fees you pay layer one
fees as well so you the the sequencer is receiving these transactions they have a transaction fee the sequencer is then using a varium these sequencer is paying gas on the theorem but the gas is a very small fraction of what the gas would be if it was played on aetherium okay I get that so now I submitted this transaction it's been included do I get finality ah so you get an instant economic finality or you know crypto economic finality that is what it has been called but that is not the strongest form of finality so that is good enough for you know relatively small transactions medium sized transactions if you're you know spending a few million dollars buying a house then you'd want that you know this
the sequence our bond to be absolutely massive and so this is you get a kind of instant you know medium level guarantee but and then you get you know full if you're in finality after you know not just one block confirmation but you know eight or you know forty if you want so how does it look like for basically why do I get different finalities for a small and medium and large transaction so what determines that this is a kind of like the nature of you know consensus protocols in this like decentralized setting where even in you know if two and sharding you're going to be getting these like quick guarantees that are you
know pretty strong but then as time goes on it gets stronger and stronger and stronger and so the the reason why you get this instant guarantee in this case is because the sequencer will send you a signed promise and the sign promise will say hey I will include this transaction and I will not just include it I will include it in this order and I will you know I guarantee that this is the state route after you included this transaction and then I will see that and I will say okay well if they lie to me I can send a transaction to maintain etherium that will get that bond slashed and you know a portion returned to the the prover but a small portion so how do you deal with ryoga's then I mean I assume there's two kinds of Ryoka so
there's ryoga's on the layer 2 and there's ryoga's on the first layer so how do these interplay and do they kind of mess with my finality great and this would mess with your finality if you did not have a kind of priority queue and so the priority queue is saying okay we think that the sequencer will be able to get their transaction in before all of these different aggregators within some time frame and we'll give them a kind of buffer so not only will they compete on you know the gas price auctions and they can win those gas price auctions but they can also just get a kind of head start I'll get with you know versus all of the other aggregators which may or
may not even exist and then you can parameterize it to give different levels of cushion for the sequencer but you don't want to give them too much cushion you don't want to give them too little it's kind of a game of parameterization what are like the sort of cusp points of finality here well there's one where when you get our signed response from the sequencer then there's like another one when the transaction first makes it onto the chain and then there seems to be another one when the challenge period that gets like you know you're finished with that but between that second and third one does it sort of increase in finality as more blocks are built on top of it or is it sort of flat and then a sudden cliff
that is a great question and a very astute it accurate a kind of description of it so yes those are essentially the cliffs and it's when it hits aetherium and then gets mind a little bit there are different ways to kind of parameterize the you know optimistic roll-up finality window stuff some of them are more gradual in their increase ours is more kind of sudden in that you get like this really really strong you know very large bond immediately once it's been finalized on etherium and then the most important is that you know one week later one day later you know depending on how you parameterize it could be three hours later and that is when you can withdraw from the chain so
this is this is what theorem uses as their finality window and so that will you know give us that's the the withdrawal limit time limit if I submitted a transaction and that the the transaction is in a block that then becomes slashed for whatever reason so basically there was a fraud in it or whatever so I assumed that my transaction gets reverted as does any other transaction in that block and any block that follows on that chain so what happens then ah this is actually what you would intuitively think but is not the case so the way that it works is instead there is a single list of transactions and that ordering of transactions is final right it is
deterministic you can always compute it and it is recorded in aetherium so it's as final as aetherium is and the state route is what gets reverted so the claim about what the transaction did is what gets reverted it's not the transaction itself so you just make a new claim about what the transaction did and by you I mean the sequencer the aggregator a random you know ether scan is your system sort of like smart enough to tell between let's say like you know I sent a transaction to Alice and then you sent one to Bob it turns out my transaction is fraudulent and yours came after mine there's her system automatic like when you do the State Route does it
automatically in that like invalidate all the transactions that came after it or because like you know a sort of an EVM and it's really hard to do sort of like a deep analysis to figure out dependency graphs or is it actually smart enough to know like only invalidate the transactions that would have been impacted the thing that you said and I'm not sure I'm not sure if I misheard but it sounded like you said fraudulent transaction like a invalid state transition so so the the intuition is that in etherium if there is a you know transaction right and there's something that you know something bad happens it just reverts right and so that is the same way that we calculate
all of these you know the state transition so just like there is kind of only one true state route because etherion because the EVM is deterministic and only you know this transaction will always yield this result you know based on the previous state route there is only one possible future that it could be what I mean more is like let's say so there's this list of transactions and I claimed it had some state route but it turns out the state route I claimed was incorrect because I improperly executed one of the transactions in that list are we going to now assume that all the transactions
that came after that improper transaction is are we going to still execute those yeah how are we gonna do that exactly great so we will not only execute all the previous transactions we will also execute the transaction that the person claimed the invalid state route about we will always keep the same list of transactions so you have pre State apply transaction please state post state apply transaction couldn't this be problematic where let's say let's imagine like sort of a yuna swap like thing where like the the person who the note I'm relying on the sequencer told me the state is one thing and then I run
a transaction because I you know think it's a good trade to be making but it turns out they were lying to me and they actually you know the state was something else and I and they tricked me into running my transaction on a state that I didn't want to run it on yes and so the way that you get around this is you have multiple people who are running the transactions that transaction log independently off chain and you can ask them what happened so you don't necessarily just listen to the sequencer you get the sequencer and you're like okay that's a that's a pretty solid guarantee but you know maybe they've lied lied in the past or maybe you know their bond isn't high enough for your transaction and so you decide okay I
want it I want more confirmation so you wait a little bit and you wait for the transaction to be posted into the canonical transaction log once you're in the canonical transaction log you go to ether scan you go to you know coinbase you go to any any number of kind of what crypto economic like client providers and you say hey what is the state at this moment in time and they'll all give you a return value and then you'll say oh are all of these states equal oh no this one's not you know the one that I received from the sequencer is not the right state route let me go punish him and that goes for anyone who gives you a state route you can post on Reddit say hey you know I'm gonna slash your reputation by saying you just gave me the wrong state and this is this is how
you get a kind of you know this is the good thing about having a canonical log of transactions that's publicly viewable on aetherium so going back like you know when you mentioned that sort of italic mentioned said that oh you know a rollup shanking it maybe we get a hundred thousand transactions per second what I don't what I'm trying to understand is why a single roll-up chain would be particularly more scalable than a single root chain right you know you're still trying to shove all the data onto the chain I mean it's in called it that talks um one thing I think we made not have cover it specifically was that the transactions were putting on our call data rather than in state so that that's where the space savings come from but yeah so we're still putting all the
data on chain and we still need many people running these transactions so we can't look unlike plasma we can't just assume that there's like one person running all the transactions and so I understand we get scalability from having many roll-up chains but how does one roll-up train give us particular scalability this is a great question so the easiest answer is in Zeke a rollup read Zeke a rollup you have one big chain and you prove all the state transitions upfront and so that just means that you you know all of the state routes are valid and immediately and you what you do need though is you need someone you need to hope that someone is running the chain and has access to the current state right
because if there's no full nodes if it's only enough compute for one full node then you're kind of out of luck and that is actually the same in optimistic roll-up so you assume that there exists an honest full node it's this like single honest full node assumption and the honest full node is defined by a full node that runs all the state holds all the state runs all the transactions and will submit fraud proofs and so that's you know you you can skip the submitting fraud proofs in in Zeke a rollup but you know that that has its other downsize so why is this like feasible why is it you know we could we could you know start going you know I don't I don't want to name other block chains but many other block chains solve scalability by just like beefing up
their nodes and saying oh we have more transactions per second like what little known fact Agathon's at about 4% its capacity so that's like we could scale a lot just today however the important thing to note is that when you have a one honest full node assumption that is very different from a honest majority assumption like honest majority of hash rate right if we expected the honest majority of hash rate to also have the massive you know large computing power of one of these full nodes that would be infeasible because you would need so many computers all over the place but if you a hundred you know uh you know a hundred full nodes and they're all pretty beefy
then you can safely say okay I think at least one of those is going to be honest hundred is just not you know not enough for a big proof-of-work chain like aetherium and you know even when it moves to proof of stake it you know is going to be thousands and thousands of validators so Yuri started comparing optimistic roll up with with seek a roll up that that the computation that you are actually bringing back on Shane the result that you're bringing back on chain is actually the correct result so is that inherently superior to optimistic roll up we still have to deal with fraud proofs and where you have this latency period where you can't be sure that things actually get executed
the way that you assume I think superiority is in the eye of the beholder it's secure from mistake I mean its superior from a security perspective its superior from a lot of perspectives but optimistic roll-up is easier and it's further along maybe you could even say that optimistic roll-up is an MVP 4zk roll-up proof of concept I don't know you could go that far I think it's superior so so if it's an MVP for you guys are you guys also working on TK roll-ups we are not right now because ZK roll-up fundamental research is not capable of building EVM style smart contracts and it's going to take a long
time for that to be the case but once it is the case absolutely you know we'd love to use that research to scale aetherium but we need to scale aetherium ASAP and the security properties of optimistic roll-up are very very good and like they're they're essentially comparable almost equivalent to ZK roll-up and so because they're in the same kind of ballpark but optimistic roll-up is way further along from the smart contract side that's what we're starting out with I think there's also a question of like superiority and usability like yes it is a headache that you know there's this one-week waiting period to withdraw it at the chain you can have you know hacks like economic fast withdrawals where you
the time value of eath pay a small fee but I think that it's also important that with optimistic roll-up you keep the solidity the Viper development experience you don't change that much like the tutorial you did Sonny you get to use waffle truffle you know open Zeppelin the graph all of the things you know and love as I understand it I may be wrong with zk roll up you have a different programming language you have to sort of on board there's a there's a learning curve but yeah you don't have to understand how are you works to use it so the ovm is sort of like the killer feature of the optimistic roll-up absolutely quite so as anyone else
working on an optimistic rota yeah there is some really brilliant researchers at fuel labs Nick Dodson and John Adler maybe McAra is also working on it she's an amazing researcher who dropped out of university recently to go full time into crypto r Bertram is working on three scaling solutions one of them is an optimistic roll-up esque saying that team there is incredibly legit it is the most stacked team in crypto stephen goldfeder Harry collage nur ed Felten and recently they just hired Daniel Goldman there were a lot of really smart people working on optimistic roll up and its various flavors am I missing anyone oh interstate interstate network the
former CTO of idec's and I haven't met them in person so I don't know them as well and Andy and Dylan I think I don't know their last names but you should check them out cool so now that you guys have sort of done the uni Pig demo we had something running the ovm alpha is out what are sort of like the next steps for you guys what's next to see optimistic roll about in the wild we are testing popular smart contracts running them through a transpiler just you know hardening the ovm debugging building demos the unipeg demo was great but it there was a lot of
custom code written for it it wasn't you know this it wasn't a general-purpose solution and so this is really the first general-purpose solution that we've created yeah just like next steps hardening I think that the development cycles for infrastructure are much more similar to Hardware for example where you know mmm VP might take six months or a year to create as opposed to like consumer applications or financial applications where the mock-ups and the pocs are much shorter oh yeah we are we're working on a demo with synthetics exchange the community there is nuts like they have such an awesome community the team is
also incredible and we're grateful that they're risk tolerant enough to want to do a demo with the ovm alpha but yeah that should be coming out soon TM cool awesome well thank you guys both for coming on the show and educating us on the state of optimistic roll up and ovm and everything and super exciting I'm sure we'll have you guys on again at some point when optimistic roll-ups even further along so thank you guys so much thank you thank you I love epicenter thanks for coming on thank you for joining us on this week's episode we released new episodes every week you can
find and subscribe to the show on iTunes Spotify YouTube SoundCloud or wherever you listen to podcasts and if you have a Google home or Alexa device you can tell it to listen to the latest episode of the epicentre podcast go to epicenter TV slash subscribe for a full list of places where you can watch and listen while you there be sure to sign up for the newsletter so you get new episodes in your inbox as they're released if you want to interact with us guests or other podcast listeners you can follow us on Twitter and please leave us a review on iTunes it helps to be behind the show and we're always happy to read them well thanks so much and we look forward to being back next week [Music] [Music]