Since the Ethereum blockchain’s introduction, various enhancements to the network standards have been developed.
These advancements come in the form of Ethereum Improvement Proposals (EIPs), which undergo a meticulous implementation process based on their level of complexity, culminating in a substantial network overhaul.
To become an Ethereum Request Comment (ERC), an Ethereum Improvement Proposal (EIP) needs approval from the on-chain governance.
The Ethereum mainnet has recently implemented the ERC-4337 standard to enable account abstraction, fulfilling a long-standing objective. It was initially proposed in 2021 as EIP-4337 and only authorised as ERC-4337 in 2023.
This guide aims to clarify ERC-4337 in a straightforward and easy-to-understand manner.
We will explore the technicalities and jargon, such as account abstraction, its mechanism, features, benefits, and limitations.
TABLE OF CONTENTS
WHAT IS THE ERC-4337 STANDARD?
ERC-4337 is an Ethereum standard designed to enable user accounts to function similarly to smart contracts, known as “account abstraction.”
With ERC-4337, users can regain access to wallets even if their private keys have been compromised or lost.
This standard makes account abstraction possible, enabling social recovery to facilitate wallet recovery.
Moving forward, we delve into the concept of account abstraction and explain it further.
WHAT IS ACCOUNT ABSTRACTION?
Account abstraction is a proposed feature in the Ethereum network that would allow smart contracts to pay transaction fees on behalf of their users instead of requiring users to pay fees directly in ether.
This concept has been newly implemented in the Ethereum network and currently undergoing trials by the Ethereum community and developers.
As per Ethereum Improvement Proposal 2938 (EIP-2938), there are two types of accounts:
- Externally Owned Accounts (EOAs), such as MetaMask, and
- Smart Contract accounts
Only EOAs can pay gas and initiate transactions, while Smart Contract accounts require authorisation from an EOA.
With account abstraction, EOAs can gain smart contract capabilities, allowing for the addition of custom logic to enhance wallet security and enable direct transaction initiation.
The most crucial of these is social recovery logic, which enables wallet owners to assign at least three EOAs as custodians of the recovery method.
The assigned custodians give the wallet owner a special key to sign transactions. If the key gets compromised, the owner can ask the custodians to reset it. The custodians can be anyone trustworthy, like friends, family, or service providers.
In the previous version of Ethereum, users were required to pay transaction fees in ether to miners to process their transactions.
However, with account abstraction, a smart contract could hold a balance of ether and use it to pay the transaction fees on behalf of its users.
This would make it easier for users to interact with smart contracts without holding or managing ether themselves.
BENEFITS OF ACCOUNT ABSTRACTION
Account abstraction in Ethereum would benefit both users and developers.
Account abstraction would make it easier for users to interact with smart contracts without holding or managing ether.
This could lead to a more user-friendly experience and increase the adoption of Ethereum-based applications.
With account abstraction, users could interact with smart contracts by simply sending a transaction to the contract without worrying about paying for gas (transaction fees) in ether.
For developers, account abstraction would enable more complex smart contract interactions, opening up new possibilities for decentralised applications.
Developers would be able to create more advanced smart contracts that could execute other contracts, perform multiple transactions atomically, and more.
For example, a contract could send a transaction to itself and use its balance to pay for the transaction, enabling it to perform more advanced operations like executing other contracts.
In addition, account abstraction would also make it easier for developers to create and deploy smart contracts, as they would not have to worry about managing multiple accounts and balances for their contracts.
Account abstraction could also enable more complex smart contract interactions by allowing contracts to perform impossible actions under the current system.
Overall, account abstraction would benefit users and developers by making it easier to interact with smart contracts and creating new possibilities for decentralised applications.
Learn more about the concept of account abstraction here.
HOW DOES THE ERC-4337 STANDARD WORK?
The Ethereum community has been striving for account abstraction for a while. Previously, they suggested EIP-2938, which aimed for account abstraction but required changes at the consensus layer.
ERC-4337, on the other hand, achieves account abstraction through a higher-layer pseudo-transaction object called UserOperation, similar to rollups.
Users submit UserOperation objects to a separate mempool, which bundlers combine into a transaction that they pay gas for.
They receive fees from executing individual UserOperations and prioritise objects based on fee logic, similar to a validator.
New functionalities have been incorporated within ERC-4337 to enable a wallet to operate as a smart contract concurrently.
One such functionality is the validateUserOp function, which allows wallets to execute additional logic.
To ensure the secure execution of these new functions, a new contract named EntryPoint is also being introduced. This contract acts as a security checkpoint, validating that the wallet calling the functions is the authorised owner.
ERC 4337 USES CASES- WHY IS IT NEEDED?
Creating and using a Web3 wallet can be challenging for new users. Users must use externally owned accounts like Metamask and Coinbase Wallet to interact with blockchain-based smart contracts.
Securing seed phrases and performing transactions can be cumbersome in today’s digital age.
Moreover, the lack of user-friendly security features may discourage users, given the risky nature of the crypto industry.
Hence the implementation of the ERC-4377 standard in the Ethereum Network.
ERC-4337 creates a standard way for apps and wallets to work with smart contracts on the Ethereum network.
This allows wallets to function as smart contracts, similar to hardware wallets, but with better user experience and more secure account recovery options.
ERC-4337 allows you to enhance your wallet’s capabilities with a simple code update, enabling it to perform various tasks, such as multi-factor authentication and transaction execution. Essentially, it brings the convenience of traditional banking to the blockchain.
OBJECTIVES OF THE ERC-4337 STANDARD
ERC-4337 targets several objectives, including the following:
- Account abstraction: Providing users with a single account integrating smart contract and externally owned account (EOA) features.
- Time and gas savings: As bundlers can bundle UserOperation objects into a single transaction, this can potentially reduce the time and gas required for transaction processing.
- Consensus preservation: Avoiding changes to the Ethereum consensus layer and focusing on scalability-oriented upgrades to enable faster adoption.
- Decentralisation: Allowing any bundler to participate in the process promotes greater decentralisation.
- Facilitating innovative use cases: This could involve implementing aggregated signatures, daily transaction limits, emergency account freezing, whitelisting, and privacy-preserving applications.
Additionally, here are some potential features that could be included in account abstraction:
- Gas abstraction: With account abstraction, smart contracts could pay for gas on their users’ behalf, simplifying the user experience and making it easier to interact with smart contracts.
- Multiple transaction types: Account abstraction could support multiple types of transactions, such as regular transactions, contract creations, and contract calls, which would enable more complex smart contract interactions.
- Delegated execution: With account abstraction, a smart contract could delegate the execution of a transaction to another contract, enabling more advanced functionality and increasing the modularity of smart contracts.
- Improved privacy: Account abstraction could improve privacy by enabling transactions to be executed without revealing the users’ identities or the smart contracts involved.
- Enhanced security: With account abstraction, smart contracts could be designed to have multiple owners who could collectively sign off on transactions and provide greater security and protection against hacks or attacks.
Overall, account abstraction is a potentially powerful feature that could enable more complex and advanced smart contract interactions, simplify the user experience, and improve privacy and security on the Ethereum network.
LIMITATIONS OF THE ERC-4377 STANDARD
ERC 4377 undeniably has the potential to offer many benefits, but some limitations and challenges need to be considered.
Here are a few:
- Complexity: Account abstraction adds an additional layer of complexity to the Ethereum network. This could make it harder for developers to create and test smart contracts, leading to more potential bugs and vulnerabilities.
- Adoption: Account abstraction requires significant changes to the Ethereum network and would likely require widespread adoption from developers and users to be successful. It is unclear whether developers and users would be willing to adopt these changes.
- Security: Account abstraction introduces new security risks, such as the possibility of contract owners losing control of their accounts or contracts being exploited by attackers. These risks would need to be carefully managed to maintain the security of the Ethereum network.
- Gas fees: While account abstraction would simplify the user experience by allowing smart contracts to pay gas fees on users’ behalf, how the fees would be calculated or distributed is unclear. This could lead to potential disputes or confusion among users and developers.
- Interoperability: Account abstraction must be compatible with Ethereum standards and infrastructure, such as wallets, exchanges, and other tools. Ensuring compatibility could be challenging and require significant coordination among developers and stakeholders.
Account abstraction has the potential to offer many benefits, but its implementation would require careful consideration of the potential limitations and challenges involved.
Notably, within Web3, decentralised finance (DeFi) represents a crucial component, regardless onboarding process has proved to be a Herculean task for new users.
However, ERC-4337 provides the foundation for innovative crypto wallets that could simplify the user experience, addressing the challenges faced by new users.
This has the potential to revolutionise the primary touchpoint between users and crypto. Therefore, its impact on the industry is worth watching in the coming years.
To learn more about ERCs and EIPs, check out this article.