ERC-4337 is the latest ERC standard deployed on the Ethereum mainnet. It implements the long-awaited Account abstraction function.
Account abstraction is a technology that combines external accounts with smart contracts. It allows users to conduct transactions using external accounts controlled by smart contracts (i.e., "smart contract wallets").
For more knowledge about account abstraction, please refer to "What is Account Abstraction".
Before becoming an ERC standard, EIP-4337 was originally proposed by Vitalik Buterin and 6 other people in September 2021, and then officially released at WalletCon on March 1, 2023. Becoming ERC-4337 opens a new chapter in "smart contract wallet".
But in fact, Vitalik proposed the concept of account abstraction as early as 9 years ago. Several EIP proposals were made, but none were approved. This is because all previous proposals required changes to the underlying protocol of Ethereum, which would result in a hard fork of Ethereum. ERC-4337 circumvents this. It is the only proposal to achieve account abstraction without changing the Ethereum protocol.
So, how does ERC-4337 achieve account abstraction without changing the protocol?
ERC-4337 does not make changes to the underlying consensus of Ethereum, but introduces the concept of UserOperation to achieve account abstraction.
UserOperation is a transaction operation initiated by a user alone. Contains transaction-related information such as transaction initiator (user), transaction requirements, signature, etc. UserOperation can be read and verified by the smart contract call function in the "smart contract wallet", and then uploaded to the Ethereum main network to successfully execute the transaction.
In the ERC-4337 standard, multiple UserOperations can form a UserOperation mempool. The function of UserOperation mempool is similar to the traditional mempool, which is a memory pool containing multiple transactions.
UserOperation UserOperations in the mempool are aggregated and processed by miners or packagers using services such as Flashbots. The packager will use Bundler to bundle multiple UserOperations into a single Bundle Transaction for verification, thereby realizing batch processing of transactions.
When processing transactions, packagers will first pay the Gas fee for the Bundle Transaction, and then compensate the user for the fee paid for each UserOperation. The processing order of UserOperation is also the same as that of traditional mempool, logically arranged according to cost priority.
The release of ERC-4337 is of great significance to the development of crypto wallets, mainly in two aspects:
The account abstraction implemented by ERC-4337 greatly improves the security of crypto wallets. It can support more secure and efficient verification logic and signature schemes instead of relying on a single private key and complicated mnemonics. Among them, the social recovery function and biometric signature realized by the multi-signature solution further enhance the security of user assets.
ERC-4337 brings a variety of flexible and convenient transaction functions to crypto wallets. These features improve transaction interoperability, increase user-friendliness and save transaction time. For example, features such as ERC-20 token fee payment, EVM-compatible network support, batch bundled transactions, one-click payment, etc.