Introducing the Elastic Chain

ETHCC 7 · 11 Jul 2024 · 25:07

Alex Gluchowski presents the Elastic Chain, a network of ZK rollups meant to scale capacity with demand. He argues that reaching billions of users needs many chains, and that chain abstraction cannot work without a native protocol built for it. He explains why bridges between separate chains need trust, and why rollups updating balances on Ethereum stay slow and costly. His answer is a shared ZK router contract holding assets and state roots, plus a ZK Gateway that composes proofs for interoperability he puts at around one second. In Q&A he says users pay gas once, using native account abstraction.

Speakers

Topics

From ETHCC 7, hosted by Ethereum France.

Transcript

Hello, everyone. Uh, bonjour. Um CEO of Minor Labs and uh one of the creators of ZK Sync. And today I'm gonna talk about the elastic chain, uh, the big new phase in the history of ZK Sync. Uh, you probably all know ZK Sync is one of the largest, most mature ecosystems. Is it's definitely by far the most mature technical roll up ecosystem on Ethereum with uh huge number of transactions, really bottle tested tech, uh holds the record of the highest TPS on uh from from all L2s, and is uh I'm happy to report that uh despite the the airdrop being behind us, uh the uh activity on the network is uh still growing. Uh with we're currently the number four by uh uh weekly active addresses.

So uh things are going really well organically. Uh but I want to remind us why we're here in the blockchain space in the first place. I think it's very important to always keep this in mind in in the times of bear markets and with all the distractions like um uh meme coins and speculation. Uh this is not what blockchain was created for. Like Bitcoin, the large part Ethereum, it's definitely ZK Sync were based on the central belief that freedom drives progress and prosperity. And this were technology is built to increase freedom.

And this is the mission of ZK Sync. Uh, to advance personal freedom for all through mass adoption of crypto of blockchain technologies. And this is happening. We see the huge rise in stablecoin adoption, we see really interesting things in the developing world, but also in the West, happening that were not possible, not even thinkable before crypto was there. So we want mass adoption. We want to increase, we like we we still lack the infrastructure capacity to reach the uh the like millions of people, big masses, but we need to do it in a specific way. There are certain properties that we need to preserve at this scale.

We articulated them in uh ZK credo some time ago, which sets the direction of uh the values for ZK Sync community. Uh, and I'm very happy that we made some significant progress as as a project as a community on uh on many of them. Um, some progress on some, some are still behind, but it's clear what the path forward there is for them. Uh but there is one that sets ZK Sync apart from Ethereum. Like Ethereum would score pretty high on all of these uh key things, except for hyperscalability.

Because to get to mass adoption, we need to be able to address close to five billion active internet users worldwide. Like this is we're we're eons far from there yet. The single blockchain, no matter how scalable, no matter how you're willing to give up decentralization for this purpose, cannot do this, just like the internet doesn't run on a single server. So you need many chains, you need the ability to scale horizontally to add more capacity to you to your systems to accommodate the demand. And this is why I'm presenting the the uh the the this next step of the evolution of ZK Sync.

So the there was an upgrade a few weeks ago that marks the transition to basically an entirely new type of system. We call it 3.0. Like the first iteration of ZK Sync was a specialized roll-up for payments. The second iteration launched a year ago, a year and a half ago, was the the first ZK VM, the first ZK rollup capable of proving Ethereum transactions with written in Solidity and adhering to the EVM standards. And uh now we're unveiling the uh um uh something that is basically a network of roll-ups, network of ZK chain ZK ecosystems seamlessly connected together in uh with unified intuitive UX in a way that can grow elastically, accommodating any demand. So elasticity is an economic term which means um ability to increase the supply proportional to the demand.

Perfect elasticity means basically infinite supply increase in response to to any search and demand. And uh you you you know, like this is the uh the mental model of how you can think about it. With a cloud drive, you you're not bound to okay, like I have one gigabyte, two gigabytes. If I need to extend it, I need to think and need to go to shop, like connect more drives. No, you just keep increasing your usage and and the it magically scales with your usage, and you can invite more people and collaborate on these things, and it just goes infinitely large, you just pay as you go on on the demand. And this is what the elastic chain means, but in a way that is fully abstracted from the user perspective.

So as an end user, if again thinking about onboarding with five billion people, they should not know on which chain they are, which chain they connect to. They just work with applications. They just go to a website or to to a DAP, maybe decentralized um DAP um interface, and they just interact with it. And you want it to be very, very simple, very intuitive, no hassle, no seed phrases. Um so basically all of that powered by smart wallets. With, you know, like you have your face ID, you have your stable coins maybe there, or maybe maybe maybe ETH native crypto, maybe not, and you just pay in whatever assets you have for your transactions and the the and they are very low on cost.

So that's the ultimate vision. And to get there, we need uh a couple of standards on interoperability, and we we uh we need the ability to to get many chains with infinite increase in uh storage in like in in data availability, but also seamless interop in a trustless way that preserves those big cypherpunk values that we had in the beginning. And uh I want to walk you through the challenges that we have with the cross-chain interoperability. So I I want to make a very bold statement.

Uh I want to claim that chain abstraction without native protocol designed for it, is not possible. And I'm I I will try to explain it as as much as I can on a technical level. Uh let's start by recapping like what's a blockchain. You can look at the blockchain from different angles of attraction, but essentially it's a state. It's a shared state that we can all agree with, we can all come to consensus what the state is at any given moment, and we make a state transition by transacting with this blockchain. And the state is like if you think of Ethereum, it's a set of accounts.

Each of the accounts has some data. Some of this data represents assets. So you can think of it as a set of accounts with some balances, right? And and maybe some some more data. Now we have a set of validators who have a consensus mechanism, how they come, how we reach consensus, what's the next state is what what comes what comes in the next block, what changes we make to this state. And they use some Byzantine fault tolerant consensus mechanisms with like two thirds being honest, you can make progress, all fine. So imagine we have a different blockchain and we want to transact with it through a bridge.

Okay. So like let's first consider an example where we have two completely separate blockchains, like Ethereum and Solana. Uh Solana has its own state and its own set of validators that reach consensus on that state. And they they have their own native assets. So if you want to send ETH from Ethereum, which is native to Ethereum but not native to Solana, you would need to come up with some counterpart representation of this asset on the other blockchain, and it's not going to be a native asset. You see a different color there.

So it has to stay in some account locked somehow, controlled by some mechanism. And you need an ability to send a message from the destination blockchain to the source blockchain to unlock it. And you can do it in multiple ways. The way usually, or like most bridges operate today, is they just have a multi-sig. They have a few validators of this bridge that control this asset there. It has nothing to do with blockchains, it's not trustless, it's it's not secure. You have billions of dollars uh worth of hacks of those bridges, specifically because they hack the keys.

They don't hack the protocols like in m most frequently. They hack the keys because the keys have to be online on hot wallets, and they are notoriously hard to protect from the OPSE perspective. But there is this idea that okay, we can try to abstract the chains and do do this message passing somehow secure by maybe like using ZK, by maybe like passing consensus messages from one chain to another, and this is what Cosmos was trying to do with IBC. Um and there is a huge problem with this approach.

Like it could theoretically work, it would be still like not quite native because the assets would still be locked on the on that side. But you could say, okay, we have this consensus over there, two-thirds, as represented by the green pie chart, agree that this is the new state, and we want to send this message back to Ethereum and unlock the funds. And you could do this, and Ethereum consensus can verify the signatures, and they could believe that okay, this is this is fine, this is really like the some state of Solana. The problem is that there is more than the validators.

There are you like there are full nodes that observe the state of this both chains, and they don't need to trust the validators. The validators can can misbehave, can do something wrong, but the full nodes will verify every single transaction that's happening on both chains. And in like if the validators misbehereum and Solana, the economic security is pretty high. But you cannot argue the same for you know like in like you would still break the model, but you can say, okay, it's very unprobable. So I personally being one of these guys, I'm gonna trust it.

Like maybe I trust these two chains, so I'm I'm gonna I am fine with validators deciding on my behalf. But this does not scale. This does not scale to like thousands of chains. And this is what we need to get to five billion users. We need this perfect scalability. We need the ability to add blockchains or like individual chains into this network as they demand growth without having to trust them, and with all of those full nodes of all those individuals having to trust all of the rest. That is just not feasible.

Like, I mean that's that will break the the very fundamental assumptions that we have about the blockchains that will not work, for example, with um big institutions that are gonna tokenize all of the uh native real assets like stocks, etc. on on these blockchains. They're doing it now on Ethereum because Ethereum is trustless, but they they cannot extend this trust to some no name blockchains that might be completely legit, but they just don't, you know, like you need an objective way to prove truth and to come to objective consensus of what the state is. So Ethereum realized that, and Ethereum is not trying to do all of this.

Ethereum is trying to do cross-rollup interop. Ethereum embraced roll-up center crowd map, which is the right thing to do. And the the I believe this is the future. This is how we we're gonna get to the mass adoption. The problem is it's also broken, but in a slightly different way. So let me walk you through. Like, imagine we have two roll-ups or two two L2s. A definition of an L2 is it derives security from Ethereum from the underlying layer one. By committing its state to the layer one and committing the uh doing the state transition in a way which is verifiable by layer one or at least enforceable by layer one in in for optimistic rollups. Okay.

So what we could do here is we could make trustless message passing between the two rollups. We would achieve this by committing some state on one rollup and reading this state from another roll-up once this commitment is propagated to Ethereum. In case of ZK, this would happen very fast. So the moment you you commit and some submit your proof from a ZK rollup, it's immediately available from all the other rollups. You don't even have to wait for L1 finality. You just like tap into it in the next block.

If Ethereum reverts, your roll-up also reverts anyway for all deposits. That's fine. It does not work for optimistic rollups because you have to wait seven days. And it doesn't matter if you if you're doing it like on L2, on L3, that is settling to an optimistic L2. To get to a trustless interop state, you need to wait seven days. Because that's the the only moment where another non-related rollup can read the state and be sure of its authenticity. But let's say we have two ZK rollups and they can can always just connect.

Like let's say like we have ZK syncera and maybe like Starknet or scroll or Tyco. Okay. Uh the problem there is that even though the message passing could be trustless, and the balances are native on both sides. You have ether there, it's native ETH, which was bridged from Ethereum, and you have ETH on the other side. You could try to send this 10E from the uh error account or to this L2 account. The problem is that native assets in the rollup means that those native assets are locked on layer one.

So you have your accounts on layer one, and they represent the total balance of the entirety of the balances of the corresponding L2s. So whenever you do a transaction between L2s, you would need to update these balances here. And that means a transaction on layer one. And that means it's it's not fast because you have to wait for layer one to propagate. But more importantly, it does not scale elastically. You have to pay like layer one is expensive. The whole point of L2s is to get to subcent or like one cent transactions at least, and keep it at huge scale. And that does not work.

And that's why you need a special architecture from you, you need a property design from the beginning. And this is exactly what Elastic Chain is doing. So what we can, and by the way, this is like Elastic Chain is equising effort, but I hope that we'll be able to expand it to all rollups on Ethereum and get at some point get to this architecture at like pan Ethereum level. And we we can talk in a bit about what this would mean. But what we could do is an interesting thing. We could merge both balances of these rollups together, or maybe not two roll-ups, but like many more rollups, keep them all together and just keep a root hash of the balance of the root hashes of the state of the two roll-ups in this one account.

And whenever we have a state transition on one and and another, we just update this root hash, right? And this way we can update the the balances back and forth, and we just update the root hash, balances don't change. So we don't have to do any transactions on layer one. The cost, the footprint of layer one remains off one for both rollups. And that is the architecture of the elastic chain. So you have multiple chains, you have the ZK router, which is this shared contract which holds all of the assets and the state of all of these chains on Ethereum. And it is responsible for shared liquidity.

So liquidity becomes like seamlessly flowing between those chains with any transaction costing not more than you know, like any cross-chain transaction does not cost more than a single cost of transaction one chain and single cost on the other chain. And you have the single point of proof verification. So you amortize all the proofs, and it's very cheap. And you can scale this indefinitely. The end can be arbitrary high, like thousands of rollups, each of them doing thousands of TPS. So we get to this millions of TPS with billions of users.

And the ZK Gateway is a component which provides proof composition. So it's a specialized chain essentially, which composes proofs together, which enacts faster finality, so your interop can be basically in one second, and fully trustless interop can be one second plus your plus your proving time, which is going down to also like just a few seconds or or maybe one second. Like we I think we'll get to real-time proving in in like about two years from now. Uh so all those chains can remain autonomous. They don't depend on each other.

They depend on the shared infrastructure, but the shared infrastructure is gonna ossify and become basically immutable. And they have isolation of their balances through the ZK gateway in ZK router infrastructure. And this is something that we can eventually extend to Ethereum overall, enshrining the something like ZK router in Ethereum. So what I think is gonna happen is we will experiment in in our respective ecosystems, and some of them will lead the way, and then we'll come together and hopefully do something like enshrinement of this component. But on ZK Sync, the this movement towards application-specific chains is getting huge traction.

We have close to two dozen chains that are about to launch their own ZK chains on the elastic net on the elastic chain on this elastic network by the end of this year, with uh some really big names here, with like reaching to millions of of users uh from Lens, Chronos, uh, you know, like with the uh some of them are launching, some of them are very new, some of them are migrating. And a really interesting path for an application developer is to start just on a single roll-up, for example, in ZK Sync era with an application, find product market fit, develop it, like find your users, get your community up uh uh and running, and then graduate into your own ZK chain with your own consensus, with your own full control, with your own rules, your own token, your own, you know, expanding whatever uh constraints you want to put there, and then have it as a like part of this ecosystem where we're interaction is still seamless.

Your users can seamlessly in one click interact with any contract on Lance or on uh you know specialized chain for for swaps or whatever they want. Like one confirmation, no hassle, and like within a few seconds you get the curve, the the finality there. And that is why ZK is the end game. Thank you. Got time for questions? No, okay. Maybe one question from the audience.

Hi, Alex, thank you for the talk. Really excited about uh the elastic chain. I'm curious about how gas abstraction will be possible for a transaction that goes through multiple ZK chain. Will the user will have to pay the bootloader on each chain, or only at one point of entry. So the question is like how the transaction between multiple chains is possible with what exactly? Like for a gas abstraction. Like if a transaction is going through multiple ZK chain, will the user will have to have gas on each of these chains? No, no.

You you like you always have your you you don't need to have more than one account on one chain. All of the ZK chains share native account abstraction capability. So you can pay in whatever token, like whatever liquid token is gonna be accepted by the validator of your first chain, and then the the or validators, the sequencer of the first chain, and this sequencer can then like cooperate with the sequencers of other chains to relay the transaction over there, which is gonna still remain trustless. So you only pay once on one chain, but then you pass a message and you attach multiple balances potentially to this message.

So the transactions become asynchronous, but still composable and in a way atomic. So for example, you you send like you want to swap, you you you leave on ZK Sync era, that's your home base, and you wanna go to some like swap chain to make a swap. You say, I'm sending 100 USDC and I want to get ETH back. So you sign this transaction, you do one tap or confirmation and on your biometrics. Go into the smart contract of the swap AMM, are either swapped or not swapped if the slippage rules are exceeding, whatever, and the whatever result you have is then flowing back.

And so you have three segments of this transaction that are all chained together, but at every segment it's atomic. It's like either doing what you want or reverting and then sending back the unused assets. And and from your smart wallet, you will see exactly like there will be no approvals, like infinite approval thing. You say, I'm willing to risk this hundred USDC, no more. And then it's going there and it's going back, you don't need to do anything. It's just like like a boomerang returns back. We want that. So that's that's the elastic chain vision overall for the UX. And the this is becoming reality.

Okay, I I think we run out of time. Thank you, guys.

Related talks