Buidler DAO: Can the EIP-4337 account abstraction wallet solution open a new era for wallets?
Author: @SpinachSpinach, Buidler DAO
Wallets hold an irreplaceable position as the entry point and passport into the crypto world, and using a wallet is an inevitable part for anyone wanting to enter the crypto space. The functionality of wallets has evolved from the initial pure bookkeeping function to the current multi-chain and multi-scenario usage.
However, the current usage threshold of wallets is too high for new users, which keeps many potential entrants to the crypto world at bay. Lowering the wallet threshold can bring more fresh blood and ecological explosion to the entire crypto world. With the arrival of the EIP-4337 account abstraction proposal, will the reduction of thresholds brought by account abstraction wallets ignite a new era of user explosion in the crypto world?
TL;DR ▪ The knowledge threshold in the crypto world is high, and people generally lack understanding of blockchain and wallet knowledge. The current user experience of wallets is complex, with many factors hindering new user onboarding.
▪ Currently, novice users encounter several pain points when using wallets: they must first have gas fees, need to find channels to purchase crypto assets, face a dizzying array of mainnet choices, and deal with wallet security issues.
▪ There are two different types of accounts on Ethereum wallets: EOA (Externally Owned Accounts) and CA (Contract Accounts). EOA wallets are controlled by a key pair of private and public keys and do not have programmable functionality. CA wallets exist in the form of smart contracts, are not controlled by private keys, and do not have private keys, but implement various functions through code, although they cannot initiate transactions independently.
▪ Each type of wallet account has its advantages and limitations. EOA wallets can only be generated according to Ethereum's specified method and lack programmability. They require gas fees to operate, and if the private key is lost, it cannot be recovered. In contrast, while CA wallets can customize logic for more functionalities, they cannot initiate transactions independently and require EOA wallets to call them, and generating CA wallets incurs additional costs. Currently, neither type of wallet account solves the complex user experience issue.
▪ Account Abstraction is a wallet technology solution on Ethereum that aims to combine the features of both EOA and CA accounts into one, replacing EOA as the main account. Besides having the programmability of CA, it can also eliminate the dependency on EOA to initiate transactions.
▪ The EIP-4337 proposal separates the originally hardcoded verification mechanism in the Ethereum wallet transaction process from the consensus layer and hands it over to a new mechanism under EIP-4337. This new mechanism allows for customizable signing methods for account abstraction wallets and brings more application scenarios.
▪ Wallet applications that implement account abstraction allow users to initiate transactions as a main account without needing an EOA, decoupling ownership and signing rights. The EOA owner account of the account abstraction wallet merely exists as an owner, without affecting the actual use of the account abstraction wallet.
▪ EIP-4337 was chosen as the final solution by Ethereum primarily because it can achieve account abstraction without modifying the consensus protocol layer, avoiding massive changes akin to transitioning from a Proof of Work (PoW) mechanism to a Proof of Stake (PoS) mechanism.
▪ In EIP-4337, the signing verification mechanism is handled by the entry point contract, allowing account abstraction wallets to use any form of signing mechanism. Wallet developers can choose the appropriate signing method for their wallet products based on the scenario.
▪ Currently, account abstraction wallets resemble a new standard for smart contract wallets but still depend on EOA as the wallet owner. Additionally, the current account abstraction proposal still has some shortcomings and risks: smart contract risks, higher gas fees, and technical implementation issues.
Current Novice Users
What are the pain points of using wallets?
Due to the high knowledge threshold in the crypto world, people generally lack understanding of blockchain and wallet knowledge, and the current user experience of wallets is complex, with many factors hindering new user onboarding.
Pain Point 1: Must have gas fees to use wallets
When a novice user eagerly wants to experience the crypto world and downloads a wallet, they are surprised to find that the wallet cannot be used because there are no native tokens of the public chain (like Ethereum's ETH) in the wallet to cover gas fees. Without gas fees, the wallet cannot perform any operations, as every on-chain operation requires miners to package the operation and pay gas fees as compensation. At this point, the novice must start looking for channels to purchase crypto assets, but many wallet products do not provide deposit and withdrawal channels, leading most novices to choose centralized exchanges. Pain Point 2: Channels for purchasing crypto assets and a dizzying array of mainnet choices
When novice users want to purchase crypto assets, they may choose wallet products with deposit and withdrawal channels, centralized exchanges, or over-the-counter trading. However, for novices choosing centralized exchanges and over-the-counter trading, after purchasing assets on centralized exchanges, they may be confused by the various mainnet options when trying to transfer to their wallets. Learning to choose a mainnet incurs a certain learning cost, and a small mistake in selecting the wrong network can lead to extremely cumbersome processes. If it’s over-the-counter trading, the risks are significant, and novice users are easily targeted by scammers. Pain Point 3: Wallet security issues
For novice users, even if they manage to secure gas fees and can interact with the wallet, the entire crypto world feels like a dark forest. Novice users need to learn cryptographic knowledge about wallets, such as private keys and public keys, and must understand what a private key is and how to ensure its security while guarding against scams in the crypto dark forest. This learning cost is high for novice users, and they are easily deceived. Most importantly, once a private key is lost or forgotten, it cannot be recovered, unlike Web2 applications where passwords can be reset. This is something Web2 users find hard to adapt to.
What types of wallets currently exist on Ethereum?
Currently, there are two different types of accounts on Ethereum wallets: EOA (Externally Owned Accounts) and CA (Contract Accounts).
EOA (Externally Owned Accounts)
EOA wallets are controlled by a key pair of private and public keys. The primary functions of externally owned wallets are to receive, hold, send tokens, and interact with smart contracts, lacking programmability. Each transaction requires gas fees. Creating an externally owned account wallet incurs no cost but can only be created by generating a private key.
CA (Contract Accounts)
CA wallets exist in the form of smart contracts and are not controlled by private keys, nor do they have private keys. They implement various functions through code, such as DeFi protocols, multi-signature wallets, vaults, faucets, etc. A common use case is a multi-signature wallet, which requires multiple external owned accounts to authorize transactions, typically used for corporate wallet management. Creating a contract account wallet incurs gas fees, and contract account wallets cannot initiate transactions independently; they require external owned accounts to call them and pay gas fees to initiate transactions. Both types of wallet accounts have their advantages and limitations. EOA wallets can only be generated according to Ethereum's specified method, lack programmability, and require gas fees to operate. If the private key is lost, it cannot be recovered. In contrast, while CA wallets can customize logic for more functionalities, they cannot initiate transactions independently and require EOA wallets to call them. Additionally, generating CA wallets incurs extra costs. Currently, neither type of wallet account solves the complex user experience issue.
What is Account Abstraction?
What are the advantages of EIP-4337 Account Abstraction?
Account Abstraction is a wallet technology solution on Ethereum that aims to combine the features of both EOA and CA accounts into one, replacing EOA as the main account.
The account abstraction discussed here refers to the Ethereum EIP-4337 proposal put forward by Vitalik. This proposal separates the originally hardcoded verification mechanism in the Ethereum wallet transaction process from the consensus layer and hands it over to a new mechanism under EIP-4337. The emergence of this new mechanism allows for customizable signing methods for account abstraction wallets and brings more application scenarios, such as gas payment on behalf, aggregated signatures, privacy protection, etc.
After the implementation of the EIP-4337 proposal, account abstraction wallets will not be limited to using the Ethereum Elliptic Curve Digital Signature Algorithm (ECDSA) key pair used by EOA wallets. Wallet application developers can apply any type of signing scheme to account abstraction wallet applications, allowing users to initiate transactions using other signing methods, thereby lowering the usage threshold for users.
Wallet applications that implement account abstraction allow users to initiate transactions as a main account without needing an EOA, decoupling ownership and signing rights. The EOA owner account of the account abstraction wallet merely exists as an owner, without affecting the actual use of the account abstraction wallet. The decoupling of ownership and signing rights enables wallet products to provide social recovery methods, so even if people lose their private keys, they need not worry about being unable to recover them.
Due to the scalability brought by the new mechanism of account abstraction wallets, the pain point of needing gas fees to use wallets can also be addressed. Account abstraction wallets can not only allow third parties to pay gas fees on behalf but can also implement gas fee payments using assets other than native tokens. This will greatly reduce the usage threshold for gas fees for novice users. In the near future, it seems foreseeable that the lower thresholds and more customizable features brought by account abstraction may lead wallets into a new era.
Why did Ethereum choose the EIP-4337 Account Abstraction proposal?
The discussion of account abstraction has not ceased since the launch of Ethereum, evolving from the earliest EIP-101 to EIP-3074 and now the latest EIP-4337. The account abstraction solutions have undergone several iterations, but most proposals were shelved due to immaturity and the complexity of modifications to the consensus protocol layer.
Since 2015, after a long period of discussion and iteration, Ethereum ultimately chose between EIP-3074 and EIP-4337. If EIP-4337 allows CA smart contract wallets to be used like EOA, then EIP-3074 allows EOA wallets to have the programmability of smart contract accounts. Ultimately, with the latest roadmap announced by Ethereum founder Vitalik, EIP-4337 was officially included in the implementation phase of The Splurge, making it the final solution for account abstraction.
EIP-4337 was chosen as the final solution by Ethereum primarily because it can achieve account abstraction without modifying the consensus protocol layer, avoiding massive changes akin to transitioning from a Proof of Work (PoW) mechanism to a Proof of Stake (PoS) mechanism. In contrast, EIP-3074 involves changes to the consensus layer, which, if problems arise, would require a hard fork to resolve. Additionally, since EIP-3074 allows EOA wallets to have the characteristics of smart contract accounts, it still uses the fixed ECDSA signature mechanism, which cannot utilize any signing method like EIP-4337. Therefore, compared to EIP-3074, EIP-4337 seems to have more advantages in lowering wallet thresholds.
Image source: ethereum.cn translation
How does EIP-4337 Account Abstraction Wallet operate?
How is it different from other wallet account types?
Account abstraction introduces some new roles and mechanisms compared to previous account types:
Wallet Contract: The smart contract for wallets after account abstraction, capable of implementing custom wallet logic.
Entry Point Contract: The contract that communicates and coordinates with the wallet contract and is responsible for processing verification and executing user operations.
User Operations (UserOperations, uo): A new off-chain transaction form initiated by users, distinct from previous transaction types (Transaction, tx).
Bundler: The off-chain computing node responsible for packaging user operations and passing them to the entry point contract.
User Operation Mempool: A dedicated memory pool for accumulating pending user operations, independent of the transaction memory pool.
Paymaster: An optional third-party contract account that pays gas fees on behalf of users.
If you are unclear about these new terms, I will illustrate them with a simplified flowchart. First, let’s understand the transaction mechanism of EOA wallets. EOA wallets need to sign a transaction with an ECDSA signature to initiate a transaction. Image source: https://medium.com/nethermind-eth/ethereum-wallets-today-and-tomorrow-eip-3074-vs-erc-4337-a7732b81efc8 From the diagram, we can see that the steps for an EOA wallet to initiate a transaction are:
The user uses their private key to sign the transaction information, producing a signed transaction (Transaction, tx).
The signed transaction is sent to the memory pool for pending transactions to await processing.
Miners process the transactions in the transaction memory pool and verify their validity.
When the validity is confirmed, the transaction is included in a block; otherwise, it is discarded.
Since CA accounts lack a unified transaction process standard, the following diagram illustrates the transaction process of a smart contract wallet that relies on a Relayer. We can see that CA accounts need to rely on an EOA wallet to sign an ECDSA signature to execute transactions, and the Relayer role may carry centralization risks. Image source: https://medium.com/nethermind-eth/ethereum-wallets-today-and-tomorrow-eip-3074-vs-erc-4337-a7732b81efc8 From the diagram, we can see that the steps for a CA wallet to initiate a transaction are:
The user uses their private key to sign the transaction information in any form, producing a signed transaction information (signed message).
The signed transaction information is sent to the Relayer node responsible for conveying the message.
The Relayer uses its private key to sign the user-signed transaction information with an ECDSA signature, forming a transaction.
The Relayer sends the transaction containing the user information to the user's wallet smart contract for execution using the Relayer's EOA wallet.
The user's smart contract wallet executes the operation and is verified by miners before being included in a block.
Next, let’s look at the transaction mechanism of wallets after EIP-4337 account abstraction.
Image source: https://medium.com/nethermind-eth/ethereum-wallets-today-and-tomorrow-eip-3074-vs-erc-4337-a7732b81efc8 From the diagram, we can see that the steps for initiating a transaction after account abstraction are:
The user initiates a wallet user operation, signing the user operation with any form of private key to produce a signed user operation (UserOperations, uo).
The signed user operation is sent to the memory pool for pending user operations to await processing.
The Bundler packages the user operations from the user operation memory pool into a transaction and submits it to the entry point contract.
The entry point contract processes all user operations: verifies if the wallet exists, requires the wallet to validate the user operation, and sends the user operation to the smart contract wallet for execution.
The smart contract wallet executes the user operation and includes it in a block.
By comparison, we can see that EOA wallets rely on Ethereum's fixed ECDSA signature algorithm to sign transactions, while CA accounts ultimately also rely on EOA wallets' ECDSA signature algorithm to sign transactions. In EIP-4337, the account abstraction wallet hands the signing verification mechanism over to the entry point contract, allowing account abstraction wallets to use any signing mechanism. Wallet developers can choose the appropriate signing method for their wallet products, and users can directly manipulate the account abstraction wallet using specific signing methods that are easy for Web2 users to use or customized for specific scenarios.
Moreover, since any miner can act as the Bundler, this avoids the centralization risk associated with the Bundler role. Additionally, Bundlers can prevent Flashbots from listening to the memory pool for MEV arbitrage through transaction bundling. The emergence of these new mechanisms also brings more imaginative application scenarios, such as third-party gas fee payments by Paymasters.
From the diagram, we can see that transaction (tx) and user operations (uo) are two independent memory pools. Due to the existence of the entry point contract in account abstraction, Paymaster contracts can be modularly combined with the entry point contract like LEGO blocks. Before the entry point contract verifies the user operation (uo), it first verifies the Paymaster: Does it agree to pay on behalf? Does it have enough ETH to pay gas fees for collateral?
In addition to fully subsidizing gas fees, if the user's account contract only holds non-gas fee tokens like USDT or USDC, the user can also transfer other tokens equivalent to the gas fee to the Paymaster contract to achieve gas fee payment without ETH.
Besides paying gas fees, the entry point contract can also implement aggregated signature functionality by combining with aggregated signature verification contracts, allowing for multi-signature control of wallets.
In the above case, we can see that the modular combinability of the entry point contract in the EIP-4337 proposal brings more imaginative application scenarios. It seems that account abstraction wallets can bring many benefits to the entire crypto world, but will reality be as beautiful as it seems?
What are the shortcomings and risks of EIP-4337 Account Abstraction?
Although the vision of account abstraction is beautiful, reality often proves to be harsh. Currently, account abstraction wallets resemble a new standard for smart contract wallets but still depend on EOA as the wallet owner. Moreover, we all understand that the more complex something is, the more likely it is to encounter problems. The current account abstraction proposal still has some shortcomings and risks:
Smart Contract Security Issues
Smart contract security has always been a challenging issue in the crypto world. We often see many contracts that have passed "smart contract audits" still exhibiting security vulnerabilities, and each time a contract security issue arises, it is often accompanied by significant financial losses. For the EIP-4337 account abstraction proposal, the modular accumulation of functions in account abstraction wallets and the addition of new mechanisms will make their code execution logic more complex, and more complex code execution logic often carries potential security risks. Since both account abstraction wallets and entry point contracts are smart contracts, if either the entry point contract or the wallet contract encounters issues, it could lead to a disastrous hacking incident, significantly undermining trust in using account abstraction wallets.
Higher Gas Fees
In addition to potential contract security risks, account abstraction wallets increase the gas fees users need to pay because the operational steps for processing transactions in account abstraction wallets are more numerous and complex compared to EOA and CA accounts. More operations to handle mean higher gas fees. Although Vitalik has proposed solutions to reduce gas consumption by processing account abstraction data through Layer 2, this will also require a long time.
Technical Implementation Issues
Currently, there is still a long way to go before EIP-4337 is implemented. Many theoretically feasible technologies often face numerous practical challenges, such as compatibility issues, complex node verification processes, how to prevent Bundler misconduct, and technical logic that cannot be realized. Addressing these technical issues will require extensive attempts and discussions, which is why EIP-4337 is placed in the sixth phase of Ethereum's upgrade, Splurge.
The road is long and arduous, and the crypto world needs wallets with lower thresholds and greater security to attract more new users to break through the bottleneck of user growth. It is believed that with the realization of account abstraction, a whole new imaginative space will be brought to the crypto world, and perhaps in the near future, an unexpectedly better alternative will emerge to replace account abstraction. The speed of iteration and update in the crypto industry far exceeds our imagination, and this is the charm of this industry.