ERC-4337
ERC-4337: Account Abstraction¶
ERC-4337 is a standard for implementing Account Abstraction (AA) without modifying Ethereum's consensus layer protocol. It allows users to use smart contract wallets as their primary accounts, rather than traditional Externally Owned Accounts (EOAs).
Problem Addressed¶
Traditional EOA accounts (controlled by private keys) have numerous limitations: * Losing the private key means losing all assets: No recovery possible. * Reliance on seed phrases: High barrier to entry for users. * Must use ETH to pay Gas: Cannot use stablecoins for payment. * Fixed signing logic: Only supports ECDSA signatures.
ERC-4337 aims to solve these problems through smart contract wallets, providing a seamless Web2-like experience while maintaining decentralization.
Mechanism and Principles¶
ERC-4337 introduces a new mempool (UserOp Mempool) and several key roles:
- UserOperation: A pseudo-transaction object similar to a transaction, containing the user's intent (e.g., "transfer 10 USDT"), signature, and other parameters.
- Bundler: A role running a specific node (can be a miner/validator). It monitors the UserOp mempool and bundles multiple UserOperations into a single regular Ethereum transaction.
- EntryPoint: A global singleton contract. The Bundler sends the bundled transaction to the EntryPoint. The EntryPoint is responsible for validating UserOperations and executing operations in smart contract wallets.
- Smart Account: The user's wallet contract. It must implement validation logic (validating UserOp signatures) and execution logic.
- Paymaster: An optional component. Allows third parties (DApp project teams or service providers) to pay Gas fees for users, or allows users to pay Gas using ERC-20 tokens.
- Aggregator: An optional component. Used to support BLS and other aggregate signatures, further saving Gas.
Key Features¶
- No consensus layer changes: Can be implemented without an Ethereum hard fork.
- Gas Sponsorship: Enables "gasless" transaction experiences.
- Multisig and social recovery: Native support for complex access control logic.
- Batch transactions: Execute multiple operations with a single signature (e.g., Approve + Swap).
- Quantum resistance potential: Signature algorithms can be upgraded in the future (e.g., Lamport signatures).