What is UserOperation?
Last updated
Last updated
The ERC-4337 process begins with a UserOperation, which is similar to a transaction but represents the user's intention to transact. A UserOperation can encompass multiple requests and additional data, enabling a Smart Contract Account (SCA) to execute the intended transactions.
While UserOperations share similarities with traditional transactions, they have distinctive features:
Additional Fields: UserOperations incorporate new elements into the transaction structure, such as EntryPoint, Bundler, Paymaster, and Aggregator.
Separate Mempool: Instead of the standard mempool, UserOperations are sent to an alternative mempool. Here, bundlers collate them into transactions for inclusion in a block.
Today, transaction inputs are specific. For instance; 'Swap 2K USDC for 1 ETH'
In contrast, UserOperations can be decorated with additional metadata to be more intent-focused. For instance; 'I want to trade 2K USDC for the most amount of ETH possible'.
Sources: Ethereum, ERC4337.io, Alchemy