EIP-4337, also known as the ERC-4337 standard, is a proposed Ethereum improvement proposal that aims to introduce account abstraction to the Ethereum network. Account abstraction allows smart contracts to act as wallets and execute transactions on behalf of users. This allows users to interact with the Ethereum network without the need for their own private keys or the need to hold Ether for gas fees.
The ERC-4337 standard consists of five main components: UserOperations, Bundlers, EntryPoint, and Smart Contract Accounts.
- UserOperations are pseudo-transaction objects that are used to execute actions through a smart contract wallet.
- Bundlers package UserOperations and send them to the EntryPoint contract on the blockchain for verification and execution.
- EntryPoint is a singleton smart contract that handles the verification and execution logic for transactions.
- Smart Contract Accounts are owned by a user and can be supplemented with features from other smart contracts like aggregators and paymasters.
In practice, the process of using ERC-4337 is complex and involves several steps.
First, a user creates a UserOperation object using the Client SDK. The Bundler then receives the UserOperation via a JSON RPC Client and submits it to the EntryPoint for verification and execution. The EntryPoint verifies the UserOperation using the Wallet Contract and Paymaster Contract, and then sends the call data to the Wallet Contract for execution. Any unused gas fees are refunded to the Wallet Contract or a function is called on the Paymaster Contract to run any post-execution logic.
The ERC-4337 standard has the potential to revolutionize the way users interact with the Ethereum network and could make it easier for non-technical users to participate in the Ethereum ecosystem. However, it is important for all implementations of the ERC-4337 standard to be thoroughly audited to ensure security and reliability.
Want to try EIP-4337 yourself?
Test out Stackup's quickstart guide!