EthCC: Understanding ERC-4337—How it works and exploring unknowns

Blocknative Ethereum Web3

This timely talk covers ERC-4337, new transaction flows, MEV implications and a 4337 mental model. From a new intent layer to alt-mempools, to Paymasters, and to Bundlers, Blocknative CEO and Co-founder Matt Cutler dives into 4337 and explores its unknown.

 

Transcript:

Good afternoon everyone, thank you for joining this lightning talk on understanding ERC-4337. If you're here in this room, you're obviously familiar with it. I am Matt Cutler, founder and CEO of Blocknative. We build core infrastructure for the Ethereum network. We're a block builder, a relay, and we provide all sorts of tooling like Web3 Onboard and a gas estimation, and we've been doing a bunch of work in 4337. 

I have been in the space for almost five years and when I started to read about 4337, I was nothing but confused by it. I was really trying to wrap my mind around it and couldn't. I started to reach out to people far smarter than me in the category and asked them to explain it and what I learned was none of them could explain it either. I realized that we lacked a coherent mental model for 4337 and how it worked. So, I did a deep dive and published a Twitter thread that blew up and is now largely used as the mental model of 4337 as user intents. I want to go through that and dive in rapidly since we don't have a ton of time.

ethcc 03

What do we know about 4337? It fundamentally makes transactions programmable and expressive which we believe as an ecosystem will massively improve user experience. It does so by abstracting away intents, fees, authentication and enabling social recovery of keys, so we don't need users to worry about managing private keys on their own. But it has this super funny property which is no hard fork required, which all of you know, it's an ERC, not an EIP. The question is, how do you do all of that without changing the network?

ethcc 04

To figure this out, to build the mental model, you have to go backwards. So, let's start with the standard Ethereum EOA transaction flow that we have today.

ethcc 05

The user uses their non-custodial wallet to engage with an EOA. The EOA submits a signed transaction to the public mempool, that goes to a builder. Builder talks to a relay, the relay sends the block to validator, and that goes on-chain. There are some extra steps in here associated with MEV for private mempools and search your bundles.

ethcc 06

What does 4337 change about all of this? Everything before the EOA is 4337. Before 4337 we have EOAs and after 4337 we have EOAs and this is why we don't need a hard fork. We have this new network actor known as a bundler. The bundler acts as an EOA proxy on behalf of the user. This brings forward a whole bunch of new possibilities but also adds a bunch of new complexity to the network. New characters, new actors, new incentives, new interactions, new possibilities, new things that can go wrong. That's why we at Blocknative have been quite active in trying to drive fundamental understanding because we think there are a bunch of really interesting things happening under the cover. A bunch of interesting consequences that we as an ecosystem don't fully understand because 4337 is just really rolling out now. It's not widely deployed and many of the thorny issues we think will come out only when we're at significant scale.

ethcc 07

The bundler receives user operations from the alt mempool. This is a massive change to the network. Today, we enjoy a single public mempool, but there's a whole bunch of private mempools, and we're going to move into a network where there are now two mempools. But not really two, because the alt mempool is somewhat of a misnomer. They're actually alt mempools with an "s", there might be many alt mempools. So now you're going to have this issue of mempool fragmentation and mempools are significant.

Users don't submit transactions, they submit intents in the form of user operations. These were not really perceived as intents at least broadly until we went forward with this model. The user intends to do something, and the bundler rolls them all together and turns them into signed transactions. The final step here is a user with the 4337 wallet. We also have additional flows here for MEV.

So, there you go, this is ERC4337, the user intent layer. There are some pieces at the end, the entry point smart contract would update the wallets, and this is it. The whole idea is it's an intent layer that happens upstream of the signed transaction, and the net benefit of this is it doesn't require a significant upgrade, i.e., a hard fork to the network.

ethcc 08

Let's dive into each one of these major areas. The smart contract wallet communicates via user operations. User operations are programmable, extensible, combinable. They allow all sorts of new things to happen, enabling composable transactions. This is one of the things that is most exciting about 4337. Today, transactions are fairly fixed, they have a fairly narrow definition for a limited scope that you can do with them. Under 4337 and user operations, it opens up the design space quite a bit and we can have all sorts of new and elaborate and brand new experiences for users at the programmable transaction level.

This is significant because, as far as I know, in the history of transaction systems going all the way back to credit card stocks, you've never been able to program transactions themselves. It's a weird thing to think about, like what's a credit card transaction? The credit card Network tells you what it is. What's a stock trade? It's what the exchange tells you it is. What's an Ethereum transaction? It's an EOA. And now transactions themselves get programmable which creates a whole bunch of new developer expressivity that's pretty fun and interesting.

ethcc 09

These userOps again go into alt mempools and believe it or not, this is still pretty nascent. The peer-to-peer layer of the alt mempools is still basically being developed right now. So while we think about 4337 is here and now there's still a whole bunch of stuff sort of underneath the covers that really matter and fundamentally the idea is bundlers will each operate their own Alt mempool. So for every bundler, you may have a distinct alt mempool. It starts to get confusing as you say which bundlers are being used where, which wallets communicate with its bundlers, how does that all go. It starts to get interesting at that level.

ethcc 10

This will confound observability. We talked about that. The bundlers then take these userOps and bundle them together and something that looks a lot like an internal transaction right now but that fundamentally bundlers start to look a lot like MEV Searcher and block builders. So are bundlers going to be net new actors who aren't really participants in the network today or are they going to be existing network actors who are quite active in the MEV space, i.e., Searcher Builders?

ethcc 11

And the reason why we think that's likely what's going to happen is to be a good bundler you need all the same skills to be a good Builder and it turns out it's really, really hard to be a competitive Builder and it's quite competitive to Be an Effective Searcher. And it's not a whole bunch of extra work for those players to move into this category. So if you're not familiar with the PBS Market, if you're not familiar with who the relays are, who the builders are, who the Searchers are, which are a little less a little more opaque, we believe that those players will wind up having a pretty significant impact on the world of 4337.

ethcc 12

We haven't talked about paymasters yet. So, paymasters have this cool property of being able to sponsor transactions. What you can do is a paymaster can basically cover the gas fees of for the user UPS. But there's this really interesting property of the paymaster is they see the transaction first because basically the transaction says I want to use this Paymaster and before anything can happen the paymaster has to say yes, I will sponsor this or no, I won't. In the world of MEV, those who see transactions first have an edge. So it starts to get kind of interesting is which players may want to operate paymasters and why because they basically sit higher in the stack than other players and the higher in the stack you have the lower latency you have, first crack you have, etc.

ethcc 13

So the Paymaster category is sort of interesting and just like everything else in 4337, they're programmable. So you can sponsor gas fees with ERC20 tokens, you can sponsor them with off-chain mechanisms like your credit card or even your credit card miles but they can have conditional payments which is pretty fun. So you might say, hey, my paymaster will sponsor the first 100 intents, after that you're on your own, or if you have a certain NFT in your wallet, you get access to this paymaster. And so there's a whole bunch of interesting programmability and infrastructure that can be developed around paymasters to enable new classes of user experiences that go forward.

ethcc 14

Finally, and I'm moving super quick, I hope everyone appreciates just how fast I speak, is this the great unlock? Here's just a simple example of why we think ERC-4337 is super exciting. Meet Alice. Alice is a super fan of a hypothetical music artist named Sailor Twift. She's a top listener on Spotify, she's active in the forum, she has attended a bunch of shows and Sailor Twift wants to reward loyalty.

ethcc 15

But in using the existing mechanisms like Ticketmaster, there's no really easy, verifiable, or programmable way and basically, Sailor Twift wants to have a direct relationship with her fans. Not mediated by the capabilities or limitations of someone like Ticketmaster, so what to do?

ethcc 16

NFT is super straightforward, issue the NFT, the fan can have it, we're all good to go except for one little problem.

ethcc 17

Alice doesn't know about crypto, she doesn't know the first thing about custodial wallets and Metamask or Ledger anything else, she's just a regular old person. So now she's sort of locked out and this is this big gulf that we have.

ethcc 18

Enter 4337 and hypothetically her visa card could be her non-custodial wallet. Alice uses her Visa card to pay for her Spotify subscription, so Sailor Twift says hey, we'll do a promotion with Spotify which will identify our top fans.

ethcc 19

We'll issue an NFT and it will go on to the Visa card that they use to pay for their Spotify account. Easy peasy. And then when the super fan Alice shows up for her show for the experience all she needs to do is present her visa credentials which by the way may be very via her wallet on her phone. She can demonstrate access to the experiences, she can prove that she has the NFT, she could sell or transfer it. It suddenly gets super fluid and this we think is this very interesting unlock where now everybody can have a 4337 wallet.

ethcc 20

And this is the key for unlocking the next billion users. We're going to do top-down and bottoms-up growth for the Web 3 category moving forward. But let's be honest, there's a whole bunch of users with existing experiences and we can meet them where they are using this technology as long as we build it in ways that are easy to use for those individuals. So we do 4337 infrastructure and I think I'm out of time.

I want to thank you for attending my lightning talk on understanding 4337 and all the implications about it. Do we have time for questions? No, we do not. Okay, if you have any questions, I'm M Cutler on Twitter or see me down here afterwards. Thanks, everybody, cheers.

Observe Ethereum

Blocknative's proven & powerful enterprise-grade infrastructure makes it easy for builders and traders to work with mempool data.

Visit ethernow.xyz

Want to keep reading?

Good choice! We have more articles.

eip-4844,-blobs,-and-blob-gas:-what-you-need-to-know
Ethereum

EIP-4844, Blobs, and Blob Gas: What you need to know

With the upcoming Dencun upgrade, Ethereum will adopt EIP-4844, commonly called proto-danksharding...

introducing-ethernow:-real-time-observability-for-ethereum
Ethereum

Introducing Ethernow: Real-Time Observability for Ethereum

On-chain data tells you what has happened. Pre-chain data tells you why it is happening. For anyone..

mempool-archive-quickstart:-how-to-use-blocknative's-historical-ethereum-mempool-data-to-analyze-private-transactions,-mev,-and-ofas
Blog Nav Post

Mempool Archive Quickstart: How to use Blocknative's historical Ethereum mempool data to analyze private transactions, MEV, and OFAs

Blocknative offers the most exhaustive historical archive of Ethereum's mempool transaction events,..

Connect with us. Build with us.

We love to connect with teams who are building with Blocknative. Tell us about your team and what you would like to learn.

"After first building our own infrastructure, we appreciate that mempool management is a difficult, expensive problem to solve at scale. That's why we partner with Blocknative to power the transaction notifications in our next-generation wallet."

Schedule a demo