Bridges are Shared Sequencers

ETHCC 7 · 9 Jul 2024 · 15:24

Nick Pai, lead engineer at Across, an intent-based bridge secured by UMA, argues that bridges and L2 sequencers are more alike than different. He explains how fillers front funds to users and sell them pre-confirmations, then get repaid in batches posted to L1, much as L2s batch transactions. He says both trade decentralization for better UX, keep small on-chain contracts with costly off-chain compute, and should be judged by where they post data. In Q&A he expects more ZK-verified bridges and guesses some of these companies may eventually merge.

Speakers

Topics

From ETHCC 7, hosted by Ethereum France.

Transcript

Hi, my name is Nick Pai, and I'm the lead engineer at a cross protocol. It's an intense-based bridge secured by UMA. We're on the EVM space, and we've been around for a couple years. So today I'm gonna talk about this idea. I've had my head for a couple years while building Across that a bridge's software stack and architecture is very similar to a sequencers. And I'm gonna kind of go through some examples of why the architectures have emerged the way they are, why they're very similar to sequencers, um, L2 sequencers, why the business models are pretty similar, and then I'm gonna drive towards my end thesis, which I haven't fully formed, which are bridges and L2 sequencers should be considered more of the same problem than not. And I'm hoping throughout this presentation to help consolidate the Ethereum knowledge tree.

Intent bridges provide marketplaces for users to submit intents, which are cross-chain value requests to move capital from one chain to another, and they provide a marketplace for uh third-party fillers or searchers or market makers, however you want to call them, to fulfill those intents. The bridge is then in charge of repaying those fillers, and because the bridge has this flexibility of when to repay, the bridge can choose to repay them in batches, which is going to look very similar to how an L2 posts data to L1. Specifically, I will use Across as an example of a bridge because I know it very well.

But I think Across is Across was the first intense-based bridge, and I think it's a very good example of how you could build an intense base bridge. So why are L2 sequencers architected the way they are? I'm gonna argue that uh form follows function, and I'll go really quickly into how I think of an L1 and L2 works, and then why I think the software architecture was was the natural emergent form. So blockchains like Ethereum sell decentralized, censorship resistant, safe block space. What I mean by decentralized is that there's no way to take down the blockchain.

If AWS or GCP goes down, the blockchain shouldn't go down, and there should be no way for a single government to regulate a blockchain out of existence. Censorship resistant means that any user should be able to submit a transaction on the blockchain. And safety means that any user should be able to audit the block that's being proposed, and any misbehaving block producer should be disputable. They should they should not be allowed to post uh bad transactions to the blockchain. So I I think of it, Ethereum sells World War III resistant premium grade block space.

This is the good stuff. L2s were created to solve the problem that decentralization creates, which is in order to reach decentralization, blocks have to be agreed upon by all of the networking um participants. This takes time, obviously, but it allows Ethereum to reach finality in six to seven minutes. And the way they do that is L2 sequencers created these black box servers where they sold tickets into the server, and these tickets uh told to users, you're going to be allowed to enter L1 blockchain eventually. We're going to post your data.

We're actually going to batch your data with the next 100 users to amortize costs, and we're going to sell you this instant pre-confirmation very quickly. And the best L2s will still offer that superior UX where they amortize costs to keep transactions cheap, and they'll offer these pre-confirmation tickets very quickly while also maintaining safety, which means that any time one of the L2s posts to L1, these L1 blocks can be can be challenged because they're transparent and they conform to a very deterministic set of rules that anyone can verify against using software. And they also maintain censorship resistance, which is anyone should be able to get a transaction into an L2.

So L2 block space can achieve superior UX, but they have to trade off decentralization. There's no way to get around this because in order to achieve decentralization, you need network participants to reach some sort of agreement, and that takes latency. So the workaround is to offer a centralized sequencer who offers tickets into a black box which posts to L1. And then this L1 sequencer can offer very fast and cheap block space. And the rule set are this quote unquote L2 consensus rules.

Finally, users should be able to force entry and exit into the L2. L2s achieve good UX because they are a black box server. They're running very fast and they're selling instant pre-confirmations to users. When these L2s reach, say like a hundred pre-confirmations, they batch them together, post them all at once, they amortize costs, and then they sell pre-confirmations to users to provide the illusion of speed. But the users are not actually guaranteed safe if they don't know how the black box is working under the hood. This is an image from one of Vitalik's posts, which kind of visualizes this concept.

So imagine these L2 blocks contain four pre-confirmations each. Each of those pre-confirmations is a user trying to do something on an L2, and those are getting batched together in order to split the costs since L1 block posting incurs a fixed cost. And then once it posts to L1, and once that L1 block is finalized, the L2 transactions are considered finalized. So now let's look at what is a bridge's architecture. Form follows function. So what's a bridge's function? A bridge is supposed to let users transfer funds quickly and cheaply between chains while maintaining self-sovereignty and censorship resistance.

In a bridge, users signal their intent to transfer value cross-chain. A bridge provides a marketplace for fillers to sell pre-confirmations to users with cross-chain intents. So whenever a user interacts with a bridge, that they they must lock capital somewhere. That capital will eventually make its way to their final destination, but it's going to take, say, seven days if you're going from an optimistic roll-up to another optimistic roll-up. Now you can think of a bridge as selling a short circuit way to move past that process. You can think of a bridge as fillers selling pre-confirmations to the user that we are going to get your funds to you the final destination, and you can pay us for um uh assuring this.

This is how an intense-based bridge works, where in the left, the green circle, intents are created on the source chain, the yellow block, and then these robots, which are sources, uh searchers, solvers, market makers, they're fronting users. They're crediting them on the destination chain. And then in the green blob is basically a block, a bridge block of intents that are being fulfilled and they're being batched together and they're being posted to L1. Um, this is possible with intents because the agents who are fronting the users are all acting independently and quickly, and then they're being batched together by however the bridge wants to do it. Not all not all bridges batch transactions, but um the ones that are winning are doing that because it's the best way to amortize costs.

So you can think of a bridge as sequencing user intents. Um intents can be described by a new standard ERC76A3, and you can think of a bridge as maybe like a mini sequencer, like offering pre-confirmations of L2 transactions that are also um pre-confirmations. So a bridge more specifically sequences a specific user op transfer of funds from source to destination chain. And finally, a the most specific uh description of a bridge is a bridge sequences successful sales of filler pre-confirmations to users seeking cross chain transfers. That's that's a mouthful, but what it's saying is that fillers are selling pre-confirmations to users, bridges are selling pre-confirmations to fillers.

Fillers can sell pre-confirmations to users and then seek repayment from a bridge if that bridge offers safety and censorship resistance to the filler. So what a bridge needs to do is a bridge needs to repay fillers in an audible, transparent way. A bridge needs to make very clear what their rule set is for repaying fillers. There should be a deterministic rule set. You can think of this as a bridge's consensus rules, and fillers should always be able to challenge any any batch of repayments that they disagree with. This batch of repayments should pass some sort of verification.

For example, it might want to pass some optimistic verification, or it may be submitted with a validity proof or with insurance. There are various ways that bridges can offer auditability and transparency to fillers. So let's replace a cross here with bridge. But it should be for any safe bridge, it should be possible to recreate any batch repayment block in the bridge's history. This is true for any L2 as well. Any L2 should always, any user should be able to recreate any L2 block. So today most bridges post these batches and they're optimistically verified, which means the bash gets posted to L1, and then the block is like pending for a couple hours, and anyone can challenge it using using software because there's some deterministic rule set that all parties are in agreement with.

Longer term, I imagine most bridges are going to submit these batches with validity proofs once we have better proof aggregation technology. And even and there's also a parallel world in more in the eigenlayer space where these batches are posted with insurance. Perhaps these batches are are the the bridge sequencers are actually eigenlayer AVSs that are posting with some credible commitment of we're staking X amount of collateral behind this batch. So I guess my point is driving at the idea that bridges and sequencers have very similar software architectures and they have similar costs.

Of course, they're not exactly the same, but I've been thinking more and more about how bridges and sequencers are the same, and the the problems are like quickly colliding in the space. They have similar models. Bridges and sequencers have very expensive off-chain compute costs, and they have very small on-chain footprints. The contracts in L2s and in bridges are quite small. They're basically holding places to post data where then anyone can audit that data and challenge the poster. Both bridges and sequencers sell pre-confirmations, and in exchange, they buy premium grade World War III resistant block space to store the validated pre-confirmations.

So I guess one takeaway here is if you uh you should similar to an L2, you should evaluate a bridge based on where it's posting its say the two. If it's posting its data to uh and a final blockchain that's not very secure, then that's basically the limit of your your bridge's security. Now, if you post to L1, then you you're getting you're inheriting L1 security. And finally, bridges and sequencers have similar software trade-offs. They both sacrifice decentralization in order to offer better UX. They sell instant preconfirmations and they amortize uh transactions and batches.

And the best bridges and L2s must maintain safety for users and censorship resistance. So, as an aside, why am I talking about this? I run a bridge, but I I thought this tweet was very motivational when I was thinking about my talk, which is that one of our jobs as researchers and engineers is not only to add new features to the space, but to help refactor and prune the collective knowledge tree of Ethereum. And I think there's been a lot of discourse on sequencers, and there's been a lot of discourse on bridges. There's actually been a lot of there's been a lot of FUD about bridges.

People think bridges are not safe, but people now generally accept that L2s and sequencers are safe. But I think they both share very similar security profiles, and they are much more similar than different. So what I offer is domain reduction. And bridges and sequencers are hard problems with similar business models and software constraints. And that's it. Thank you. Are there any questions?

If you have question if you have questions, please uh raise your hand. Okay, there's always some questions. Hello. Oh, great. This works. Um so one question I have is like what where do we go from here? So like you've I I think the point is clear, but I'm just sort of trying to see like what's next in your view. Yeah, I think so.

I I think like a lot of people deep in the Ethereum space kind of know where L2s are going. We the endgame probably involves validity proof verification, sort of optimistic verification. Um, and then there's this whole realm of like base sequencing that's being talked about. I think bridges similarly, you're gonna see a lot more bridges that use ZK verification. I think bridges are a lot safer than people think if you use this sort of like batch posting of settlement to L1. It it reduces the attack surface a lot. So I think bridges and L2 as we see more and more L2s emerge in the space, we're gonna have the the importance of bridges are are are gonna I guess I guess keep there.

Because there are gonna be all these L2s, they're all gonna have connections with each other, and there's a way to build bridges very safely. And in in the long run, I imagine that these architectures are gonna look very similar. They might even see some of these companies merging, is what my guess would be. Thank you for the question though. Anything else? Okay. Now see, I'm not gonna be able to do that.

Related talks