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 four main components: UserOperations, Bundlers, EntryPoint, and Contract Accounts.
Stackup is developing several packages to make it easier to use ERC-4337, including userop.js, Bundler, Paymasters, and data APIs. Here is the process is a diagram:
First, a user creates a UserOperation object and submits it to the mempool. The Bundler then receives the UserOperation and submits it to the EntryPoint for verification and execution. The EntryPoint verifies the UserOperation is valid by checking the Contract Account and if needed the Paymaster and Aggregator, 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.
Test out Stackup's quickstart guide!