Flow Community Rewards are here. Earn points for engaging in the ecosystem, spend points on prizes. Learn more.
Developers
March 22, 2023
On Keys and Code: Account Abstraction and the Race to 1 Billion Users
Brian Astrove
On Keys and Code: Account Abstraction and the Race to 1 Billion Users

This article appeared previously in Brian's Bulletin.

The number of weekly active accounts on Ethereum is 27,264 according to Glassnode. We have a lot of work to do to bring web3 to the masses. One of the barriers to broader adoption is usability. Ask any active crypto user and they’ll tell you they have multiple hardware wallets, seed phrases stored in hidden locations, and radars on high-alert for scams that have victimized even the most experienced of us. Do you think mainstream users will put money and time into a system like this?

It is not inevitable we solve this problem, but there have been advances recently; notably ERC-4337 which introduced a standard for account abstraction. While many praised the significant step forward, I was surprised to find a more reserved reaction from the two companies at the forefront of account abstraction since 2018: Argent and Safe (previously Gnosis.)

I wanted to understand why, so I dove deep in the rabbit hole; swimming through topics like smart contract wallets, multi-sig, social recovery, ECDSA-secured externally-owned accounts, mempool, bundlers, and UserOperations. I read the technical standard, Vitalik's explanation, company blogs, and many hot takes on Twitter.

I'm now emerging with insights for entrepreneurs interested in how account abstraction will help onboard new waves of users to web3. Here's the plan:

  • Intro to abstraction
  • The problem with accounts
  • The solution & ERC-4337
  • The reserved reactions
  • Learnings from data and live apps
  • Looking forward

Intro to Abstraction

“Abstraction is a fundamental concept in computer science and software development,” says Wikipedia. It is “the process of taking away or removing characteristics from something in order to…reduce complexity and increase efficiency,” says TechTarget. Let’s use Google Search as an example.

In How We Searched Before Search, the author wrote that initially “the web community was a relatively close-knit one with an esoteric skill-set and knowledge base. So Tim Berners-Lee, creator of the web, took a very pragmatic approach to keeping track of new websites. He made a list for everyone to see. A list of every single website.” Other companies like NCSA and O’Reilly Media followed on with their own lists and manual curation. Then, modern search tools were developed to “traverse a large part of the web automatically by scraping its content one by one. This data was then compiled into a database.” From there, better user experience possibilities opened up.

Along came Google with its website: a simple text box. You don’t need to understand the web scrapers and indexers behind the scenes. You just enter what you want and it delivers a helpful set of links.

This is an abstraction at the user interface level. There are also abstractions between the systems of software behind the scenes.

Source

The Problem with Accounts

Now let’s talk about Ethereum. In 2021, Vitalik wrote “account abstraction has for a long time been a dream of the Ethereum developer community.” Argent, a leading developer on account abstraction, explained why in a blog series that I'll summarize. In short, user accounts have limited flexibility, which makes it difficult to build experiences that mainstream users will accept.

To understand this, there's two important concepts to know: Accounts and Signers. The Account is like your bank account; it's where your assets reside. The Signer is like your bank log-in password; it's the authorization to transact with the assets. These two concepts are linked through what’s called a key-pair: the Signer is the private key and the Account is the public key. These keys are linked through a cryptographic math formula in which you can verify the Signer matches the Account. So it's important to keep your private key private.

The limited flexibility arises because as the blog says "the concept of Account (the object holding your tokens) and the concept of Signer (the object authorized to move these tokens) are basically the same thing! If you have a private key you automatically have an account at the associated address, and to own an account at a given address you must be in possession of the corresponding private key. That logic is hardcoded."

This means if you lose your key you lose your account. It means if someone else discovers your key they can steal your assets. It means you cannot have multiple approvers for company treasuries or joint-accounts. Imagine if you lost all your money every time you lost a password.

This is why more flexibility is critical to onboard new waves of users. It opens the door for user experiences we expect in 2023, with security features like password recovery and multi-party signing. This is what account abstraction promises.

The Solution and ERC-4337

Argent goes on to describe the solution is to "decouple the object holding your tokens (the account) from the object authorized to move these tokens (the signer.)" We need accounts with "their own logic to define what a valid transaction is." In other words, the account would be a canvas for software code to define its rules for authorization and security. The account would be abstracted from the signer. For example, the code could list 3 keys, of which 2 need to sign before any assets are moved. This is called multi-sig and is a popular use case for corporate treasuries to protect from any single individual, or compromised key, from stealing the assets.

This type of code-based account is called a smart contract wallet. Popular developers of these wallets include Argent and Safe. Today, they offer many of the features touted as the benefits of account abstraction.

Ok, so why do we need ERC-4337? Vitalik explained in a blog that, although the benefits from account abstraction are possible with smart contract wallets today, the underlying Ethereum account structure makes it challenging. He describes that smart contract wallets cannot operate without being initiated by transactions from the user accounts. In other words, the user account instructs the execution of code in the smart contract wallet. Because there are transaction fees to interact with the Ethereum network, this could get expensive, and also introduces a layer of complexity as the user needs to manage the ETH balance in their user account just to connect with the smart contract wallet. There is an alternative system where user instructions can be sent through a side network—called a relay system—so that you don't have to pay the full transaction fee every time. The user instructions—called meta-transactions—are bundled together and added to the network by the relayer. One example is Gelato, who then offers lower fees, and also more flexible payments with various currencies like USDC. But Vitalik notes this has a centralization risk as it relies on the side network.

So how does ERC-4337 solve this? John Rising, founder of Stackup who's supporting the new upgrade, says that "unlike other implementations of account abstraction including Argent, Safe, ...and so on, it provides a decentralized relay system so it's censorship resistant." He goes on to say: "It unifies all of the elements of account abstraction that were previously fragmented... It provides a standard for everyone to converge on, so that smart accounts don't end up in closed ecosystems." In other words, the existing smart contract wallets were each built in their own way, with their own methods of sending meta-transactions to the network. This upgrade provides a single standard relying on a common UserOperation object and decentralized relay network. This achieves the cost reduction while reducing dependency on any single entity.

There was no shortage of excitement about the potential benefits. These tweets capture how it can improve user experience:

Twitter avatar for @Rohan_0g

Rohan🧢 @Rohan_0g

🔷 What can this do for an average user?It can do things like:- Wallet recovery- Multi-sign transactions- Bundle Transaction- Custom limits & 2FA- Gasless & Sponsored transactionand many more incredible things.here's how you can use them:

6:14 PM ∙ Mar 3, 2023400Likes23Retweets

Twitter avatar for @Zeneca

Zeneca (🔮,🔥) @Zeneca

ERC-4337 is an order-of-magnitude improvement wrt the usability of EthereumWriting this thread to cover:- What is ERC-4337?- Practical uses of it - Additional resourcesLet's dive in 🧵👇

Image

1:14 PM ∙ Mar 4, 20232,118Likes654Retweets

Twitter avatar for @wabdoteth

wab.eth @wabdoteth

The new Ethereum Account Abstraction EIP is going to be huge.✅ No seed phrases✅ Gassless txns✅ 2FA ✅ Face/Fingerprint signing✅ Monthly spending limits ✅ Session keys (0 transactions during gaming)Wallets are going to become bank accounts without needing trust.

5:23 PM ∙ Mar 4, 20231,025Likes242Retweets

The Reserved Reactions

I uncovered nuances and uncertainty about this upgrade from the teams of the two companies mentioned throughout this article who are at the forefront of smart contract wallets: Argent and Safe. Here are their founders:

Twitter avatar for @koeppelmann

Martin Köppelmann 🇺🇦 @koeppelmann

"Account abstraction is now live on Ethereum" created a lot of confusion. So here is a handy chart. Smart contract wallets do "meta transactions" and somehow they need to be included in the chain and 4337 is simply now one more way to do it.

Image

5:51 AM ∙ Mar 5, 2023231Likes52Retweets

Twitter avatar for @jniset

Julien Niset @jniset

Account Abstraction did not went “live”, the ERC4337 contract was simply deployed on some EVM chains.ERC4337 is a standard to decentralise meta-transactions, but your accounts remain normal smart-contract accounts like @argentHQ or @safe… which have been live since 2018.

Twitter avatar for @divine_economy

david phelps 🐮🏰🃏 @divine_economy

also the fact that account abstraction went live and nobody cares or is talking about it is a testament to why you really, really shouldn’t ship during a conference week

3:16 AM ∙ Mar 4, 2023101Likes69Retweets

More nuance is explained in this thread by a Safe product manager. He says that the decentralized relay system is brand new, so it's currently centralized and fragile. It needs many companies to join the system for it to mature. He also says that the relay system relies on an economic model that is not yet proven. The relayers are compensated for bundling and executing the user instructions, but as he writes: "there is no certainty the incentives from [transaction] fees will be strong enough to ensure the sustainability of the system for users and bundlers."

And finally, many folks have acknowledged the complexity involved. This is a new layer that developers have to learn and interact with. Crypto researcher Kofi points out (via MilkRoad) that it's possible "there’s too much complex terminology like account abstraction, paymasters, bundlers, etc., that will make it hard to build products that regular people will like and understand." John Rising agrees this upgrade would be better if included at the base Ethereum layer but "unfortunately, this hasn't worked out in practice. [ERC-4337] is the best incremental step we have to align the ecosystem right now."

Learnings From Data and Live Apps

What I love more than exciting new technology is meaningful results from users. I always try to anchor down to the data to see how people are actually engaging with live products.

So if the excitement is about onboarding the next waves of users, I want to look at who has been most successful at this so far and how do they manage their accounts in a way that allows new users to join.

How do we identify those products? My opinion is that NFTs are how most new users will first interact with crypto. NFTs are about culture, art, and games; things that have broad mass appeal. Cryptocurrencies and DeFi are about financial assets; things that the users-not-already-here don't get as excited about. After focusing on NFTs, we can filter for all-time transaction count as a barometer of user engagement. Here's the results:

CryptoSlam

What can we learn from them? What are their patterns? Let's go bottom to top.

Pattern 1: User interface account abstraction on Ethereum-based chains

Sorare and Gods Unchained have succeeded on Ethereum and ImmutableX (an Ethereum L2 for web3 games), respectively, by relying on user interface account abstraction, also called app-custody, where they link a user's sign-in email to a blockchain wallet they manage behind the scenes. This allows the app to provide mainstream UX like email log-in, 2FA, and account recovery, while they hold the assets until a user decides they want to withdraw. This is a significant advancement from the closed nature of the tech giants today. In The Exit Option, I wrote that “to have digital property rights, we must also have the option to exit.” Sorare and Gods Unchained enable the right to exit with your digital goods in a way that companies like Twitter and Meta do not.

However, this model raises a conflict between self-custody and app-custody: do you care about true ownership and interoperability, or do you want to use the app without connecting your self-custody wallet for every interaction? I'm watching if they change their account structures based on ERC-4337, as that will be a showcase of this upgrade’s impact for new users.

Pattern 2: No account abstraction

Axie Infinity is an outlier case in that they reached this scale of engagement despite requiring users to create a self-custody wallet to onboard. They developed their own sidechain and wallet, Ronin, for a custom user experience. We can say it worked for this niche game at this time in the market, but now there are more efficient ways to onboard users than the massive lift of building your own blockchain infrastructure.

Pattern 3: User interface account abstraction on Flow

NBA Top Shot has succeeded on the Flow blockchain (a newer L1 for mainstream dapps) in a way similar to pattern 1 but with one notable difference: it's built on Flow which has native account abstraction at the protocol level. It's a differentiated account model using resource-oriented smart contract language Cadence and an architecture similar to a file system, in which the assets reside within the account's data structure, in contrast to Ethereum where ownership is maintained on a ledger in a smart contract. This opens a broad creative space for account design.

One breakthrough design is their recently-announced hybrid custody model—that I wrote about here—which is like joint-custody between the app and self-custody wallet. If we imagine each Flow account as a filesystem, then the hybrid custody model allows an app to have write access to a specific folder within a user's account, but not the entire filesystem. The user still owns all of their files and can revoke external access at will. It aims to solve that conflict from pattern 1: You can log in with email, the app signs transactions for you, meanwhile you can also list on a third-party marketplace via your self-custody wallet. That said, there has not yet been an announcement if Top Shot's wallet, the Dapper Wallet, will implement this model. I'm watching if that announcement comes and resulting changes in user behavior. That architecture would look something like this:

Looking Forward

These patterns tell us that most of the products that have onboarded waves of new users rely on off-chain account abstraction that present a centralization risk in conflict with web3 ethos. But this is an exciting time with innovations like ERC-4377 and Hybrid Custody that may offer new ways of preserving true ownership alongside better user experience. We need to experiment in many ways with many patterns to learn what will work for the next wave.

Web3 is at a crossroads: regulators are chomping at the bit, bankruptcies are underway, meanwhile we just endured a 60+% market downturn. It feels like we’re fighting for our right to exist. Like we’re fighting to prove we can bring value to the world.

So let’s prove it and break through. Good luck to you out there leading the charge.