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

Loading player…

'zkSync — zkPorter: Why Rollups Are Not Enough' - Alex Gluchowski

ETHGlobalSat, Oct 9, 2021, 12:00 AM

Join Alex Gluchowski of zkSync as he explains groundbreaking new research in scaling via zk rollups.

Transcript

hi everyone and welcome to the talk about ziki porter why roll ups are not enough uh where we're gonna talk about scalability on l2 and uh discuss some of the predictions of what we're gonna expect this summer uh and beyond that um my name is alex grochowski i'm ceo and co-founder of matter labs and one of the co-creators of zika sync which is the first evm compatible zika roll-up um ziki roll-ups are one of the promising way to scale ethereum and there is a kind of consensus in the community that roll-ups are the way to go ethereum embraced the roll-up centric road map there are two roll-up families optimistic in zk there is kind of also a consensus that zk is a superior technology which is going to be the end game of scaling [Music] and it because it has a number of properties which which make it outstanding from like everything else including optimistic roll-ups uh specifically compared to optimistic roll-ups it's uh more scalable if we assume uh roll-ups using like true evm compatibility with ec gsa signatures single fraud single round fraud proofs zk is going to be a lot better uh it has a much stronger security than optimistic roll-ups so optimistic rely on some pretty strong assumptions about security whereas uh zt roll-ups offer exactly the same security guarantees as layer 1 of course giving the the bug free implementation but that's true for all systems and they are a lot more usable in in different regards uh most importantly the finality is short finality of zika labs can be reached within minutes and this means you can withdraw from l2 to l1 or to a different l2 within minutes and you don't have to wait one week or more as is the case in in plasma and optimistic roll-ups which is very important especially for periods of high price volatility for from any traders uh also zika roll ups are actually a more proven technology they are in production since one year uh we launched uh zika sync 1.x in june 2020. however the uh the roll-ups which were in production for this year were all application specific so we were able to test the basic technology and basic uh r d behind the the attack and make sure that it's secure uh but the engineering necessary to build the uh generic programmability and evm compatible ezekiel ups were not there back back then uh and it took a couple of breakthroughs throughout the last year to come to this so we will probably launch uh into production around august uh whereas there might be some optimistic roll-ups that launched earlier so the question is should you wait for zkvm or should you just launch with whatever is available today so let's explore this question and let's first look at what the what are scaling expectations are on roll-ups in general so we all hope that roll-ups will bring us alleviation of the high gas prices that we have that all the users are going to jump on on roll-ups on l2 immediately and we're just going to get 100 x cheaper transactions whereas i think realistically the reality is going to be slightly more complex [Music] specifically if we look back at what happened with zika roll-ups uh big players were kind of hesitant for a while embracing them uh because it's a new technology it has to be proven it's going to be the same with all evm compatible roll-ups it will take some time to gain trust and we'll probably see big money on l1 still staying in l1 protocols for a while because they offer the most security you're not going to move one billion dollars immediately of your own money in into some new l1 l2 sorry however we're going to see a lot of smaller users who are more risk-friendly and who will immediately move into l-2s and we see this happening already with plasma with side chains even with with other layer ones and what i think is going to happen is a lot of those users are coming back to ethereum to the proper ethereum solution which is roll-ups um but they will also bring a lot of new users from uh from outside uh because the feasic will get lower and it just going to become more affordable right so we have an influx of new users um which are currently not using l1 an influx of new use cases such as nfts which is just going to explode on roll-ups and probably some new more interesting scenarios and we're gonna have a lot more trading because the trading like if the fees are lower uh there are a lot more transactions that you can make that will be profitable for you as a trader because the trading is going to explode and intensify so what we will likely see is like lots of these new users and and aggressive trading and new use cases all gonna uh create a lot of pressure on on ethereum network through these slayer two solutions uh who which all compete with each other for the bandwidth of ethereum blocks uh so we will likely see similar situation to what happened over the past year on maynet where the guest fees grew quadratically proportional to the number of users so if we get 100 000 x 10 10 x 100 x 000 x more users on l2 the prices are gonna be likely like rising so right now a single unislope trade on a rollup would cost something around one dollar you can imagine if this number goes up 10x 20x 50x uh we're kind of gonna come back to where where we are now or where we were half a year ago uh so there will be a whole class of users who are excluded again from the economy and this is not cool so they are all gonna back going back to side chains or other l1s which we want to prevent we want them to stay within the ethereum ecosystem so what can we do about this uh with zika sync 2.0 we're going to introduce this new solution called zk porter it falls under the class of volusion systems and it's based on zika roll up it's it's very similar to zika roll up with a key distinction in z key porter you will have accounts of two types the first type is zika roll up accounts which have all the properties of zika roll up you get the security of a layer one and you get the price of zika roll-ups the second type of account is ziki porter accounts and they will be similar in all regards they will be like from a user perspective they're going to be exactly the same you can interact with other zika partner accounts with secure all app accounts the entire system is transparent it's a single shared address space and liquidity space but zikr all app accounts are going to be just a lot cheaper by two orders of magnitude um in exchange for slightly lower security actually for for significantly lower security but they are still going to be pretty secure so let's deep dive into how this works and to explain how ziki porter works let me start by explaining how a zika roll-up works in the first place so with zq roll up we have the state is held off chain represented as a merkle tree the leaves of this merkle tree are z curl up accounts and we have a root hash which represents a cryptographic commitment to the state so this root hash is stored on the smart contract on ethereum and whenever we have a block that contains number of transactions that updates the state of some of the zika roll up accounts some of these leaves will change and necessarily the root hash of the entire tree will also change and we will have to submit it to the smart contract along with the proof of validity of this block so this proof this is a snark it's your knowledge proof that verifies that every transaction in the block has been correctly done so that it has a valid signature that all the rules of these transactions were enforced and so on so we submitted there and the contract will check the the proof and if the proof is valid then it will update the the storage slot which which holds the state route right and we will get the new stator so we just do one storage um a store on ethereum for a like arbitrarily many transactions which gives us scaling however in zika roll up uh the the zero knowledge proofs can only guarantee the validity of the state but not the data is available so you as a user if you want to rely on on yourself and not on the operators of ezekiel roll up you should be able to prove to the ethereum contract at any time that you own some assets in one of these accounts and to do this you will need to provide a miracle proof merkle path of your account and to do this you necessarily need to know all of the uh uh all like all of the state details of all the accounts uh but they are not stored in the smart contract so how do you get them for this uh we will publish the state updates to the ethereum network as call data so we're not going to use the storage but instead we're going to send like whenever some of the accounts change in the block we will send the what changed or the final state of those accounts uh as a part of transaction which will make it which will be propagated to the entire network to all the full nodes of ethereum and this will guarantee that all the users have access to this data if the operators withhold it uh users will be able to get it from ethereum network and a snark or proof of validity will also ensure that the data that we publish actually corresponds to the state transition so the the ethereum smart contract will have to actually hash uh make a hash of the state updates and and check it with with the snark so it guarantees that the data is available through the ethereum network but it also comes with the limitation that uh we only have the the block size limit uh which uh which is the bottleneck of throughput right so okay to overcome this bottleneck um oh yeah it's important to note that it gives us the same security guarantees as well so it's the only layer to solution which has the same security properties because no matter what happens to the operator no matter what malicious actors might try to do you can always just go away for a year come back and be sure that you will be able to fetch the uh your your fonts and and get them back to one okay so now we want to scale that so we want to to augment it with the ziki porter accounts how do we do this uh it's actually pretty easy we just select the subtree of z key roll up and we say okay the counts in the subtree are going to be ziki we're going to consider them zk porter accounts and the only difference of this account is going to be that we are not publishing the state updates as call data to ethereum we're just going to ignore it like only the zq roll up accounts are going to go to to ethereum as state updates and the zk porter root hash will also go to ethereum so this will ensure that no matter what changes in the zika porter accounts the users of zika roll up will be able to reconstruct their state because they will know all the blue points here and this one blue point so it gives them all necessary data to construct the merkle proof for their accounts now what happens to the data availability of zk porter we will publish it but to a different network comprised of what we call guardians guardians are zika sync token holders who will store the data on behalf of users they will get rewarded with some small fees and they will provide the data to the zika porter users and they need to sign every single block uh with two thirds or like with super majority of their signatures weighted by stake so with two two thirds of the stake has to sign the state update only then will the ethereum smart contract uh take the state update which will mean that at least two-thirds of guardians by stake know all the details of this block okay so um as you can see the zika lab security is not affected uh but let's consider what happens to the security of zika porter accounts like how how how is this different so since we are still in the same system which is based on zika roll up and we send this the proof of validity for the entire block which which consists which contains all the transactions for all accounts it protects us against theft forgery of any assets and any sort of state corruption whatsoever all the rules of blockchain are going to be enforced by zero knowledge proofs so operators can never still can never can never do anything wrong with the state message state what they can do is uh a couple of scenarios uh one thing that can go wrong is that the guardians uh like at least one third plus one guardians are malicious uh in which case they will just block uh like they will halt the block production they they will uh there will be no operation of the system uh which is kind of like the the the which you get with any l2 uh if the operators are not cooperative then there will be no blocks it's not a tragic event because you can always go and withdraw uh funds from zika porter through a some first exit mechanism which we're going to discuss um in uh we we will have a talk about zk evm in a couple of weeks from now on zk summit held by if global and uh invite you to this talk we're going to talk about priority queue how things work how security is insured but short long story short you will be able to exit and we will even have a mechanism from mass exit to a fork of zika sink so it's not such a big deal it's going to be just short disruption where a lot of steak is going to be lost because the steak is going to be frozen then them but a more severe situation would happen if we had one two thirds of malicious actors then they could actually freeze the entire zika porter account state so the zika roll up accounts would be able to withdraw but not zk porter accounts however in this case the attackers would also freeze their own stake which would be at least two-thirds of the uh of the total staked token which is going to be a pretty large value so uh this is an unlikely situation the attackers have no incentive to do this because they cannot directly exploit it if they freeze the state it's just a suicidal attempt for them like it's a suicide because they cannot steal they cannot do anything with the uh with the funds filters so it can only be done for some weird political reasons uh but it will be very costly so for the same weird political reasons you can attack optimistic roll up at a uh probably lower cost so the the cost of attack on optimistic roll-ups and on zika porter is roughly comparable uh some researchers might disagree with me uh but like it's uh you like if someone really wants to mess with the system they will have to spend a lot of money and the way they will be able to matter the system so it's not the same security guarantees as ethereum however the beauty of zke porter or of this evolution hybrid design is that every user is free to choose the the option you like every user can can select the secure all app account pay higher fees and get full security or go with the zk porter which offers pretty high security but uh is extremely cheap so let's look at scalability properties of both systems with z key roll up uh we're limited by uh ethereum uh block capacity which is which would be like 2 000 transactions per second 2000 transfers per second because all transactions are different but let's let's measure everything with transfers if we consume the entire ethereum block which is unrealistic because all roll ups are going to compete for for the block space with each other and with all l1 transactions so we're probably going to have only a small part of that and like the same applies to all roll ups but on the ziki portrait side we're not limited by ethereum at all we're we might be only limited by uh by our hardware and by uh the capacity of of the consensus and l2 which will probably get us to 20 000 tps and more and there are ways to push the limit further so we will be uh very like the throughput is going to be a lot more which will lead to uh the price of the transaction on ziki porter accounts being like roughly around a few what one cent maybe less it's going to be more or less fixed until we reach the super high levels of throughput whereas with zika roll-up accounts it's always going to be linear compared to the mainnet costs which are roughly 100 of transactions on mainnet so if the gas prices are rising the zika roll up transaction costs will also rise um but what's interesting what's the the most exciting part about ziki porter is that you can have interoperability between these two parts between the two account types completely seamlessly because it's it's exactly the same system it shares the the address space it's the same state um and ziki porter users will be able to access d5 protocols on the zika rollup site which are super secure which can hold billions of dollars in the same security way a secret way as l1 and this millions of zk-porter users will be able to access them at a very very low cost and the reason this works is because we only need to update the we only need to submit the final state of a zika rollup account at the end of the block so if in one block we have 1 000 uniswap trades um from hundreds or thousands of users 1 000 users so less the updates for their accounts will go to the guardians so they're going to be cheap but for for the union swap we will need to only publish one update on the on on chain for on ethereum which will only cost us like one ezekiel up transaction which will be amortized across all these thousand swaps so each of the users will pay some very small fraction maybe 10 cent maybe five cent it depends on the easy key roller prices but it's going to be a lot a lot less so you're still interacting with the same big zk uh sorry with the same big uni swap or balancer or compound or avi or curve uh as all the whales uh and all the landing partners enjoying the full security there so you have access to the the main liquidity channel but you're still you're paying the uh the cost of a very cheap side chain and you still get very high security a lot better than the side chain actually comparable to optimistic crawl ups so this is a breakthrough okay let's move on uh yeah it's important to know that optimistic roll-ups cannot have such an extension uh because for an optimistic roll-ups they need to know the full data availability of all the accounts that are part of the block you can't really hide part of them with zika roll up with ziki porter we can hide part of them because they're still part of a zero knowledge proof so the validity is insured by zero knowledge proof uh but for for optimistic roll up the validators the full nodes have to actually check every single transaction so they can't do this it's not as extendable so yeah the big question is uh when uh when all of this is gonna be available um we are launching the we we we expect the uh evm uh zkvm test net in may this year um to go like we will open it to the public and we are targeting august as the mainland launch date uh but before then we also have an interesting update we will have swaps and nfts on mainnet of zika sync one point x in may this year as well uh so encourage you to check out uh our documentation and and or contact us and we're happy to talk to you and go in details on this and um yeah so i i i i encourage you to uh to look deeper into this and ask any questions we're also happy to to provide assistance anytime thank you very much follow us on twitter

Automatic transcript — names and jargon may be misspelled.