ZK Stack and the Rise of the Rollup-State
ETHCC 6 · July 2023 · 25:51
Alex Gluchowski examines Ethereum's rollup-centric direction, the rise of application-specific chains and the role proposed for ZK Stack. The speaker discusses that vision as an emerging architecture at EthCC[6].
Speakers
Topics
From ETHCC 6, hosted by Ethereum France.
Transcript
hello everyone hello Paris well uh we're really happy to be here my name is Alex gluhowski I'm from metal Labs I'm co-inventor of ZK sync and um today we want to speak about uh Roll-Ups ethereum ethereum's Roll-Ups into crowd map I want to begin by introducing ZK stack and then talk a little bit more about like how ethereum Center crowd map will look like so we can imagine and see like through problems and challenges um the ZK stack is an initiative of the kissing project which we announced recently it's the um opening of the source code of era blockchain uh for everyone to be able to build their own custom roll ups and
custom hyper chains like more more generically ZK based chains it's completely free fully open source under MIT Apache License it's evm compatible you can deploy any contracts that are written for ethereum L1 and it's well battle tested because it's based on there and we'll talk about this more uh it's modular and you can customize different aspects of uh of the stack for yourself and the uh the the the important thing is you know ethereum has many visions and different people are coming to ethereum with different ideas of what what's the purpose of it what we can build with it we sing
started as a project focused on the mission of advancing Freedom we believe that the most important one of the most important properties or um purposes of blockchains is to make users Sovereign and make the communication and transacting trustless and uh this serves the the the idea of advancing freedom uh which might be a bit hand wavy so recently we published something we called ZK credit this is like a Manifesto where we try to articulate exactly in a positive way what specifically this means what are the properties of blockchains we want to preserve at high scale uh and we we came up with a list
of uh of points it's still open for the community discussion so um it's on GitHub you can um engage in discussion submit your proposals but these are the things that have guided the development of ziki sync from inception though this is kind of the and state the vision where we want to to arrive at the destination but we have a second Compass or north star of how we actually prioritize these features so the one thing is what your final destination the other thing is like what what actually do you do practically like step by step in order to get there like what do you prioritize for us the priorities are based on the roll up or sorry a user-centric approach
to uh uh to planning uh we believe that you have to start with what users care about most for building your own rollup or like even if you're if you're choosing a roll-up or uh blockchain to deploy things on like what are going to be the properties that the users will get today tomorrow and then later that will determine the like what what they actually want um this is the priority in in which we are scheduling our things we'll talk about security liveness ux the cost and then eventually the hyper scale what it means for the broader picture we'll start with security because it's non-negotiable blockchains
specifically with l2s like in in layer ones you still have some way to correct problems if you have a problem at L2 it can be detrimental we see it with the bridging protocols that have been hacked and billions of dollars being lost so we invested millions of dollars in Audits and security contests to make sure that the construction of the ZK technology that we use is actually practically secure ZK rollup is in theory the only protocol that gives you 100 security derived from ethereum but in practice it depends on how you actually implement it so like we invest heavily in this with the number of uh strong partners and a lot of independent researchers and more are coming but we also think it's about
security as a continuous process with defense in-depth mindset so one of your security layers can always fail you want to to have multiple layers that are independent that rely on different independent mechanisms such as 2fa uh that like you don't only rely on on the cryptography you also have layer of validation that ensures that transactions are secure even if you have any problem in in cryptography which can be found later and fixed we have introduced delayed withdrawals all withdrawals are delayed by 24 hours in the initial phase of the of the project so we have time the security Council has time to intervene if something is going wrong and there are
more mechanisms this work but this is the the number one non-negotiable priority before the kissing the number two priority is liveness or more precisely like reliability of liveness if your protocol gets to produce huge reorgs quite frequently it's not going to be a great experience for the end users whom transactions might be reverted and they won't be able to execute them and for the applications for Builders for other service providers on your blockchain Linus is critical so basing on the source code of era is one of the most battle tested Stacks today
like the era if you go to l2b dot dot info you'll see that era is actually the most actively used blockchain over the past 30 days we are processing millions of transactions on average with something like around 10 TPS close to 10 TPS um so the reliability of the protocol has been massively tested the RPC the the infrastructure for requests is also massively maintained um and we are actually investing a lot in making the uh in making the protocol resilient with sufficient buffers because 10 TPS is an average but like we
are actually capable of maintaining over 100 DPS uh as shown by our law tests internally and um you want to be able to accommodate large spike in transactions you don't want your protocol to be crushing on you know like some nft collection Mint or or some some extraordinary events you need this broad buffer even 100 TPS is not enough we're going to be increasing that uh it will go to towards thousands uh but like as a gradual process the 10x buffer is something we consider sufficient um but liveness is one of the things that is is requiring decentralization like if you rely on one provider on one
entity on the centralized sequencer you you won't be able to guarantee the awareness for both technical reasons and potentially political and like organization reasons or like security reasons uh this is why the um we are decentralizing both prover and this sequencer I'll start with prover this week we announced an upgrade of uh ERA with the new proof system called bujam it's uh today it's it's the fastest um CK Pro systems uh ZK proof system in the world we made the benchmarks with a seller we just made some more Corrections which it makes it actually faster than Starkey we will be updating that that graph with seller uh it's a
long bass proof system uh using fry Stark so it's it's fully transparent and most importantly our GPU implementation is optimized for Consumer gpus it only requires six gigabytes of RAM so it can be running on any cloud service on on the mining rigs or even on home uh gaming computers so it's like this is the first step to decentralize the the proofs and the the we will follow up with with the marketplace for proofs uh on the sequencer side we're working on a L2 consensus with the low latency uh for blocks under one second we're using hot hot stuff or a version
of hot stuff called Hotshot and um which brings us to to the next point which which is actually in the intersection of the user experience and uh and lioness because low latency is important for the users like waiting 15 seconds or maybe even longer for to get your transaction through it's not a great user experience but um it's not the only thing that matters uh one interesting thing about era that puts us aside from basically all the existing evm o2s or AVM compatible tools is native account obstruction it's very similar to eap4337 except that it applies on ZK
stack or an error to all accounts it doesn't matter if your account is smart contract which is primarily designed for uh like smart wallet accounts or it's a uh eoa on metamask or like basically any wallet is is a smart contract in the key sync and you can use native account obstruction features such as paying for gas in any token or doing even gasless transactions or implementing your own custom signature schemes like signing with biometric devices from your smartphone so like this is one of the things that uh that will be necessary for going brought into Mass adoption [Music]
um and finally we have [Music] a again on the intersection of user experience and like performance properties of the protocol comes the question of the costs because if the transactions are expensive users won't be able to afford it like to two pro degree or some use cases will be just outpriced from from the usage on the blockchain um I'm going to talk about the priorities what like we currently we are not the cheapest protocol in nltos but it's Gonna Change in the next weeks and months with the three things that that
are being rolled out the first one is the data compression this is what optimistic Roll-Ups currently already do and it gives you roughly 60 off the cost it's like whenever you post something on on chain on ethereum uh you can just post the full uh blob of data like this is the update of the state from X to Y but in most cases you can compress it using Huffman coding using uh exponential encoding of numbers using dictionaries uh using the IDS of accounts instead of full addresses so like it's quite easy like quite straightforward to implement it's not specific to 2K sync we're just going to do it as everyone else what is specific to the ZK stack and
what's really interesting is that zikasync and starknet are the only two protocols on in the L2 world that use state divs for data availability instead of call data what this means is we publish not the transaction inputs like the sequence transactions with like user what what function you're calling from what account to what account with what signature uh we collect this the the the uh the inputs we execute the blocks and we publish the final outcomes of the blocks we only publish like what slots have in the storage have actually been affected by by this block and
if you have like 1000 transactions that only work with a few storage slots and you can think of it as Oracle updates just doing like you know 1000 times making the tico photocall updating the price or 1000 ties are times Arbitrage transaction with some amm you will at the end of the blog only publish these few storage slots which gives you a super linear compression of data not just the linear one with like some percentage like 56 to 70 but actually like 1000 decks 100 like 10 000 uh percent uh increase in throughput or decrease in the price so transactions
like this are going to be a lot cheaper like Oracle updates are going to cost under one cent on the roll ups irrespective of the gas price on ethereum which is going to be really interesting for certain kinds of applications but that is not enough because Normal transactions like nfts or or token transfers that affect normal like you know ordinary accounts that do not tapping into the same storage slots over and over again are still going to be following the gas prices on ethereum and even after AAP 4844 that will give us probably 10x Improvement uh we still won't be able to handle lots that we see in the real world like
if you think of all the value transactions in the world from payments just payments alone are tens or hundreds of thousands transactions per second across all the payment methods on the internet uh you can't put them on ethereum they're just fundamentally like you cannot put um something on on a single monolithic blockchain of that scale so you need some way to chart transactions indefinitely and the if the feature that is coming to era and ZK stack in the near term is going to be the ZK Porter Evolution evolution is a protocol that allows you to extend your ziki roll up
with optional different types type of accounts called accounts in our case that keeps the data availability for these accounts off chain it's user choice where they want to to hold their their data and their their assets they reach users like liquidity providers in the protocols like uni swap maker balance or whatever we'll probably prefer zikirola because that gives you the same security guarantees as ethereum uh but retail users who can't afford to pay one five ten dollars for transaction or 50 like at the peak I think it was like several hundred dollars for for
transacting on on the D5 protocols we'll be able to do it from ziki Porter accounts having native instant um synchronous access to the protocols in the roll up but still paying only a few cents per transaction so I encourage you to take a look at the ziki border papers that we've published previously this is something that is already core part of the ZK stack and era architecture and it's been unrolled and boot Jam was one of the things that that was needed to to be to be implemented before we can unroll this um and this finally brings us to a more interesting question like would Evolution be like is data availability extension into
um off-chain world like with you know you with zika stack it's modular so you can use different data availability solutions for for your chance you can tap into Inga or Celestia or Avail or like uh whatever you want or you can keep it like you if you're in an Enterprise Builder you can keep it to yourself with with your own data availability committee um but that's that's not going to be enough because the transactions on a single roll up on a single chain are still sequentially processed and your sequencer is going to be the the the bottleneck and when we talk about the hyperscale what we mean is the ability to grow the network completely on in an unlimited way like think of the internet if all of these
servers or like if all of the internet transactions had to happen on a single server or even on a single data center it would not be unlimited it would not be able to grow like to millions and billions users and transactions and all the law that that's happening there you need something that that can have like organic horizontal sharding capability and this means we will need to have more chains it's inevitable that the future is a multi-chain world like there will be many roll-ups summer roll ups will be uh generics and will be application specific but you can think of them this is the metaphor uh I
wanted to share for this talk as city-states like your users who have Assets in in on on chain necessarily have to pick where they put this assets you cannot abstract it away because the assets can only live on one chain so this is like you have to pick where you live you cannot live in two different cities I mean you can travel between them but like at any given point of time you are in one of the cities and in this city you will have different properties like you have the law and culture governing the coexistence and uh living in this place which is the ethos values of the community of the of the chain which is going to be different
from Community to community you have the infrastructure like is it are the buildings new is everything working fine or is everything you know broken uh and you cannot move from one point of the city to another without a traffic jam that defines that is defined by your Tech stack and uh a really important thing is then the opportunities like if you live in something like New York City or Paris or another big Megapolis you have a lot of cool things around you like shops and restaurants and services and so on and if you live in a small City then you're you're like and also jobs where you can earn money right in the small City the network effects are going to be
much much lower so you need a really good reason why you would want to live in a small City like maybe you can you are outpressed of the big one then then you you could consider that but like if you don't have a job there what you're gonna do uh but there is another interesting thing like the the uh and this is what we see currently a spike of interest in is the rise of the application specific roll-up and if you think in City analogy it's something like a Disneyland it's a completely separate place it's not easily accessible you have to go there uh some you know like you you it takes time and effort and cost to go there but you're probably going to spend there an entire day so you go there once you stay there you go to all the attractions and
then you go back uh so like for for uh something like Disney would totally make sense to make an application specific chain or like maybe it's a big exchange where you go and do a lot of trading and so on but for a small thing like a single restaurant it probably doesn't make as much sense you know like a few people might want to go there just to try it out because it's fancy but most people won't be able to go like very far like maybe take a flight to go uh to some shop far outside of the big city right so like the the question is like if you are a smaller application that that serves specific Niche but um
[Music] um is it is it justifiable for you for you to launch your own chain does it make sense or does it not make sense well it depends on how far you're going to be how expensive it's going to be for your users to get there from the place where they actually live from the blockchain where they hold their assets so let's see what it's determined by the problem is the bridging is fundamentally broken like all the bridging we have today except for Native Bridges on the roll ups or like on like something like ethereum are broken and we'll talk about why or they are just expensive like if you want us to transact from even one roll upon ethereum to another one you have to go through layer one you have to make a
transactional layer one so your bottleneck is going to be the throughput and the costs of the layer one and we know it it's probably going to go up in price a lot with with the search of demand uh so you could say like well we're just going to use the the uh faster Bridges between the Roll-Ups the problem is they are fundamentally broken they are not Bridges if you think of like a bridge uh it's something that connects two pieces of land over the water and uh what you would want you have some assets on one Island you would want to just move them over the bridge to the other one so that the assets disappear on the first side and appear on the second side well it's not how the bridges work today like the way they work is you kind of
swim on the other side and you get an IOU and someone holds the assets for you on the on on the first side and then you run around with this IU and like hopefully people trust you and hopefully the other guys still keep your money there or like the alternative would be to keep piles of gold on both sides and try to manage them which is like kind of again expensive and someone has to do it and you need Capital requirements and you cannot pass arbitrary messages this way because the with when you pass arbitrary messages there is not like no guarantee that you're going to be tapping into specific collateral that secures like is this message gonna unlock like one dollar or one billion dollars you don't know because the complexity of the protocols that are
being triggered by this message is unknown you know like it can be anything so from for arbitrary messages you really need a native Bridge which is going to be expensive and what you're going to do so this is where ZK stack comes in with the like this is the key property of the ZK stack this is really like why zika stack was built in the first place we're coming with this new primitive called hyper Bridges and the um the chains that you can build with ZK stack we call them hyper chains because they are connected with Hyper Bridges in a way like hyperlinks on the Internet connect several pages uh like you can transact you can with Hyper Bridges we use the power of zero
knowledge proofs to actually move assets like burn them natively on one side and mint them natively on the other side and it works I don't have time to explain exactly how but we comment from our team had a talk today you can re-watch it or come to our stand to our booth we're going to be there in the next half an hour we can answer questions technologically we have documentation about this publicly but what you do is like you natively burn things you send a message enforced by the validity proofs and verified by the validity proofs on the other chain and since all the chains use these same circuits they can blindly trust each other which is not the property you have with with any other technology but their knowledge proofs so you really need ZK
the case key to to be able to unlock the hyper Bridges and from the user perspective it works seamlessly like sending an email you can transact from any address on any chain on any hyper chain you sign one message it sends arbitrary fonts from this hyper chain to the other chain along with the message it can execute some logic there and send you the funds asynchronously but relatively fast like I'm not gonna lie and say it's going to be instant but it's going to be like some seconds like the the proving numbers we see suggest that it's going to be under one minute like both ways round trip and so like one signature and you're
going back and uh this is how the uh the ethereum-centric roll-up world will likely look like you will end up like this is our take on on this future you will see a couple of ecosystems that are tightly interconnected with very high proximity with very low like barriers of connectivity between those chains so you can have application specific chains that are easy to access from the big chains like era and you will have other roll ups which you then have to go through ethereum paying higher fees and taking longer delays into account uh so like this is um our vision and happy to answer
questions after that at the booth thank you guys [Applause] [Music] [Music] oh