On March 1st, 2023, Ethereum mainnet witnessed a groundbreaking implementation known as Account Abstraction or ERC-4337. This upgrade revolutionized the way smart contracts handle user transactions on the blockchain. In this article, we will delve into the key technical components introduced by Account Abstraction (ERC-4337)and examine how they collaborate to execute user transactions effectively.
The Components of Account Abstraction (ERC-4337)
User Operation:
At the core of ERC-4337 lies the User Operation, a structure designed to capture the user’s intent and operations. It encapsulates essential transaction elements like sender, payload, gas-related information, and more. The User Operation is distinct from a traditional transaction, aiming to ensure validity and cover execution costs on the chain. The User Operations mempool serves as a dedicated pool for pending User Operations, awaiting processing by the network. It provides a separate space for User Operations apart from the traditional public mempool.
Bundler:
Acting as an Externally Owned Account (EOA), the Bundler plays a crucial role in handling User Operations. It retrieves User Operations from the canonical mempool and alt-mempools, bundles them together, and sends the resulting bundle to the EntryPoint contract for execution. Bundlers employ value-maximizing logic to select the User Operations to include in their bundle transaction. Economic Model and Incentives for Bundlers includes the gas fee cost in ETH as the “from” address responsible for submitting the bundle transaction on-chain. They are compensated through fees paid as part of individual User Operation executions. Bundlers validate User Operations, ensuring signature correctness and fee coverage. They exclude invalid User Operations to prevent absorbing gas costs for operations unable to pay.
EntryPoint:
The EntryPoint contract serves as a singleton contract responsible for verifying and executing bundles of UserOperations. It acts as the global entry point for all ERC-4337-compliant smart contract wallets transacting on the Ethereum Virtual Machine (EVM). The EntryPoint ensures the authenticity and validity of UserOperations before processing them on-chain.
Aggregator:
Aggregators are trusted helper smart contracts that aggregate multiple UserOperation signatures into a single signature. This aggregation process enhances efficiency and reduces transaction processing costs at scale. Aggregators play a crucial role in facilitating scalability as the volume of ERC-4337 transactions grows.
Paymaster:
Paymasters are optional stakeholders that can sponsor transactions for other users, introducing new features for transacting on Ethereum. They enable users to pay transaction fees with off-chain methods like credit cards or ERC-20 tokens. Paymasters can be of two types: verifying paymasters linked to off-chain processes and deposit paymasters linked to on-chain ERC-20 tokens.
Conclusion:
Account Abstraction introduces a significant advancement in Ethereum’s transaction capabilities by enabling smart contracts to transact on behalf of users. With the components of Account Abstraction, developers can enhance the user experience and expand the possibilities of transactional interactions on the Ethereum blockchain.