In the ever-evolving world of blockchain technology, Ethereum has been continuously pushing the boundaries to improve and advance its network. One such development is the introduction of the Ethereum Improvement Proposal (EIP) 4337, which has led to the Ethereum Request for Comment (ERC) 4337. This blog aims to unpack ERC-4337 and its role in account abstraction on the Ethereum network.
The Idea Behind Account Abstraction: EOAs Vs. Contract Accounts
Account abstraction is a groundbreaking concept aimed at simplifying the user experience on Ethereum by allowing developers to create custom account logic. Currently, there are two types of accounts on Ethereum:
- Externally Owned Accounts (EOAs)
- Contract Accounts.
Think of contract accounts as the super-smart, code-living-on-the-blockchain entities, while EOAs are the people behind the scenes (although one person can have many EOAs).
For example, your MetaMask wallet is a classic example of an EOA. It’s comprised of a magical cryptographic pair of keys: a public key and a private key, which together allow you to control your account activities.
On the other hand, contract accounts are a little different. They don’t have a private key because they’re smart contracts that operate based on the code inside them. A single user does not control them. Rather, they’re controlled by the logic programmed into their code.
Here’s the kicker: smart contracts can do just about anything you can dream up and then some. Whereas EOAs are limited to signing transactions, contract accounts have the power to execute any code you write. So, the next time you interact with the Ethereum network, remember that code rules all in the world of contract accounts!
With account abstraction enabled by ERC-4337, a unified account model can be achieved, streamlining interactions for users and developers alike.
Why Did ERC-4337 Come Into Existence?
The existing Ethereum account model has several limitations, including the inability to pay transaction fees in tokens other than Ether, complex transaction signing procedures, and restricted customization of account functionality. Additionally, here are a few more reasons:
- Eliminate dependence on seed phrases.
- Simplified user onboarding using mobile devices.
- Reduce the chances of human error.
- Easy implementation on other EVM chains
- Bank-like features like auto-pay, account recovery, and multi-factor authentication.
- The network will be compatible with future signature schemes, such as Boneh-Lynn-Shacham (BLS) and Quantum resistance, in order to make it less vulnerable to attacks in the future.
- Creating wallets for your users under the hood when they sign up for your app
- Metatransactions to sponsor for the users gas payment
- Social Recovery to recover the lost keys
- Session keys for Web3 games
- Team wallets to use decentralized applications with tiered permissions
Smart Accounts Trump Smart Contracts In Account Abstraction!
With ERC-4337, the concept of “smart accounts” is introduced. Smart accounts are a hybrid of EOAs and Contract Accounts, allowing users to interact with Ethereum in more flexible ways.
Imagine the world of account abstraction as a bustling city, with smart contracts acting as the city’s infrastructure, like roads, bridges, and buildings. These structures enable various functionalities, serving DeFi applications, NFT marketplaces, DAOs, and more. However, to access these facilities, residents (users) need personal vehicles (EOAs) such as Metamask to interact with the smart contracts.
Every activity, from depositing funds into a DeFi pool to transferring NFTs to a marketplace, requires users to navigate the city using their personal vehicles, signing individual transactions at every turn. While seasoned crypto enthusiasts have adapted to this way of life, newcomers and those accustomed to traditional banking may find the process cumbersome and uninviting.
Enter smart accounts, the innovative public transportation system that transforms the city’s landscape. These accounts offer a more user-centric approach, making it simpler and more convenient for people to move around and interact with the city’s infrastructure. Additionally, they eliminate the need for constant transaction signing. Thus, providing a more seamless experience for users of all backgrounds, including beginners and older generations.
By prioritizing user experience, smart accounts outshine smart contracts in the realm of account abstraction, making the blockchain city more accessible and enjoyable for everyone.
Breaking The Tech Behind ERC-4337
The Account Abstraction works on the basis of a new object called a UserOperation, which represents a transaction to be sent on behalf of a user. These transactions are stored in an “alt mempool” until they are picked up by nodes called bundlers. Bundlers package multiple user operations into a single transaction, which they then send to the EntryPoint smart contract.
The EntryPoint contract calls a function on each account called validateUserOp, which verifies the operation’s signature and pays the fee if the operation is valid. Each smart contract wallet must implement this function.
If the validateUserOp function returns true, the EntryPoint contract calls another function called execute to operate.
Simplifying: The Tech Behind ERC -4337
Imagine you want to send a package to your friend who lives in another city. The Account Abstraction in Ethereum can be compared to a streamlined postal service designed to deliver these packages (transactions) more efficiently.
Here, the UserOperation is like a package you want to send. You write the address and necessary information on it and then drop it off at a local post office (the “alt mempool”).
The local post office doesn’t directly send your package to your friend. Instead, it waits for a delivery truck (the bundler) to come by and pick up multiple packages (UserOperations) from different people. The delivery truck then takes all these packages and delivers them to a central sorting facility (the EntryPoint smart contract).
At the sorting facility, a worker (the validateUserOp function) checks each package’s information, ensuring it’s correctly addressed and has the right postage (validates the operation’s signature and pays the fee). If everything checks out, the worker approves the package for delivery.
Once approved, another worker (the execute function) takes the package and ensures it reaches its final destination (performs the operation). Each package must follow a standard format (smart contract wallets implementing the validateUserOp function) to ensure the sorting facility can process it efficiently.
What Does ERC-4337 Mean For The Users?
The implementation of ERC-4337 will offer users a more seamless and flexible experience on the Ethereum network. It opens up the world of web3 and cryptocurrency to virtually anyone with a smartphone. Here are a few specific advantages:
- Effortless Account Recovery and Wallet Creation
For smart accounts, ERC-4337 introduces the concept of “Group-Access” wallets. If you lose your seed phrase, you can ask for assistance from previously specified guardian contracts or accounts to regain access.
This development goes beyond the notion of “Not your keys, not your crypto,” effectively eliminating private key dependencies.
With ERC-4337, new wallet users won’t need to write down a seed phrase for account recovery.
- Consolidated Transactions
Every transaction involving EOAs needs approval, which can be time-consuming. Account abstraction allows for transaction bundling, saving time and potentially reducing gas fees.
- Preauthorized Transactions
Whether you’re minting multiple NFTs or using tokens in a game across multiple sessions, smart contract wallets can preapprove transactions based on predefined wallet codes and session keys.
- Sponsorship From Paymasters
Suppose you’re minting an item or conducting a demo transaction for a company or setting up a DApp that offers gas-free usage for the first 30 days. In that case, Paymasters and smart contract wallets enable sponsored transactions, with gas fees deducted from an alternate address upon confirmation.
This feature introduces another element of account abstraction: gas abstraction.
- Gas Payments with Any Token
With account abstraction, you can pay gas fees using any ERC-20 token via your smart contract wallet. Third-party services leveraging ERC-4337 can facilitate fiat gas payments through smart contract enhancements.
- Subscription Models
As accounts become programmable, it’s easier to define and permit recurring spending for compatible web3 services. This flexibility allows web3 membership plans to offer crypto-only subscription packages.
- Multifactor Authentication and Tailored Coding
Your smart account’s wallet code can seamlessly integrate with your mobile device, allowing for authentication methods like Face ID. Users can set various access levels depending on their preferred code.
For example, transactions initiated when the app is open could be preapproved. Custom instructions like this can be established with ERC-4337.
- Personalized Spending and Usage Restrictions
Users can establish limits and alerts, similar to credit cards. For example, you can receive notifications when DeFi service subscriptions exceed 100 USDT per month.
- Automated DeFi and Trading Capabilities
Your smart account can automatically allocate idle funds to liquidity pools for yield earning or search for low-cost NFTs and tokens on specific marketplaces and exchanges. You can also set token tracking metrics and investment strategies.
While automation simplifies the investment process, EOAs require transaction approval. Account abstraction (AA) accounts help overcome this limitation.
In addition to these user-centric features, account abstraction also enables:
- Fraud monitoring
- Replay attack prevention
- Withdrawal limits (akin to banks)
- One-click user experiences
- Enhanced self-custody and control
Are There Any Loopholes Associated With ERC-4337?
While ERC-4337 brings numerous improvements to the Ethereum ecosystem, it also introduces some concerns. Potential issues include the increased complexity of validating transactions and potential security vulnerabilities. While our understanding of ERC-4337 continues to evolve, there are some known challenges:
- Increased Expenses
Ethereum network fees remain high. Someone ultimately foots the bill even with Paymaster-specific gas fee offsets and sponsored transactions. Unless all Ethereum Virtual Machine-compatible scaling solutions and layer-2s adopt ERC-4337, costs will remain a concern.
- Contract Authentication
Contract accounts provide more functionality than EOAs but don’t support key-based signatures needed for initial verifications. Although EIP-1271 enables smart contract signatures, implementing them outside the Ethereum chain can be cumbersome.
- Extensive infrastructure requirements
The widespread adoption of AA accounts necessitates more Bundlers, which demands significant infrastructure and technical expertise.
- Centralization Concerns
Limited Bundler participation could result in transaction processing being controlled by a few entities, raising potential centralization issues.
What Does This Mean for Ethereum and Relevant Stakeholders?
In general, ERC-4337 could revolutionize various industries. It may increase Ethereum’s daily transaction volume and active addresses over time. With easier onboarding, revenue generation from gas fees could also improve.
DApps, including DeFi and NFT-focused ones, will benefit as user wallets synchronize with contracts. DApp developers can focus on creating chain-agnostic services since smart contract wallets will eventually connect and interact across chains.
Think of ERC-4337 as a versatile keyring that streamlines access to various services, reducing the need to carry multiple keys. Builders seeking to introduce projects to web3 can leverage ERC-4337 tools to customize permissions flows, ultimately boosting adoption.
It’s worth noting that the Ethereum Foundation & Biconomy provides Wallet Contract APIs and necessary SDKs for third parties and builders to develop using the ERC-4337 standard.
How Are We Using Account Abstraction at Autify?
We are using ERC-4337 accounts powered by Biconomy to allow for a seamless, almost web2 native User Experience. Linking wallets to email addresses simplifies the account recovery process, making it more user-friendly and accessible.
All the blockchain transactions are sponsored by Autify Network thanks to metatransactions, one of the added benefits of Account Abstraction. This feature further streamlines the user experience, allowing for seamless interaction with blockchain-based services without worrying about gas fees or complex transaction processes.
In essence, Autify’s utilization of Account Abstraction via ERC-4337 and Biconomy transforms the traditional, often cumbersome blockchain experience into something more akin to web2, making it more approachable for a wider range of users.
Frequently Asked Questions
- When will ERC-4337 be implemented?
ERC-4337, an Ethereum standard that enables account abstraction without consensus-layer modifications, was successfully deployed on the Ethereum mainnet in March 2023. With ERC-4337 in place, the blockchain ecosystem can anticipate a more accessible and inclusive environment for a broader range of users.
- Will ERC-4337 affect existing Ethereum applications?
ERC-4337 is designed to be backwards compatible with existing Ethereum applications. Developers can upgrade their applications to take advantage of the new features offered by smart accounts.
- How will ERC-4337 affect transaction fees on the Ethereum network?
With the introduction of smart accounts, users can pay transaction fees with various assets, not just Ether. This can potentially reduce the overall demand for Ether as a transaction fee payment method, leading to more stable and predictable fees.
- Can ERC-4337 improve Ethereum’s scalability?
While ERC-4337 does not directly address scalability issues, it provides developers with the tools to create more efficient and user-friendly applications. By streamlining interactions between users and smart contracts, it can indirectly contribute to improving Ethereum’s overall performance.
- Will ERC-4337 affect the security of the Ethereum network?
The introduction of new features and capabilities always carries some risk. However, the Ethereum community is committed to thoroughly researching and addressing potential security concerns before implementing ERC-4337.
ERC-4337 represents a significant step forward for Ethereum, introducing smart accounts that provide developers and users with greater flexibility and a more seamless experience.
Indeed, ERC-4337 is a significant milestone in the evolution of blockchain technology. Account abstraction has long been anticipated & activities like trading NFTs, creating new smart contract wallets, subscribing to crypto newsletters, and engaging in web3 games have become much more accessible. These tasks can now be accomplished without extensive technical expertise, making the technology more inclusive for everyday users.
To draw an analogy, ERC-4337 is like a universal remote control that simplifies the user experience across various digital devices. It streamlines the interaction with a wide range of blockchain services, making them more user-friendly and convenient for the average person.
In the near future, we can expect further simplification and accessibility in the blockchain and cryptocurrency space, empowering a broader audience to participate and benefit from this innovative technology.
Did we miss something about ERC-4337? Share your thoughts in the comments below.