Gelato
  • Introduction
    • Gelato, The Web3 Cloud Platform
  • Rollup As A Service
    • Introduction
    • Rollup Stacks
      • Arbitrum Orbit
        • Run a Full Orbit Node
      • OP Stack
        • Run OP Node
    • Deploy your Rollup
    • Customization
      • Data Availability
        • Celestia
        • Avail
        • Eigen DA
      • Custom Gas Token
      • Marketplace
        • Gelato Services
        • Data Indexers
        • Block Explorers
        • Oracles
        • Bridges
        • Account Abstraction
        • On & Off-ramp
        • Community
        • Identity & KYC
        • Others
      • Verifier Node Package
    • Public Testnet
  • RPC Nodes
    • Introduction
    • Compute Units
    • Using RPC Nodes
    • Supported Networks
    • Pricing and Plans
    • FAQ
  • Web3 Services
    • Web3 Functions
      • Understanding Web3 Functions
        • Trigger Types
        • Typescript Function
        • Solidity Function
        • Automated Transactions
      • Security Considerations
      • Template & Use Cases
      • Quick Start
        • Writing Typescript Functions
          • Event Trigger
          • Private Typescript Functions
          • Callbacks
        • Test, Deploy & Run Typescript functions
        • Writing Solidity Functions
        • Test, Deploy & Run Solidity Functions
        • Initiate an Automated Transaction
      • Create a Web3 Function Task
        • Using the UI
        • Using the Safe App
        • Using a Smart Contract
        • Using the Automate SDK
      • Analytics & Monitoring
      • Supported Networks
      • Subscription & Payments
      • Legacy Automate Migration Guide
    • Relay
      • What is Relaying?
      • Security Considerations
        • ERC-2771 Delegatecall Vulnerability
      • Templates
      • Quick Start
        • Sponsored Calls
        • Non-Sponsored Calls
      • ERC-2771 (recommended)
        • SponsoredCallERC2771
        • CallWithSyncFeeERC2771
          • Relay Context Contracts ERC2771
      • Non-ERC-2771
        • SponsoredCall
        • CallWithSyncFee
          • Relay Context Contracts
      • Relay API
      • Gelato's Fee Oracle
      • Tracking your Relay Request
      • Supported Networks
      • Subscriptions and Payments
        • 1Balance & Relay
        • SyncFee Payment Tokens
        • Relay Pricing
      • ERC2771 Migration Guide
    • VRF
      • Understanding VRF
      • How does Gelato VRF Work?
      • Security Considerations
      • Template
      • Quick Start
      • Create a VRF Task
        • Create a Fallback VRF
        • Migrating from Chainlink VRF
      • Supported Networks
      • Pricing & Rate Limits
    • Oracles
      • Understanding Gelato Oracles
      • Quick Start
      • Data Providers
        • Stork
        • Choas Labs
      • Migrating from Chainlink Oracles
      • Available Price Feeds
      • Supported Networks
      • Pricing & Rate Limits
    • Account Abstraction
      • Understanding ERC4337
      • Introduction to Gelato Bundler
      • Templates & Examples
      • Quick Start
      • Sponsored UserOps
        • Using 1Balance
        • Using Zerodev Paymaster
      • Non-Sponsored UserOps
        • Pay with Native
        • Pay with ERC20
      • Supported Networks
      • Bundler API Endpoints
        • eth_sendUserOperation
        • eth_estimateUserOperationGas
        • eth_getUserOperationByHash
        • eth_getUserOperationReceipt
        • eth_supportedEntryPoints
        • eth_maxPriorityFeePerGas
        • eth_chainId
    • 1Balance
      • 1Balance Alerts
      • Subscription Plans
      • Subscription Notifications
      • USDC Addresses
    • AI Agents
    • Teams
  • GELATO DAO
    • DAO & Token (GEL)
    • GEL Token Contracts
    • Governance Process
  • Social Media
Powered by GitBook
On this page
  • ERC-4337: Implementing Account Abstraction
  • Why ERC-4337?
  • Terminology
  • Sender
  • UserOperation
  • EntryPoint
  • Bundler
  • Paymaster
  1. Web3 Services
  2. Account Abstraction

Understanding ERC4337

PreviousAccount AbstractionNextIntroduction to Gelato Bundler

Last updated 2 months ago

ERC-4337: Implementing Account Abstraction

ERC-4337 is a standardized approach that implements account abstraction without requiring a hard fork or significant modifications to the Ethereum protocol. This is achieved by introducing a layer that handles user operations separately from the traditional transaction pool. The key components of ERC-4337 include:

  • UserOperations — These are transaction-like objects that encapsulate the intent of an account. They include all the necessary details to perform a transaction but allow for more flexible and complex logic.

  • Bundlers — Specialized entities that collect multiple UserOperations, package them together, and submit them as a single transaction to the Ethereum network. This mechanism not only optimizes network usage but also opens up new possibilities for transaction fee management and gas optimization.

  • Smart Contract Wallets — ERC-4337 leverages smart contracts to implement the core logic of account abstraction. These wallets can be customized to support features such as daily spending limits, delegated authority, or even recovery options if a user loses their keys.

Why ERC-4337?

Unlike , ERC-4337 avoids changes to the consensus layer itself increasing the chance of faster adoption.


Terminology

Sender

The sender is an ERC-4337 compatible smart contract wallet storing the users assets.

It must implement the following interface:

interface IAccount {
    function validateUserOp(
        UserOperation calldata userOp,
        bytes32 userOpHash,
        uint256 missingAccountFunds
    ) external returns (uint256 validationData);
}

UserOperation

A UserOperation is a pseudo-transaction object sent by the user into an alternate mempool.

It contains the following fields:

Field
Type
Description

sender

address

Account requesting the operation

nonce

uint256

Anti-replay parameter

initCode

bytes

Account creation code (only required if not yet created i.e., first transaction)

callData

bytes

Data passed to sender during execution

callGasLimit

uint256

Gas allocated for main execution

verificationGasLimit

uint256

Gas allocated for verification

preVerificationGas

uint256

Amount allocated to compensate the bundler for any gas overhead not tracked on-chain by the EntryPoint

maxFeePerGas

uint256

maxPriorityFeePerGas

uint256

paymasterAndData

bytes

Paymaster address and callData (empty for self-sponsored transactions)

signature

bytes

Data passed to the account along with the nonce during the verification step

EntryPoint

Bundler

Paymaster

Similar to

Similar to

The EntryPoint is a singleton smart contract that handles the verification and execution of bundles of UserOperations. This ensures much of the complicated logic is not required in the wallet itself and Instead, wallets trust the EntryPoint to perform proper validation (similar to a ).

A bundler is a node that bundles together multiple UserOperations from an alternate mempool and forwards them to the EntryPoint contract as a single transaction. The bundler executes transactions via EOAs which cover the transaction fees upfront and are later compensated. The is built on top of the existing service.

A paymaster is a service that covers transaction fees on behalf of the user. Unlike other solutions, Gelato does not rely on the on-chain EntryPoint to compensate transaction costs. Instead, fees are settled by the paymaster post-execution which avoids overcharging users and reduces the overall on-chain footprint.

other proposals
trusted forwarder
Gelato Bundler
Gelato Relay
1Balance
EIP-1559
EIP-1559