What You Really Want to Know about the Current State of L2s on Ethereum
ETHBarcelona Talks · July 2024 · 32:38
Bartek Kiepuszewski gives an overview of the current state of layer 2 networks on Ethereum. The talk compares how rollups differ and what users and developers should understand about them. It aims to separate what matters for users from marketing claims about each network. Presented at ETHBarcelona.
Speakers
Topics
From ETHBarcelona Talks, hosted by ETH Barcelona.
Transcript
okay guys I think they're all set we're going to bring up uh the final speaker he's going to talk about what you really want to know on the current state of l2s on ethereum I hope I pronounced his name right put your hands together for bark kipushi okay so um my name is bark and uh I've been working uh uh for in ethereum ecosystem for The Last 5 Years uh the last two years mainly on inter and scaling and um two years ago I founded L2 beat which is like a community watch doog for all L2 uh things and we'd like to think of ourselves uh as a group of
people that make uh L2 operators accountable for what they do but we also uh want to make sure that you guys as L2 users and I'm assuming that at least some of you are just L2 users uh that that you should not be scared of these constructions and you should really understand the security trade-offs and the trust assumptions so um I'm don't know what is your personal experience but you know I can definitely appreciate that uh sometimes when you talk to the professionals the experts uh they will try to uh tell you about uh I don't know the prime Fields goldilock uh uh proof aggregation proof composition
uh maybe power of to trusted setup and whatnot and uh you know eventually I mean you will get confused you know unless you're professional unless you put 100% of your time and maybe even overtime into this field eventually they will get you lost right and when they do you feel kind of hopeless a little bit uh and and then you you just stop caring right you just okay I mean let me ape you know my my funds into into whatever uh and this is not good right this is not how uh we want you to think about these constructions but the truth is that uh the way the ethereum scales is technically very complicated and there is just no other way around it you know
I mean it's a it's a very nasty business to scale blockchains uh so that they actually stay decentralized uh and unfortunately for a lot of users uh they end up in some sort of a trusted setup like you know they choose I don't know things like revolute or maybe you know some other you know different providers and uh and they just uh give up the whole idea of self sovereignity right so what I want to do in this talk uh essentially I want to give you a very simple mental model which may not be 100% perfect uh but I think it's good enough for you to actually get some sense out of uh all these constructions and to evaluate or
to ask yourself you know do you actually trust all these teams uh um and maybe the first question to ask yourself is like why do you actually care why do you use defi in the first place because if you're only interested you know in in I don't know speculating on some crypto assets or whatever then maybe a centralized exchange is good enough for you uh and maybe you know it's important for you to uh to give you access to some Financial products that are normally restricted uh to accredited investors or whatnot right um for me for example it's very important uh to make defi operators accountable so that I can actually see when I'm evaluating the smart contract
code uh what exactly is happening behind the scenes because you know I don't trust anyone right uh I mean you've all seen what happened with centralized exchanges you know how they used funds um and you know this is not what we are trying to build um but I think what is most important is that you know you start to think about uh self- custody right you start you you have to like kind of think about like I'm really the owner of my funds and why why this is important well think about the typical experience uh in a theme park or maybe a theme park maybe it's not like the best example maybe a better example if is casino
right um when you go into the casino normally for some reason they don't allow you to use your cash you know you have to buy chips right to play at the casino um I don't know why actually but you know assume that you know there is a reason why they actually prefer you to use chips right so so you go and exchange your real cash into chips and then you spend you know a few hours in a casino and hopefully you may end up with more chips that you entered right and and then you know there's this Moment of Truth uh will they actually exchange your chips for the cash because if they don't then you know these chips are actually worthless right this is just plastic uh and in fact you know when you
use l2s in a way um the experience is somewhat similar you have funds on L1 on ethereum and you want to move some of these funds to L2 uh so that you have access to cheap uh defi applications because ethereum is too expensive right so so essentially uh you're using these applications on L2 maybe for months and then you want to get out uh for whatever reason you know maybe you know you stop liking this L2 maybe you use these funds for whatever else uh what you really want to do is to make sure that you can always exit and and I think this is most important because you know if you can't exit for whatever reason uh then you're
not in control of your money right so this is the experience of a friend of mine in a traditional Finance I mean nothing to do with blockchain maybe a little bit right who has heard about n26 um yeah some of you right this is a well-known German bank that's you know like fully uh internet fully online and apparently it's crypto friendly as well they advertise that you can buy uh uh 200 coins whatever uh but the fact is that you know I I I mean this is the true story right you know it's not made up uh so a friend of mine had an account with them and then few months later and truth is you know uh he used this
account for also jws from the crypto exchange and then that he got this letter like literally for no reason right you know they uh Frozen uh essentially his account uh and the the worst part is that there's no way to find out why right it's literally a letter hey your account is Frozen and and we can do it just check you know the fine print in uh terms of conditions right like who's reading these like literally no one that I know know right it's a way too long document uh they can freeze your funds and then and then you I mean there's this dread you know will you have access to these funds maybe you will maybe you won't why they refuse you
to tell you why and this is the worst part of the story for me you know it's that the process is completely opaque it's not transparent and if you lived through this experience you really want to make sure that if you have funds like crypto assets this is not what you want to see in your email right and obviously if you put your funds into a centralized exchange I mean this is exactly the experience you may have if you put your funds into a rollup or into L2 uh you want your experience to be different and and when you think about it what does it actually mean you know for the experience to be different I think there are two main Concepts that you need to understand and that is of safety El
liveness uh safety understood as the operator uh of the rollup cannot steal your money right like remember your real money is still in L1 it's just sitting there in L1 waiting for you to get out now if that money can be stolen by the operator then obviously this is not good right and we say that the system is safe when the operator the malicious operator cannot steal your money that's yours in the escrow now the second property is a little bit less understood in my opinion and that is over liveness and that is essentially uh a way for operator to to
freeze your money by um not processing your withdrawal request right so that would be the equivalent of you say having money in binance or whatever and you're trying to withdraw and suddenly you've got this you know message that withdrawals are halted and you cannot withdraw your money right uh so they're not stealing because presumably they can't do that they're just censoring your withdrawal request so you want to use constructions that cannot sensor you and I'm going to talk a little bit more about that you know what it means in practice but I think that your mental model should be very simple uh they can't steal your money and they can't really freeze your money by by censoring
or or just ignoring your withdrawal requests right I mean it's not a very difficult mental model I think uh and that's it to this you know there's not much more frankly uh turns out it's very complicated right both properties are actually technically very complicated uh to achieve and and how they are achieved you know I'm going to like spend a few more minutes to tell you about it but uh you can be assured that you know what we do at L2 beat we essentially we're jumping into every single Rabbit Hole uh that you don't have to do it right you know we check for safety we check for liveness we even uh develop um uis that allow people who cannot withdraw uh they
allow them to interact with L1 smart contracts so they actually can withdraw if the withdrawal request is being censored right so you know we are essentially uh helping the community to uh to actually use all these constructions uh in the way we believe that you know they are intended to be right uh and in our opinion they intended to be trustless you don't need to trust these guys and this is one of the common myths that you know a lot of people think that if these operators are running let's say centralized sequencer that clearly that's a problem right uh because clearly centralized sequencer um can do anything but the truth is that
you know they can't right even though if they're centralized they cannot steal your money and they cannot block your withdrawal request so why does it matter that you know the sequence are recentralized right um and let's have a look first at the safety so the safety essentially means that uh like I said before the rollup operators cannot steal your assets and there are two different uh approaches uh you probably know that right there isus a pessimistic approach uh which ZK rollups uh use and essentially what you want you want ethereum uh which is decentralized which is permissionless and blah blah blah right it provides you with a great economic uh security you
want ethereum to validate every single uh L2 stat rout and why do you want to do that because operators can steal your assets only if they publish an invalid State rout right uh they tell ethereum that it's not you but someone else that owns the money and this is how they steal right they essentially uh say uh you're not the owner of your funds it's me who's the owner of the funds that's a theft so you want ethereum essentially to validate all these claims and and this approach uh when you think about it because you have to validate every single L2 State TR like let's say every I don't know five minutes maybe
every 10 minutes right that sounds kind of expensive because you have to pay ethereum in gas uh to do that uh but in fact it scales great because the validation uh is actually much much cheaper than the execution of the L2 block I mean this is the alternative right to reexecute the L2 block and to find out if the L2 State root is actually valid um the major problem with this approach is that if there's a problem or a bug in a proving system then essentially you know that's a huge issue right uh and then the alternative is the optimistic approach you want ethereum to validate till to stay through it only if there's a dispute and hopefully that never happens right like arbitrum and optimism two most
well-known optimistic Roll-Ups in the production I mean they've never had a dispute uh and they've been running for like two years or whatever right so like you know you may Wonder like what the heck is ethereum even doing there uh it's not checking anything but you know the truth is that this is this is the promise of the op optimistic approach so it seems cheap but the question is is there anyone watching really right is the system truly trustless um what would happen if there was a dispute uh do you really trust that you know something would happen and ethereum actually would adjudicate the dispute um so so this is uh the page taken from L2 beat uh from the risk analysis you can see all the
rollups over here and the column called State validation essentially talks about the safety it talks about how uh we make sure that the L2 stats are being validated uh what kind of approach is used and we intend to uh to to essentially give even more details but what you really want to see in this column uh is some explanation uh how ethereum makes sure that the operators cannot steal your money how the L2 roots are actually validated by ethereum now as I said there are two different approaches uh ver optimistic uh vers Z so uh the work on optimistic approach that's been going on for for
more than two years um the history is that optimism launched uh in 2021 the first fraud prooof system uh and then they scraped it because you know it wasn't very efficient and they focused on building the uh uh the community uh also they worked with George Huds on what's called Canon it's a it's a very interesting interactive FR proof system that um uses mips uh emulator uh to run the fraud proofs and my understanding is that optimism right now is working on a major refactor and they will have multiple proof systems running at the same time so they can actually even challenge each other uh but the truth is that at as at that
moment uh optimism does not have a fra proof system running so you have to trust the operator they they don't lie the arbitrum on the other hand they launched a little bit later but not much and they do have a fully uh running uh interactive FR prooof system uh they changed it uh and right now it allows uh WID listed valid datas to actually um uh challenge uh the operator if they find that the operator is lying and you as a users you have to trust uh these white listed validators right so you may think well this is not good right I still have to trust these validators uh again my understanding is that they working on opening it up uh with a new version of
the proof system uh and and they went to make sure that malicious uh validators don't dos you know the fraud prooof system so that's the official reason why uh this is behind the white list zik rollups uh the major milestones for me for generalized rollups uh Stark net launched the first generaliz Z rollup back in last year uh and this year we had the major launches from both ZK sync and polygon ZK evm I mean it's a mindboggling technology frankly uh I spent a lot of time you know looking at the details of that but uh uh but you can be assured that you know these are very new constructions and they uh allow The Operators to prove cryptographically
that they're not lying and they're not stealing your coins right uh and then we've got scroll uh linear you know they will be launching also this year with uh the intent of directly proving evm computation so you know we're very much looking forward uh to this and and when you think about those you know invalid State uh Roots you also have to think about the uh uh the problem of upgrades like what if the operator can actually upgrade the system and remove the proof system entirely and replace that with I don't know the manual uh process so you also have to worry about that uh and all this information you can get from the risk analysis from L2 beit
uh and as an example I mean if you have uh a very small multi which ser as a kind of a security Council that can override these State proofs uh then essentially your proof system is not doing anything because the majority of the security Council can override the proof system but they can also block uh the necessary override vers bug uh in a proof system so uh so that's for the safety right so safety don't steal my assets the livess don't freeze my assets so this is actually also super important because you if they freeze your withdrawal request then your money is as good as gum uh I believe and and this is even more nuanced uh because L2 uh L1
I'm sorry the the state Trot uh this is the only piece of information that L1 has uh so to withdraw without the help of the operator you have to actually prove that you own your money L1 does not know that you own your money and L1 only knows what is the state root uh of the L2 state so you have to actually provide L1 with the proof with the Merle proof with the whole path through the whole state tree well how do you get the state tree in the first place right uh if the operator is malicious and and this is why we need this scary thing called Data availability we need operators to actually publish information somewhere so that you as a
user can reconstruct the whole state it's super important uh if you want to withdraw when the operator is sensoring this data availability is crucial and uh and you have to like uh remember that operators can both censor your individual withdrawals but they can also disappear entirely right they can like stop working uh and again uh on l2b page you know you can go to uh risk uh analysis and you can see uh that uh in case of the sequence of failure there are certain U uh delay that has to be observed and then after that you can try to force
your withdrawal request through L1 and when the proposer uh experiences failue proposer being the entity that actually submits the uh the L2 State Roots again uh you may have an ability like with arbitrum to actually try to push uh the the state with your self kind of like a claim that you know this is what you own or in case of sistance you just can't do it at the moment right and we're like pushing all these systems to actually allow you to do that so so for both safety and liveness we need this thing called Data availability we need the operators to actually publish the data uh and they can choose uh optimistic rollups have to publish L2 blocks uh and
zik rollups they have a choice they can publish either L2 block or they can publish uh State diffs in both cases you know you need this information to reconstruct the L2 state in case of emergency essentially right um so uh and again to achieve true self- custody new both safety and liveness this is as simple as that uh and that's why we want this data to be published somewhere where you don't need again to trust some ex external operator right this is your weak point the data availability because uh what happens when this data uh is
published uh to an external server or whatever and they don't reveal you all the data again you've got a problem right again you know you might not be able to withdraw so you want to really really make sure that the data is published somewhere that is always available to you to reconstruct uh this state for the withdrawal and as I said before I mean you've got two options you can publish full L2 blocks you can publish state divs so I'm not going to go into the detail uh this is probably the topic of another you know talk uh and I'm running out of time but uh again going to l2b you can check you know the data availability and you can see whether the data is
published on chain like on ethereum and then ethereum guarantees the data will be available uh or the data is actually kept somewhere else and and why would you keep data somewhere else because it's actually quite expensive uh to publish the data on ethereum so some constructions they publish the data somewhere else but then you run into this issue that you have to trust that someone else for your withdrawals right um let's take an example of the recently launched or announced polygon POS uh the team announced that they want to actually prove the execution of the uh proof of stake U uh chain for polygon that's r that means that the validators can no longer steal your money but
because the data is still kept uh inside you know polygon posos validated network uh they can actually freeze your money so in in a way you still uh need to trust them uh this is a great Improvement no doubt uh but the trust assumptions actually are the same right you still for the withdrawals you still need to trust polygon validators and your ideal uh scenario is that you don't need uh to trust anyone else right there are no additional trust assumptions uh so this is why you want to pay ethereum for data availability uh you get very strong economic guarantees of safety uh you've got the very strong sensorship resistance uh if the operator senses you you just pushed your
transaction through L1 and hopefully you uh will uh I mean the ethereum validators will make sure that your transaction will not get uh censored right so you can always get your money out uh so this is what we do at L2 beat uh it takes a lot of time it takes a lot of resources uh and like I said before you know we like to think of ourselves as a community run resource uh we love all the operators and they both love us and hate us at the same time so it's like an ambivalent you know relationship kind of uh in fact they love us to to FUD the you know the the uh competition in a way right
uh but the truth is that you know uh with all of them uh no exception uh they actually appreciate uh what we do but we do it all for you right we do it all for users and and we think of ourselves as a as a public good company in a way right uh so we provide the service uh that actually make um The Operators accountable without help of some external regulators we think that this community should self-regulate and we think that this is how it should be done uh by essentially not trusting anyone but but having someone that verifies some other people's work right um so we kind of audit these systems but you know we're not a typical audit company right
we don't look for bugs we uh we read the code of every single system uh to the very last line and we report the trust assumptions uh on our website so I encourage all of you you know to check it out and I encourage all of you to uh to help us with this journey um I'm going to skip the last two slides because I'm over time but you know we need you as well you know we're hiring if you're interested in any capacity you know check it out uh I hope that you know this work is extremely uh valuable exciting for for you know potentially uh some of you and and yeah and I'm going to leave you with you know uh this comic
uh because I like to end with something that will stick with your mind and I wouldn't be able to uh say it better don't trust anyone don't trust marketing teams don't trust white papers don't trust documentation uh and I guess read the code uh and if you're not feel like you know you have time to read the code you know let us read the code right let us read the code and let us report everything that we do and everything that we claim on our website we always provide references to the code uh we we always like give you a quote you can check it out yourself uh why we're saying what we're saying and we love your support I mean we um uh we
are happy to uh to receive a lot of support from the whole ethereum community and from you guys as well so thank you so much and yeah any [Applause] questions uh yeah I've got a few on my screen over here uh but maybe let's start with uh a question with audience uh do we have a mic one
two yeah so one question from audience and uh two questions from here and we're running out of time I think everyone is is hungry right uh you mentioned that you are reading the code of uh all the l2s that are published on l2b uh did you ever have a case when you actually found uh a discrepancy between what the team claims and what is is actually implemented in the code all the time I hope that answers your question I'm not going to go into the details you know specific cases I believe that you know in most cases it's just uh the problem with outdated documentation and
you know maybe over ambitious plans if you like right uh but all the time thank you okay so in my opinion which of the rollups is the most secure I I think that rollups right now are still you know they have uh a lot of training wheels you know we are still building them so we didn't get to the stage where we can actually claim uh that one or the other is like the most secure I was actually thinking about publishing what I call oifc Index right that would be really uh like a like a rating index that would say when was the last upgrade I'm kind of assuming that with every upgrade you know they can introduce bugs right they can introduce something wrong so I'm kind of hoping
that if something was running for like let's say two years without any change and if there's like1 billion dollars uh which is essentially a bounty right in this system that construction sounds to me more secure than the construction that was upgraded a week ago and claim to use the the most modern fancy cryptography right it's a bold claim but you know the system is not tested in the production and we've all seen bugs uh we've all uh we will you will be hearing about bugs in rollups and believe me that ethereum researchers are very very concerned that those new constructions especially using ZK the most like modern ZK technology they they will have bugs that's the problem right that's why you
know we're talking about security councils maybe different two different proving systems running at the same time and if there is discrepancy if one proving system says a the other one says b then maybe there is like a security Council that will adjudicate you know who's right and who's wrong right um another question so many things to build what's next for to be I mean this is this is actually crazy so um we uh we always seem to be uh running out of uh resources and and people to build there's so much to build uh but you will see very soon on L2 beat you will see a very detailed breakdown of tvl uh we know that there are some native coins
being minted right now on l2s uh usdc can be minted natively on arbitrum we will do a very detailed breakdown very soon of of how much of the tvl comes from the bridge and how much of the tvl comes from what we call a native minting and then uh we will also look uh or concentrate on explaining liveness a little bit better you will see very very soon how often uh these rollup operators are submitting State roots to ethereum um and what is like the average uh time to what we call a finality right where when you can be sure that your L2 transaction is finalized on L1 uh and I think it's a very important metric for
for a lot of users and for a lot of applications but you will see that some rollups they submit L2 blocks virtually every block like optimism very very often uh and some every maybe six hours for example right so ethereum essentially doesn't know what happened in the last six hours like now so if that information is gone then you won't be able to actually you know like use this information on ethereum um which uh rollup should we use uh for our dab in a current state this is probably one of the hardest question in my opinion uh I think the rollups should try to differentiate with some
special uh features that will convince you specifically that this is a good environment for you right because otherwise they will all look very much the same for you and I think this is for example is my personal opinion that uh different applications will be built on rollups submitting STS uh and different applications will be built on rollup submitting uh L2 blocks because you know there's a different trade-off in terms of uh security finality and and cost uh and some additional uh functions like um I've heard that the world coin for example I mean this is maybe a controversial example but uh maybe for some users actually it's important that
you want to make sure that you uses uh humans right so if that's the case and if you're building an app that somehow leverages this functionality you may look at the world coin which will be a rollup very very soon if on the other hand uh you want to make sure that you tap into I don't know the huge community of coin Bas users coinbase users you may want to uh check base which will again launch very soon um so so I look for the community and uh and obviously for the technical features and we will make sure that all these constructions eventually uh will be secure right but you need to understand the trade-offs and the current tradeoffs all right thanks so
much again nice