EIP-4337: Account Abstraction
Chris
0x901c
December 11th, 2022

Introduction

Account abstraction is a concept that refers to the future of wallet signing mechanisms. Currently, the signature mechanism used by mainstream wallets, known as EOAs, is the CDSA (Elliptic Curve Digital Algorithm Signature). However, the signature mechanism of future wallets could be diversified, potentially using multi-sig, other encryption algorithms, and ZK verification. The proposal of EIP-4337 promotes the implementation of the Account abstraction, which may pave the way for a new era of self-custodial wallets. This feature allows users to send and receive transactions, as well as deploy and interact with smart contracts, using their own accounts. The account abstraction also enables users to control their own private keys, giving them full ownership and control over their assets and transactions on the Ethereum network.

EOAs

EOAs, or externally-owned accounts, are a type of account on the Ethereum blockchain that is controlled by a private key. These accounts are typically associated with individual users or entities, and they are used to send and receive transactions on the Ethereum network. EOAs are not capable of executing code, unlike smart contracts, which are another type of account on the Ethereum blockchain. Instead, EOAs are used to store and transfer assets, such as Ether, on the Ethereum network (i.e Metamask).

Account abstraction

Ethereum account abstraction is a concept that aims to improve the user experience of creating and managing Ethereum wallets. The current process for creating a non-custodial wallet, which involves generating and securely storing a seed phrase, can be complex and difficult for new users. Account abstraction is a proposed solution to this problem, as it would enable users to create and manage their Ethereum wallets in a more user-friendly way. It’s highly encouraged to read the proposal:

The proposal for Ethereum's account abstraction is called UserOperation and it is a higher-layer pseudo-transaction object that avoids the need for consensus-layer protocol changes. Instead of adding new protocol features, UserOperation introduces a way for users to send transactions through a separate mempool. A special class of actor called bundlers can package these transactions and include them in a block. This proposal aims to improve security and usability, as well as support privacy-preserving applications and atomic multi-operations.

The rationale behind the UserOperation proposal for Ethereum's account abstraction is to provide a way for miners to include transactions without the risk of a denial of service (DoS) attack. The proposal requires wallets to have a validateUserOp method that takes a UserOperation as input and verifies the signature and fee payment. This method is almost-pure, meaning it can only access the storage of the wallet itself, and cannot use certain environment opcodes. This allows miners to simulate the verification step locally, giving them confidence that the result will match the actual result when the operation is included in a block.

Ethereum.org
Ethereum.org

The proposal also introduces the concept of paymasters, which facilitate transaction sponsorship by allowing third parties to pay for transactions. This allows for passive paymasters and prevents attackers from griefing paymasters. The paymaster scheme also allows contracts to pay on users' behalf under arbitrary conditions.

The proposal includes a mechanism for first-time wallet creation, allowing users to generate an address locally and start accepting funds immediately. This is done through a factory contract that uses CREATE2 to create the wallet. The proposal also includes support for aggregated signatures and a permissionless system for adding new entry points.

Ethereum.org
Ethereum.org

A UserOperation is a structure that describes a transaction to be sent on behalf of a user. It contains similar fields to a regular transaction, such as sender, to, and calldata, but also includes additional fields. The nonce and signature fields are not defined by the protocol but by each account implementation.

A UserOperation is sent to a dedicated user operation mempool, where a class of actors called bundlers can package multiple UserOperations into a single bundle transaction through a call to a pre-published global entry point contract. This is done to prevent replay attacks and support signature aggregation.

To support account abstraction, a wallet must implement the IWallet interface, which includes a validateUserOp method that takes a UserOperation as input. This method is used to validate the caller and signature, as well as pay the entry point and any paymaster specified in the UserOperation. The wallet can also choose to execute the transaction and pay for any additional gas costs.

The entry point contract, which is called by the bundler, is responsible for executing the bundle transaction and passing the resulting receipts back to the bundler. It also includes a simulateValidation method that can be used by the bundler to estimate the gas costs of the transaction.

Overall, the UserOperation proposal provides a way for Ethereum to implement account abstraction without the need for consensus-layer protocol changes. It allows for more complex contract functionality and improved security and usability.

Conclusion

Overall, Ethereum's account abstraction is a significant improvement over the current EOA model. It enhances the security and usability of the platform, making it more attractive to users and developers alike.

Subscribe to Chris
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.
Arweave Transaction
1THH_edDu3FwoyV…_crtwW4IOmjC-xY
Author Address
0x901c6C8e5516a6d…d834Bdc5cC0e9Dc
Content Digest
UCqLMfYiMjFgQqd…VfZSCn0PYuhlRnU
More from Chris
View All

Skeleton

Skeleton

Skeleton

0 Collectors