Killing the ultimate UX showstoppers – with zkEVMs / Orest Tarasiuk

Prague DeFi Summit 2023 · June 2023 · 22:40

Orest Tarasiuk names high fees and high latency as the ultimate UX showstoppers on Ethereum today, creating bad incentives for entry-level users and wasting developers' effort. He presents zkEVMs, built on zero-knowledge proofs, as the main hope for scaling and better user experience, and argues that wider adoption depends on helping people understand that zkEVMs are not magic.

Speakers

Topics

From Prague DeFi Summit 2023, hosted by Prague DeFi Summit 2023.

Transcript

hello hello and I'm arrest I'm with scroll and I am here to talk a bit about ux but from a rather technical perspective and I'm here with Scrolls so and all we do are ZK EVMS and so I'm gonna try to convince you why going for a zika evm is something that can also help to resolve the ux issues that people are seeing today that users are synced today and that also results in a bottleneck to ethereum adoption and crypto adoption as a whole and so the number one in my view ux showstopper right now are actually high gas fees and what results from this like Network congestion and developers

focusing on gas optimizing the contracts rather than working on something that the user themselves would be able to benefit from and so in order to tackle this we with scroll set out on this journey to create a ZK evm and and by zika evm we mean a roll up that uses the zero knowledge proofs in order to add scalability to ethereum now does this kind of mystical and element to zke VMS and so I'm trying to work towards uncovering that um and in order to adjust I'd like to

um get a quick show of hands who would be able to Define each of these terms that are of Interest so zkevm scaling ethereum Roll-Ups and zero Notch proofs who is able to Define them roughly okay so it's like maybe a third of the audience here that's not not bad so maybe we can jump into some challenges when building and ZK EVMS as well and and so still to the other two thirds it might sound a bit scary you have all those keywords and you don't really know how to um apply this to your use case you don't know where this leads to compromises and so I'd like to start with a bit of a

personal um journey of entering the world of crypto and being exposed to all of those um keywords and buzzwords and feeling kind of overwhelmed in order to show you that this is something that passes and it's not something that's uh um an unavoidable and next we'll talk about ethereum's trailer choices briefly I think most of you might be familiar with it and and then we'll jump right into solutions to the Australia matrices and we will follow a hierarchy and going down deeper every and level along the way and so we'll start with l2s we'll focus on one type roll ups we'll focus on one type and DK Roll-Ups and we'll focus on one type of those the zkevm

and next a quick update to a scroll is at with respect to this hierarchy and and the progress um on that pathway and finally if we have time we'll talk about challenges if anyone's interested in getting the slides and we are trying to build in the open not only when it comes to our GitHub repo but also these slides are actually commentable so feel free to also highlight whatever and maybe keywords or definitions are not comprehensible and and we are trying to to be responsive Even in our Google slides and threads and discussion threads and also feel free to hit me up and I'm an engineer working at scroll um I might be able to help with some of

the issues you might have encountered and also we have we are having a hackathon and some bounties during this an event and so hit me up until on Twitter DM open if you have any questions regarding that as well okay so um entering the world of crypto my background is classical computer science and I did I created a mobile Health startup before doing crypto and and then I was exposed to all of those weird buzzwords and I I thought everyone around me was um able to comprehend and and Define each and every one of them and I felt really silly and so I figured

okay let's uh see how how these things work and only upon talking to people and asking hey so could you tell me about how exactly this Byzantine fault tolerant property comes to be in this algorithm was it that you uncover it's very normal that people are actually struggling with anything that's outside of a daily business and so don't be shy and ask people use the opportunity I guess and just assume that it's okay not to know everything now when talking about ethereum um the first thing you you might uh think about is that everyone is supposed to love it especially when you are in your little bubble here in East Prague

that has ethereum in its name obviously everyone will love ethereum but then as soon as you and Google ethereum problems you will very quickly stumble across this one magic number or version thereof of roughly 15 TPS transactions per second and that is basically the scalability issue that ethereum is seeing um and so is it an ethereum thing or is it maybe something that has to do with blockchains overall well as the computer scientist I would say that actually has to do with database systems with dvss or DVS and there's a long-standing um trilemma choices and database

distributed database design and Sciences such as the um the cap theorem where you only get to pick two out of three very desirable properties and so this kind of translates into something that came to be known as the blockchain trilemma and a few decades later and and it basically says you have those three properties decentralization security and scalability and you only get to pick two out of those three what a dramatic decision to make and some ethereum picked to sacrifice scalability in order to keep and and be able to take advantage of the security and decentralization properties

that's what the 15 TPS come come from now my argument is going to be that ethereum really sacrifice and this scalability but first let's think about Alternatives briefly well there is um the alternative B which is sacrifice decentralization that's the I guess standard way of doing things before the blockchains and that's like monolithic systems such as Visa or maybe a chain that requires High Hardware requirements for running a node or the ad alternative would be alternative C sacrifice security level maybe the parameters that that you acquire and then you end up in some sort

of multi-chain ecosystem with the risk risky Bridges and and assumptions when it comes to trust now did the ethereum really sacrifice scalability I would argue not really because the concept of l2s has been around for a long time and this is has kinda been expected to be this trapdoor out of the trailer and so let's talk about how l2's layer 2 Solutions and help to solve and or at least alleviate the issue of scalability if you looked up the definition of an L2 a year ago you would have found this or these two and they are basically

changing every week now and if you follow crypto Twitter you will know this is a big mess when it comes to terms so I don't want to get involved with this too much I guess the main rough intuition I would give you is an L2 is some sort of a system that serves to scale ethereum while retaining some notion or some inheritance of its security and decentralization properties and so Roll-Ups are one type of such l2s and they have been touted as the end game by some people and and have come into Spotlight in the last

year or two and so what Rob types do we have out there well we have optimistic Roll-Ups and they have the advantage of being a bit more simple although still very complex and they are still not even built out to the full extent but because of being a bit less complex they have more adoption out there you might have used um an optimistic roll-up to get a ticket or two and but they suffer from the slow L2 ll1 finality so you need to wait usually for a week before you get to use your funds in another layer and the alternative ZK knowledge based Roll-Ups are such that actually allow you to skip this period of of seven days to withdraw because

instead of having an optimistic and economy incentives based assumption you have a zero knowledge proof to um to convince other notes on the network that what happened in the roll up actually is according to the rules and the problem with these is they are more complex there's less adoption and and a note here ZK Roll-Ups are not zkzk Roll-Ups that is to say ZK Roll-Ups have nothing to do with the Privacy preserve preservation property of zero knowledge proofs they only use the succinctness property and the S and and snarks of zero noise proofs

the Roll-Ups that use both are called zkzk rollups okay so what are ZK Roll-Ups well they replace the re-execution the the necessity for every node on the network to re-execute and as suggested set of transactions by a cryptographic validity proof and those proofs have this amazing property that they actually faster to verify then re-running the set of transactions that they are proving um yourself so this is very interesting right it's very counter counter-intuitive and on top of that um it is um there's no trust assumption with respect to the prover the The

Entity during the heavy lifting of creating such a proof that this then so fast to verify and so there's two big types I'd say of ZK rollups application specific ones that's Roll-Ups that you might have seen out there in the wild where you maybe just are able to run swaps and there's also an application um agnostic ones so a general purpose Roll-Ups that's what we like to call the ZK VM or the zkevm so a virtual machine a system and model for running arbitrary computation and that computation is verified using ZK proofs and so yvm well

here you can see the model of the ethereum virtual machine and based on which layer of abstraction you are as a ZK an evm a ZK roll up and running your your computation proofs you may find yourself located in one of five options for compatibility with the evm the ethereum virtual machine which de facto means depending on how close you are to the ethereum virtual machine the closer you are the more of the ethereum virtual machine um designed a systems such as daps or maybe debuggers or maybe an optimizations for gas use is the rollup

able to take advantage of so that translates to developer onboarding developer go to market and so on but it comes at the cost of being more complex so where's scroll in this map well we are headed towards being a type 2 ZK evm right now as far as I know there isn't really any type 2 evm out there and that is supposed the idea behind being a ZK evm type 2 is that it seems to be a good compromise when it comes to the complexity of Designing such a system and running it and compatibility with existing ecosystem and players and such as debuggers dapps and so on

so yeah zika evm type 2 that's something you can Google um what what exactly the properties are and the benefits of such an approach would be first of all we still get to reuse most of ethereum's infrastructure and deploying a block Explorer with scroll for me looked like I I don't even need to clone git clone block Scout I literally reuse the docker container that they built for ethereum and um put in a new RPC endpoint that's it it's really cool and this also means that this and complexity of ZK proofs is encapsulated and and abstracted away

from you the developer and lastly it means that a lot of the security assumptions can be inherited from evm so the motto here is let's make devx borrowing let's make it such a developer doesn't even notice they aren't developing for ethereum but for a Roll-Up and why is it why is it possible now what changed um zkp has have been around for now 40 years 40 for zero um but it's only been the last couple of years where big improvements improving systems led to a many orders of magnitude of speed up and there's been

Hardware acceleration that also provided several orders of magnitude of performance increase and lastly and because of the attention of the ecosystem de facto because of the influx of capital and and the building in the open building with very um clever minds and in one Community de facto at scroll for instance we are literally for we focused in ethereum foundations repo and we are basically working together with them every couple of weeks and synchronizing up and downstream because you have all of those clever people with triple phds working together and this is not becoming a reality

so what's the catch still why on on isn't scroll live on mainnet well it should be very soon but uh why not yet well because there is those two-fold um complexity costs to this the direct cost is the computational um cost of creating proofs so right now we are talking about hundreds of gigs of RAM and gpus and when it comes to the meta level there's also this cost of creating this complex system and being able to audit it being able to find vaccinate that that takes a lot of time so where is scroll right now well we are

um in the process of preparing our mainnet launch um so stay tuned and check out scroll.io for details and and what is the vision well the vision is to stay very closely aligned to ethereum and ethereum Foundation the ethereum ethos that's why we're here at East Park I think it's a very adequate event and to be part of um we care deeply about decentralization we will be launching with um centralized components still with so-called training wheels but we are working very actively on decentralizing that and my colleague tag rule will be giving a talk in two days about how we are thinking about separating the role of the prover and the sequencer

similarly to the PBS approach um and we also are striving to work on evm equivalence and in the end we are we would like to contribute to the ZK snack or snack everything in ethereum okay so uh challenges in building um such a system have three categories the first category is writing ZK circuits it means de facto how do you translate your program that contains some lines of code and takes some inputs and gives you some output into something that more resembles an integrated

circuit boards such as an SDK Circuit of this shape where you just have inputs and the only kind of effect output is is this a valid combination of inputs are they compatible or are they not compatible and so that's uh one one one Challenge and it comes with several technical intricacies to it such as the word the length of the word that such a circuit such a ZK circuit would accept and when compared to what's used in the evm and it's just unfortunately not very well aligned because we have 256 bit words in the evm but our ZK

circuits because of the underlying math Primitives that we are using actually are two bit short so we need to annoyingly pad those or split up those evm words next we have the challenge of writing the ZK evm so if you think about an evm itself it consists of this main component that contains the executor that runs opcodes we have a stack and we have a memory we also have a storage for like the long-term storage and we have byte code that we are actually loading into memory and executing the opcodes the inputs to the evm are transactions

now if we go away from the evm and expand towards the zkevm we will need to add several new components so we need a separate circuit for proving stuff that the executor is doing the evm circuit we need a separate circuit for the ram this has to do with how ZK proofs deal with the random access we need a separate circuit to prove that we are actually using the correct bytecode and the correct storage Michael Patricia tree and in this case we need the circuit to prove that we are actually executing the transactions that we are supposed to the inputs we need special circuits for the non-zk friendly

operations such as elliptic curves curves operations and hashes and more and so all of these form the zkevm which is way more complex the Beast and which is many many orders of magnitude are slower to execute than the evm itself and last we have the challenge of building the ZK roll up that means okay what do we actually mean when we say sequencer in the layer 1 the sequence as a module that takes transactions as input and executes them now when we think about layer 2 and how layer 2 and layer

1 interact how the roll up process works is that we have the factor a copy of the get that people are using on the layer one and that executes transactions from users and sent on the layer layer 2. but it also needs to listen to events that the bridge contract and the main layer the settlement layer the the ethereum mainnet layer and sends and it also needs to be able to send back States about the updates in the L2 and world to the roll up contract on vl1

and then on top of this we have the prover component a separate entity that receives traces of execution and proves them and now we care about decentralization so we want to have several proofers in our Network but then we also care about the decentralization of the sequencer so we want to abstract away all of those sequence specifics and have one component that can be run by anyone and this is actually still an ongoing field of research at Target on um Sunday is going to talk about as well so yeah our roadmap to a mainnet is basically working on resolving some of

these issues and right now I'm open if you have any questions and other than that I encourage you to check out our resources and hack on our prizes thank you thank you so much [Applause] unfortunately we ran out of time for questions however if I'm correct uh there is you actually got you guys have actually a booth here right yeah we have a booth not sure where but somewhere in this venue so feel free to stop by and ask any questions including potentially when token oh don't ask that thank you [Music]