Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

User Operation (UserOp)

A User Operation (UserOp) is a standardized data structure defined by ERC-4337 that represents a user's intent for a transaction, which is then bundled and executed by a separate network of actors.
Chainscore © 2026
definition
ERC-4337 STANDARD

What is a User Operation (UserOp)?

A User Operation (UserOp) is the fundamental data structure in ERC-4337 that represents a user's intent for a smart contract wallet, enabling account abstraction without requiring consensus-layer changes to Ethereum.

A User Operation (UserOp) is a standardized data packet defined by ERC-4337 that represents a user's desired action (e.g., a token transfer or contract interaction) from a smart contract wallet. Unlike a traditional Ethereum transaction, a UserOp is not signed with an Externally Owned Account (EOA) private key and is not submitted directly to the mempool. Instead, it is a declarative object containing fields for the target contract, call data, signatures, and parameters for gas payment and verification, which is bundled and executed by a separate network of actors.

The structure of a UserOp decouples transaction execution from fee payment and signature validation. Key fields include the sender (the smart contract account address), nonce, initCode (for account deployment), callData (the action to execute), callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, maxPriorityFeePerGas, paymasterAndData (for sponsored transactions), and signature. This design allows for advanced features like social recovery, session keys, gas sponsorship, and atomic multi-operations (batches) from a single UserOp.

UserOps are processed by a decentralized network of Bundlers. These nodes listen for UserOps in a dedicated mempool, validate them against the sender's smart contract wallet using its validateUserOp function, package them into a single standard Ethereum transaction, and send that bundle to an EntryPoint contract on-chain. The EntryPoint is a singleton contract that orchestrates the execution, ensuring paymasters are compensated and wallets are charged correctly, making the entire system trust-minimized and non-custodial.

This architecture enables a superior user experience by abstracting away blockchain complexities. Users can enjoy features such as paying gas fees in ERC-20 tokens via a paymaster, recovering accounts without seed phrases, and approving multiple actions with one signature. By standardizing the UserOp, ERC-4337 creates a unified interface for smart contract wallets, fostering interoperability across wallets, dApps, and infrastructure providers in the account abstraction ecosystem.

how-it-works
ERC-4337 MECHANISM

How a User Operation Works

A User Operation (UserOp) is the fundamental transaction object in ERC-4337 account abstraction, representing a user's intent for execution by a decentralized network of bundlers and paymasters.

A User Operation is a pseudo-transaction object defined by the ERC-4337 standard that encapsulates a user's intent for actions on a blockchain. Unlike a traditional transaction signed directly by an Externally Owned Account (EOA), a UserOp is a structured data packet containing fields like the sender's smart contract wallet address (sender), the target contract to call (target), the calldata for that call (calldata), a signature (signature), and a maximum fee budget (maxFeePerGas, maxPriorityFeePerGas). This structure decouples transaction initiation from validation and execution, enabling advanced features like gas sponsorship, batch transactions, and session keys.

The lifecycle of a UserOp begins when a user's wallet application, or client, constructs and signs the operation. This signed UserOp is then broadcast to a peer-to-peer mempool, a dedicated space separate from the standard Ethereum transaction pool. Here, a specialized actor called a bundler discovers the UserOp. The bundler's role is to perform simulation using the eth_call RPC to validate the operation's signature and ensure it will pay fees, then package one or more validated UserOps into a single, atomic blockchain transaction for submission to the network.

Critical to this process are two other agents defined by ERC-4337: the paymaster and the entry point. The paymaster is a smart contract that can sponsor transaction fees on behalf of the user, enabling gasless transactions or payment in ERC-20 tokens. The entry point is a singleton, audited system contract that acts as the exclusive gateway; the bundler's transaction calls the handleOps function on the EntryPoint, which orchestrates the entire execution, validation, and fee payment logic for all UserOps in the bundle, ensuring security and consistency across the network.

key-features
ERC-4337 STRUCTURE

Key Features of a UserOp

A User Operation is a standardized data structure defined by ERC-4337 that represents a user's intent for a smart contract wallet. It packages all the information needed for a Bundler to submit it to the EntryPoint contract.

01

Sender & Nonce

The sender is the smart contract wallet address initiating the operation. The nonce is a unique number that prevents replay attacks and ensures the UserOp is executed only once. The EntryPoint contract manages this nonce, which can be sequential or keyed by a specific signer for more complex account logic.

02

InitCode & CallData

InitCode is the factory contract address and calldata needed to deploy the sender's smart contract wallet if it doesn't yet exist (enabling gasless onboarding). CallData is the encoded function call that the wallet will execute, such as transferring tokens or interacting with a dApp.

03

Signature & Paymaster Data

The signature is a cryptographic proof (e.g., ECDSA) that the owner of the wallet authorizes the UserOp. Paymaster data contains information for a Paymaster contract, which can sponsor the transaction's gas fees or pay in ERC-20 tokens, abstracting gas complexity from the user.

04

Gas Limits & Fees

A UserOp specifies its own gas parameters, separate from the underlying Ethereum transaction:

  • Verification gas: For the wallet's validateUserOp function.
  • Call gas: For executing the callData.
  • Pre-verification gas: Covers Bundler overhead.
  • Max fee per gas & Max priority fee: Set the gas price for the Ethereum block.
05

The EntryPoint Contract

The EntryPoint is a singleton, audited smart contract that acts as the central orchestrator. It validates each UserOp (signature, nonce, paymaster), executes the wallet's logic, handles gas payment, and aggregates results. All Bundlers submit UserOps to this single contract address.

06

Bundler & Mempool

A Bundler is a network participant (often a node) that listens for UserOps in a peer-to-peer mempool, packages them into a standard Ethereum transaction, and submits the batch to the EntryPoint. This separates transaction construction from block building.

ARCHITECTURAL COMPARISON

UserOp vs. Traditional Ethereum Transaction

A structural comparison between the User Operation object used in ERC-4337 account abstraction and a standard Ethereum EOA-signed transaction.

FeatureUser Operation (UserOp)Traditional EOA Transaction

Primary Signer

Smart Contract Account

Externally Owned Account (EOA)

Transaction Object

Bundled UserOp struct

RLP-encoded transaction

Gas Payment Flexibility

Atomic Batch Execution

Signature Verification Logic

Custom (ERC-1271)

Fixed (ECDSA secp256k1)

Sponsored / Gasless Flows

Native Transaction Type

Relay Through

Bundler

Public Mempool or Private RPC

visual-explainer
ERC-4337

Visual Explainer: The UserOp Lifecycle

A step-by-step breakdown of how a User Operation moves from user intent to on-chain execution within an ERC-4337 account abstraction framework.

A User Operation (UserOp) is a standardized data structure defined by ERC-4337 that represents a user's intent for a transaction, decoupled from the traditional transaction format. It is a pseudo-transaction object that specifies the desired actions—such as a token transfer or a smart contract interaction—but lacks a traditional Ethereum signature and is not submitted directly to the mempool. Instead, it is bundled and sponsored by a separate network of actors, enabling gas abstraction, sponsored transactions, and batch execution.

The lifecycle begins when a user's smart contract wallet (or any ERC-4337-compliant account) constructs a UserOp. This object contains critical fields: the sender (the smart account address), the nonce, the callData (the encoded execution instructions), and parameters for gas payment (verificationGasLimit, callGasLimit). The wallet then signs this UserOp with its own signature scheme, which could be a multisig, a social login, or a hardware device, and submits it to a dedicated UserOp mempool.

Specialized network participants called Bundlers monitor this mempool. A Bundler's role is to collect multiple UserOps, validate their signatures and paymasters, and package them into a single, atomic bundle transaction. The Bundler submits this bundle to the Ethereum network, paying the gas fees upfront. Crucially, the Bundler is reimbursed through the mechanism defined in the UserOp, either by the user's deposited funds or by a third-party Paymaster contract that can sponsor the transaction.

Before execution, each UserOp in the bundle undergoes verification by the sender's account contract. This step, paid for by the verificationGasLimit, allows the account to implement custom security logic, such as signature validation or spending limits. If verification passes, the account contract executes the callData. The gas for this execution is covered by the callGasLimit. This two-phase process separates authentication (verification) from action (execution), a core innovation of account abstraction.

Finally, the results of the bundled execution are recorded on the Ethereum blockchain. The user's intended operation is complete, and gas costs have been handled abstractly, often invisibly to the end-user. This entire lifecycle—from intent to bundled on-chain settlement—enables the key benefits of ERC-4337: seamless user experiences, flexible authentication, and the ability for dApps to sponsor their users' transactions.

ecosystem-usage
ERC-4337

Ecosystem Usage & Protocols

User Operations (UserOps) are the fundamental data structure powering ERC-4337 account abstraction, representing a user's intent to execute actions from a smart contract wallet.

01

Core Data Structure

A UserOp is a standardized packet containing all the information needed to execute a transaction from a smart account. Its key fields include:

  • sender: The smart contract account address.
  • nonce: Prevents replay attacks.
  • initCode: For deploying the account if it doesn't exist.
  • callData: The encoded actions to execute.
  • paymasterAndData: For sponsoring gas fees.
  • signature: User verification, which can be any logic (e.g., multisig, passkey).
02

Bundler Role

Bundlers are network actors (often nodes) that collect UserOps from a mempool, simulate them for validity, bundle them into a single transaction, and submit them to the blockchain. They act as the relay layer, paying the base layer gas fees and earning tips. This abstracts gas handling from the end user.

03

Paymaster & Gas Abstraction

A paymaster is a smart contract that can sponsor transaction fees for users, enabling gasless transactions or payment in ERC-20 tokens. In a UserOp, the paymasterAndData field specifies which paymaster to use and provides verification data, allowing for:

  • Sponsored sessions (app pays).
  • ERC-20 gas payment (user pays in USDC).
  • Subscription models.
04

EntryPoint Contract

The EntryPoint is a singleton, audited smart contract that acts as the central verification and execution hub. Bundlers call handleOps() on it. It is responsible for:

  • Validation: Calling the smart account's validateUserOp function.
  • Execution: Executing the UserOp's callData.
  • Payment: Compensating the bundler and paymaster. All ERC-4337 flows must pass through this contract, ensuring security and consistency.
05

Account Abstraction in Action

UserOps enable features impossible with EOAs (Externally Owned Accounts):

  • Social Recovery: Use guardians to recover a lost key.
  • Batch Transactions: Multiple actions in one UserOp (e.g., approve & swap).
  • Session Keys: Grant limited permissions to dApps.
  • Quantum Resistance: Signatures can be based on new algorithms. This shifts security and logic from the key pair to the smart contract account.
06

Mempool & Simulation

UserOps are broadcast to a dedicated alt mempool, separate from the standard transaction mempool. Before accepting a UserOp, a bundler must run a simulation via eth_call to the EntryPoint to verify it will pay fees and is valid. This prevents spam and ensures bundlers are not penalized. Failed simulations result in the UserOp being rejected.

security-considerations
USER OPERATION (USEROP)

Security Considerations

A User Operation is a pseudo-transaction object in ERC-4337 that defines an intent for an Account Abstraction wallet. Its security is paramount as it governs the execution of user-signed logic.

01

Signature Verification

The Bundler must verify the cryptographic signature on the UserOp before including it in a bundle. This involves:

  • Ensuring the signature corresponds to the sender address.
  • Validating the signature against the UserOp hash, which includes all fields to prevent tampering.
  • Supporting the account's specific signature scheme (e.g., EOA-signed, multi-sig, passkey).
02

Gas & Payment Validation

The Paymaster must rigorously validate payment logic to prevent subsidy abuse.

  • Pre-funding checks: Verifying the account or paymaster has sufficient deposit in the EntryPoint.
  • Gas limit enforcement: Ensuring callGasLimit, verificationGasLimit, and preVerificationGas are within sane bounds to prevent resource exhaustion attacks.
  • Sponsorship rules: Applying strict business logic for sponsored transactions to prevent draining.
03

Replay Protection & Uniqueness

Each UserOp must be unique to prevent replay attacks.

  • The EntryPoint contract uses a nonce for each sender account.
  • Nonces can be sequential (for EOAs) or parallel (for smart accounts enabling concurrent sessions).
  • Bundlers must check the nonce is valid and has not been used before submitting the operation.
04

Frontrunning & Mempool Risks

UserOps are broadcast to a public mempool, exposing them to frontrunning and sandwich attacks.

  • Searchers can copy, modify (e.g., raising maxPriorityFee), and republish a UserOp.
  • Sensitive fields like callData are visible, potentially leaking intent.
  • Mitigations include using private RPCs, Flashbots Protect, or future encrypted mempools.
05

Paymaster Trust Assumptions

Using a Paymaster introduces centralization and trust risks.

  • A malicious or compromised paymaster can censor, frontrun, or drain its own deposit to fail user transactions.
  • Users must trust the paymaster's liveness and integrity.
  • Verifying Paymasters that only perform signature aggregation reduce this risk surface.
06

Smart Account Implementation Risks

The security of a UserOp depends on the smart account's code.

  • Vulnerabilities in the account's validateUserOp function or execution logic can lead to total fund loss.
  • Common risks include signature malleability, reentrancy in validation, and improper access controls.
  • Audits and formal verification of account factory and wallet contracts are critical.
USER OPERATION (USEROP)

Common Misconceptions

User Operations are the fundamental transaction unit in ERC-4337 account abstraction, but their mechanics are often misunderstood. This section clarifies frequent points of confusion.

No, a UserOp is a structured data packet that describes a desired action, not a transaction itself. A standard Ethereum transaction is a signed, executable message sent directly to the network. A UserOp is an unsigned intent that must be submitted to a specialized network of bundlers. The bundler packages it into a valid transaction, pays the gas, and submits it on behalf of the user's smart contract wallet. This separation of intent from execution is the core of account abstraction.

USER OPERATION (USEROP)

Technical Deep Dive

A User Operation (UserOp) is the fundamental data structure representing a user's intent in an ERC-4337 account abstraction transaction. This section deconstructs its components, lifecycle, and role in the smart contract wallet ecosystem.

A User Operation (UserOp) is a standardized data packet defined by ERC-4337 that represents a user's intent for a transaction from a smart contract wallet, without requiring a native Externally Owned Account (EOA) to initiate it. It works by bundling all necessary execution parameters—like the target contract, call data, and signature—into a single object that is submitted to a decentralized network of bundlers. These bundlers package multiple UserOps into a single on-chain transaction, enabling gas abstraction, sponsored transactions, and batched actions. The core innovation is decoupling transaction initiation (the UserOp) from fee payment and on-chain execution.

USER OPERATION (USEROP)

Frequently Asked Questions

Essential questions and answers about User Operations, the fundamental transaction object for ERC-4337 account abstraction.

A User Operation (UserOp) is a pseudo-transaction object that represents a user's intent within the ERC-4337 account abstraction standard, which is executed by a separate network of actors called Bundlers. Unlike a traditional Ethereum transaction, a UserOp is not signed by an Externally Owned Account (EOA) but by a smart contract wallet. The process involves a user signing their intent, a Bundler collecting multiple UserOps into a bundle, and submitting that bundle as a single transaction to the EntryPoint contract on the blockchain, which then validates and executes each operation.

Key components of a UserOp include:

  • sender: The smart contract account address.
  • nonce: Prevents replay attacks.
  • initCode: For deploying the account if it doesn't exist.
  • callData: The execution instructions for the account.
  • signature: The user's authorization for the operation.
  • paymaster and verificationGasLimit: Optional fields for sponsored transactions and gas management.
ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
User Operation (UserOp) - ERC-4337 Transaction Intent | ChainScore Glossary