菠菜菠菜|bocaibocai.eth

菠菜菠菜|bocaibocai.eth

Web3 Researcher|RMIT Master of Blockchain|Web3caff Reseacher|Buidler DAO Core Contributor |ENFP|DYOR|Mirror: http://mirror.xyz/bocaibocai.eth
twitter

Can the EIP-4337 account abstraction wallet scheme open a new era for wallets?

The wallet, as an entry point and passport into the world of cryptocurrency, holds an irreplaceable position in the entire crypto industry. Using a wallet is an inevitable part for anyone wanting to enter the crypto world. The functionality of wallets has evolved from the initial pure accounting function to the current multi-chain and multi-scenario usage. However, the current threshold for using wallets is too high for new users, which keeps many potential entrants to the crypto world at bay. Lowering the wallet threshold could bring more fresh blood and ecological bursts to the entire crypto world. With the arrival of the EIP-4337 account abstraction proposal, will the reduced threshold brought by account abstraction wallets ignite a new era of user explosion in the crypto world?

image

Author: Spinach Spinach

Special thanks to Shijun and Teacher Fang Jun for their support and guidance.

Note: The article only represents the author's personal views and does not constitute any investment advice.

Table of Contents

01/ What are the pain points for novice users using wallets at this stage?

02/ What types of wallets currently exist on Ethereum?

03/ What is account abstraction? What are the advantages of EIP-4337 account abstraction?

04/ Why did Ethereum choose the EIP-4337 account abstraction proposal?

05/ How do EIP-4337 account abstraction wallets operate? How are they different from other wallet account types?

06/ What shortcomings and risks exist with EIP-4337 account abstraction?

TL;DR

  • The knowledge threshold for 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 participation.
  • Novice users currently encounter several pain points when using wallets: Gas fees must be available to use a wallet, finding channels to purchase crypto assets, overwhelming choices of mainnets, and wallet security issues.
  • There are two different types of accounts for wallets on Ethereum: EOA (Externally Owned Accounts) and CA (Contract Accounts). EOA wallets are controlled by a private-public key pair and lack programmability. CA wallets exist in the form of smart contracts, and they are not controlled by private keys, but rather by code that implements various functions, though they cannot initiate transactions on their own.
  • Both types of wallet accounts have their pros and cons and limitations. **EOA accounts can only be generated according to Ethereum's specified method and lack programmability. They require Gas fees to operate, and losing the private key means it cannot be recovered. However, compared to CA accounts, while CA accounts can customize logic for more functionalities, they cannot initiate transactions independently and require EOA accounts to call them, and generating CA accounts incurs additional costs. Neither type currently resolves the complex user experience of wallets.
  • Account Abstraction is a wallet technology solution on Ethereum that aims to combine the features of EOA and CA accounts into one, replacing EOA as the main account, allowing for programmability while eliminating the dependency on EOA to initiate transactions.
  • The EIP-4337 proposal separates the "transaction validation mechanism" originally hardcoded in the consensus layer of Ethereum wallet transactions 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 and does not affect the actual use of the account abstraction wallet.
  • EIP-4337 was chosen by Ethereum as the final solution primarily because it can achieve account abstraction without modifying the consensus protocol layer, avoiding massive changes akin to transitioning from a POW to a POS mechanism.
  • In EIP-4337, the account abstraction wallet delegates the "signature verification mechanism" to the entry point contract, allowing it to use any form of signature mechanism. Wallet developers can choose the appropriate signature form for their wallet products.
  • Current account abstraction wallets resemble a new standard for smart contract wallets but still depend on EOA as the wallet owner. Additionally, the account abstraction proposal still has some shortcomings and risks: smart contract risks, higher GAS fees, and technical implementation issues.

(1) What are the pain points for novice users using wallets at this stage?#

Due to the high knowledge threshold of the crypto world, people generally lack understanding of blockchain and wallet knowledge. The current user experience of wallets is complex, with many factors hindering new user participation.

Pain Point 1: Gas fees must be available to use a wallet

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 (like Ethereum's ETH) in the wallet to cover Gas fees. Without Gas, 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.

image

Pain Point 2: Channels for purchasing crypto assets and overwhelming choices of mainnets

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 or OTC channels, after purchasing assets on a centralized exchange, they may be confused by the various mainnets when trying to transfer to their wallet. Learning to choose a mainnet requires a certain learning cost, and a small mistake in transferring to the wrong network can be extremely cumbersome to resolve. If it's an OTC trade, it carries significant risks, as novice users are easy targets for scams.

image

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 and public keys, and understand what a private key is while considering how to ensure its security and prevent scams in the crypto dark forest. This learning cost is high for novices, 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.

image

(2) What types of wallets currently exist on Ethereum?#

Currently, there are two different types of accounts for wallets on Ethereum: EOA (Externally Owned Accounts) and CA (Contract Accounts).

EOA (Externally Owned Accounts):

EOA wallets are controlled by a private-public key pair. 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. They are not controlled by private keys and do not have private keys. Instead, 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 requires Gas fees, and contract account wallets cannot initiate transactions independently; they require an externally owned account to call them and pay Gas fees to initiate transactions.

image

Both types of wallet accounts have their pros and cons and limitations. **EOA accounts can only be generated according to Ethereum's specified method and lack programmability. They require Gas fees to operate, and losing the private key means it cannot be recovered. However, compared to CA accounts, while CA accounts can customize logic for more functionalities, they cannot initiate transactions independently and require EOA accounts to call them. Additionally, generating CA accounts incurs extra costs, and neither type currently resolves the complex user experience of wallets.

Account Abstraction is a wallet technology solution on Ethereum that aims to combine the features of EOA and CA accounts into one, replacing EOA as the main account, allowing for programmability while eliminating the dependency on EOA to initiate transactions.

The account abstraction discussed here refers to the Ethereum EIP-4337 proposal put forward by Vitalik, which separates the "transaction validation mechanism" originally hardcoded in the consensus layer of Ethereum wallet transactions 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 such as: paying Gas fees on behalf, aggregating signatures, and privacy protection.

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 for signing transactions. 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 and does not affect the actual use of the account abstraction wallet. This decoupling of ownership and signing rights allows wallet products to provide users with social recovery methods, so even if they 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 to use wallets can also be addressed. Account abstraction wallets can not only allow third parties to pay Gas fees but also enable the payment of Gas fees using assets other than native tokens. This will significantly lower the usage threshold for novice users regarding Gas fees. In the near future, it seems foreseeable that the lower threshold and more customizable features brought by account abstraction may lead to a new era for wallets.

image

(4) Why did Ethereum choose the EIP-4337 account abstraction proposal?#

The discussion of account abstraction has not ceased since Ethereum's launch. From the earliest EIP-101 to EIP-3074 and now the latest EIP-4337, the account abstraction proposals have gone through several iterations. However, most proposals were shelved due to immaturity and the complexity of modifications to the consensus protocol layer.

image

Since 2015, after a long 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 of The Splurge phase. This also made EIP-4337 the final solution for account abstraction.

EIP-4337 was chosen by Ethereum as the final solution primarily because it can achieve account abstraction without modifying the consensus protocol layer, avoiding massive changes akin to transitioning from a POW to a POS mechanism. In contrast, EIP-3074 involves changes to the consensus layer, and if issues arise, it would require a hard fork to resolve. Additionally, EIP-3074 allows EOA accounts to possess the characteristics of smart contract accounts, but it still uses the fixed ECDSA signature mechanism, which cannot utilize arbitrary signature methods like EIP-4337. Therefore, compared to EIP-3074, EIP-4337 appears to have more advantages in lowering wallet thresholds.

Image Source: ethereum.cn translation

(Image Source: ethereum.cn translation)

(5) How do EIP-4337 account abstraction wallets operate? How are they 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 validating and executing user operations.

User Operations (UserOperations, uo): A new off-chain transaction form initiated by users, distinct from previous "transaction transactions (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 user operations waiting to be executed, independent of the transaction transaction memory pool.

Paymaster: An optional third-party contract account that pays Gas fees.

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

Image Source: https://medium.com/nethermind-eth/ethereum-wallets-today-and-tomorrow-eip-3074-vs-erc-4337-a7732b81efc8

From the diagram, we can see the steps for an EOA account wallet to initiate a transaction:

  1. The user uses their private key to sign the transaction information, generating a signed transaction (Transaction, tx).
  2. The signed transaction is sent to the memory pool for pending transactions to await processing.
  3. Miners process the transactions in the transaction memory pool and verify their validity.
  4. When the validity is confirmed, the transaction is included in a block; otherwise, it is discarded.

Since CA accounts lack a unified transaction flow standard, the following diagram illustrates a transaction flow for a smart contract wallet that relies on a Relayer. We can see that CA accounts depend 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

Image Source: https://medium.com/nethermind-eth/ethereum-wallets-today-and-tomorrow-eip-3074-vs-erc-4337-a7732b81efc8

From the diagram, we can see the steps for a CA account wallet to initiate a transaction:

  1. The user uses their private key to sign the transaction information in any form, generating a signed transaction information (signed message).
  2. The signed transaction information is sent to the Relayer node responsible for conveying the message.
  3. The Relayer uses its private key to sign the user-signed transaction information with an ECDSA signature, forming a transaction.
  4. The Relayer sends the transaction containing the user transaction information through its EOA wallet to the user's wallet smart contract for execution.
  5. 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 for wallets after EIP-4337 account abstraction.

Image Source: https://medium.com/nethermind-eth/ethereum-wallets-today-and-tomorrow-eip-3074-vs-erc-4337-a7732b81efc8

Image Source: https://medium.com/nethermind-eth/ethereum-wallets-today-and-tomorrow-eip-3074-vs-erc-4337-a7732b81efc8

From the diagram, we can see the steps for initiating a transaction after account abstraction:

  1. The user initiates a wallet user operation, using any form of private key to sign the user operation, generating a signed user operation (UserOperations, uo).
  2. The signed user operation is sent to the pending user operation memory pool for processing.
  3. The Bundler packages the user operations from the memory pool into a transaction and submits it to the entry point contract.
  4. The entry point contract processes all user operations: verifies if the wallet exists - requires the wallet to validate the user operation - sends the user operation to the smart contract wallet for execution.
  5. The smart contract wallet executes the user operation and includes it in a block.

By comparing, we can find that EOA accounts require the fixed ECDSA signature algorithm of Ethereum to sign transactions, while CA accounts ultimately also rely on the ECDSA signature algorithm of EOA accounts to sign transactions. In EIP-4337, the account abstraction wallet delegates the "signature verification mechanism" to the entry point contract, allowing it to use any form of signature mechanism. Wallet developers can choose the appropriate signature form for their wallet products, and users can directly operate the account abstraction wallet through specific signing methods that are easy for Web2 users to use or customized for specific scenarios.

Moreover, since any miner can act as a 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, and these new mechanisms also bring more imaginative application scenarios, such as third-party Gas fee payments by Paymasters.

image

From the diagram, we can see that transaction transactions (tx) and user operations (uo) are two independent memory pools. Due to the existence of the entry point contract in account abstraction, the Paymaster contract can combine 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? Does it have enough ETH to pay Gas fees?

In addition to fully subsidizing Gas fees, if the user's account contract only holds tokens like USDT or USDC that are not used for Gas fees, the user can also transfer other tokens equivalent to the Gas fees to the Paymaster contract to achieve the effect of paying Gas fees without ETH.

Besides paying Gas fees, the entry point contract can also implement aggregated signature functionality by combining with an aggregate signature verification contract, allowing for multi-signature control of the wallet.

image

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?

(6) What shortcomings and risks exist with EIP-4337 account abstraction?#

Although the vision of account abstraction is very promising, reality often proves to be quite challenging. Current 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 a system 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 can often see that many contracts that have passed "smart contract audits" still have security vulnerabilities. Each time a contract security issue arises, it often comes with significant financial losses. For the EIP-4337 account abstraction proposal, the modular accumulation of account abstraction wallet functions and the introduction of new mechanisms will make the code execution logic more complex, and often, more complex code execution logic may carry potential security risks. Since both the account abstraction wallet and the entry point contract are smart contracts, if either the entry point contract or the wallet contract encounters issues, it could lead to a devastating hacking incident, significantly undermining trust in the use of account abstraction wallets.

Higher Gas Fees

In addition to potential contract security risks, account abstraction wallets require users to pay higher Gas fees because the operational steps for processing transactions are more numerous and the logic is more complex compared to EOA and CA accounts. The increased number of operations also means higher Gas fees. Although Vitalik has proposed solutions to reduce Gas consumption by processing account abstraction data through Layer 2, this will also take a considerable amount of time.

Technical Implementation Issues

There is still a long way to go before EIP-4337 is implemented. Many theoretically feasible technologies often encounter numerous practical challenges, such as compatibility issues, complex node verification processes, how to prevent Bundlers from acting maliciously, and technical logic that cannot be realized. Addressing these technical issues will require extensive trials and discussions, which is why EIP-4337 has been placed in the sixth phase of Ethereum's upgrade, Splurge.

The road ahead is long and challenging. The crypto world needs wallets that are lower in threshold and secure to attract more new users and break through the bottleneck of user numbers. I believe 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 solution 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.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.