Making Ethereum accessible: How ERC-4337 will bring the masses on board

Gargilohia
RoverX
7 min readMar 17, 2023

--

The ERC-4337 Ethereum standard is a game-changer. It implements the concept of account abstraction, popularly believed to be the key to all of our wallet problems.

It’s well-known that web3’s neat, attractive concepts are walled by a steep learning curve that restricts mass adoption. Private key management and multiple sign messages give non-crypto geeks a headache and really don’t help the onboarding process.

The good news is you do not have to be a technical wizard to trade NFTs, receive membership-based crypto newsletters, or play truly immersive web3 games anymore. The newly proposed standard takes care of it all.

But we understand that reading Vitalik’s blogs and ERC drafts can feel like trying to decipher a secret code written in hieroglyphics–you need to be fairly well-versed in math or computer science just to understand them. So here’s a simpler breakdown of the advantages ERC-4337 offers, how it differs from the existing systems, and the potential loopholes it contains.

What ERC-4337 brings to the crypto table

ERC-4337 provides a smart contract-based account (‘Contract Account’) for every Ethereum user. Before diving into the details of its underlying technology, let’s explore the host of advantages this technique offers.

Standard user onboarding and wallet recovery

With the introduction of the standard, your wallet code can seamlessly integrate with your mobile device, allowing for secure authentication through features like Face ID on your iPhone. Your smartphone could even transform into a hardware wallet!

ERC-4337 smart contracts don’t rely on private keys, meaning you won’t have to stress about remembering seed phrases. With the added benefit of “Group-Access” wallets, you can even designate guardian contracts or accounts to help retrieve access if you ever lose your seed phrase (This concept is popularly referred to as social recovery).

Social Recovery(Source)

Bundled Transactions

With current wallets (EOAs), managing transactions can be a real pain. Every transaction requires multiple sign-offs, which can be tedious and time-consuming. Account abstraction allows for the bundling of transactions, meaning you can send multiple transactions as a single bundle. This not only saves time but also reduces gas fees, making transactions even more cost-effective

Bundled transactions (Source)

Custom spending limits

Contract Accounts are programmable, and you can predefine periodic spending as part of your wallet code while subscribing to compatible web3 services. Just like with a credit card, users can have the ability to set usage instructions and alerts by placing limits on their accounts. For example, you can instruct your account to notify you whenever any DeFi service you’re subscribed to exceeds a spending limit of 100 USD per month.

Gasless & Sponsored transactions

Smart contract wallets introduce the concept of Paymasters, which allows for sponsored transactions. This means that you can initiate a transaction or mint something on behalf of a company, or even set up a dApp that offers gas-free usage for a certain period.

When a user initiates a transaction, the gas fees can be extracted from a different address upon confirmation, making it easier for companies to manage their gas expenses. This feature could also encourage more users to try out DApps, as they would not need to worry about gas fees for a certain period of time.

Gas abstraction and quicker dApp ops

One of the major advantages of using ERC-4337 is the flexibility it provides when paying gas fees. With the account abstraction functionality, users can pay gas fees using any ERC-20 token in their smart contract wallet, instead of being limited to native tokens.

Additionally, third-party services using ERC-4337 can offer the option to pay for gas fees in fiat currency, thanks to the smart contract enhancement. This can potentially speed up dApp interactions and make it more convenient for users who don’t have native tokens with them.

Automated DeFi

Your smart account wallet can be programmed to do all of DeFi’s heavy lifting for you. Want to earn passive income from your idle crypto? Simply instruct your wallet to push some amount into a liquidity pool for earning yields. Users can also program their wallets to scour specific marketplaces and exchanges for low-cost options and set custom metrics to track their tokens while it automatically executes investment flows.

Improved UX for web3 applications

CAs allow for improved user experience by allowing users to grant specific privileges and durations to semi-trusted spaces, such as a browser or a game. This means that instead of having to constantly approve transactions, users can pre-approve transactions per the predefined wallet code and session keys, making it easier to mint multiple NFTs or play games that require the use of tokens across multiple sessions. With this functionality, users can have greater control over their accounts and transactions, without having to compromise on user experience.

CAs further the concept of “Trustless Banks”. They also introduce more opportunities for fraud monitoring and prevention, by setting limits on transactions and monitoring for suspicious activity. With self-custody, users can maintain control over their funds and assets without relying on third-party custodians, but with the added benefits of smart contract functionality and customization.

Additionally, account abstraction can allow for more one-click experiences, offering better UI for DApps and other web3 services.

You probably understand why the standard is so important. Now you can choose to rest easy, without worrying about its underlying nitty-gritty details. But if you (like me) are one of those people who simply have to know, let’s take a peek under the hood.

The tech underlying ERC-4337

Let’s begin by understanding the issue with the current wallet operation.

The Metamask account you own is an ‘EOA’ (Externally owned account). As the name suggests, these are accounts owned by entities outside of the blockchain — namely users. When an EVM transaction is executed, it first interacts with an EOA, which must pay a miner/validator fee to execute the transaction. This design is simple and efficient, but it is not practical for most users because if they lose their private key, they lose access to their account.

Source

To address this issue, Vitalik and other developers came up with account abstraction, which converts all accounts into smart contracts. Contract accounts can define and manage their own valid transactions. This also allows each user to have an account that is tailored to their specific needs, instead of the currently existing one-size-fits-all approach.

Unlike Externally Owned Accounts, the ERC-4337 standard uses rollups and leverages specific functions. These functions are defined by an API. Here’s how it works:

Instead of transactions, users send UserOperations to a higher level mempool. Miners or bundlers can then bundle a set of UserOperations into a transaction and send it to the EntryPoint contract for execution. The EntryPoint contract ensures proper execution of the operations and compensates the miner/bundler for the transaction fee. The API includes lightweight checks for the sequencer to prevent invalid bundles.

Source: Vitalik

With ERC-4337, developers can write custom smart contract wallets with just a few lines of code and not have to worry about subsidizing transaction fees. Note that like smart contract wallets, ERC4337 does not eliminate EOAs.

Although the standard is promising, there are a few concerns linked to its popular adoption.

Higher operating costs and low interoperability

We know that key pairs can be created for free but the creation of contracts requires gas money. Sure, CA offers the option of sponsored transactions, but someone still needs to pay the fee in the end. Furthermore, since CA doesn’t deal with key-based signatures, implementation outside of the Ethereum chain can be tedious.

Infrastructure needs

Given how the underlying technology operates, large-scale adoption of CAs would require more bundlers which would drastically increase the infrastructure costs.

So the standard has a few drawbacks, but it has the potential to supercharge the daily transaction volume and drive up revenue by simplifying the onboarding process. DApps, especially those in DeFi and NFTs, can experience significant benefits from the seamless synchronization of user wallets with contracts.

Builders looking to bring their projects to web3 can harness the power of ERC-4337 to create fully customizable and permissioned flows that drive adoption. The Ethereum Foundation is also actively supporting third-party builders by offering Wallet Contract APIs and SDKs to help them utilize the ERC-4337 standard.

Originally published at https://roverx.io/blog/

--

--

Gargilohia
RoverX
Writer for

A Computer Science undergrad exploring life.