Account Abstraction

Version: ERC-4337 (EntryPoint v0.6) Deployed Components: EntryPoint, Bundler Service, Verifying Paymaster Network: BlockDAG Testnet

1. Introduction

Account Abstraction (AA) redefines Ethereum’s account model by moving from Externally Owned Accounts (EOAs) with private keys and gas payments toward smart contract accounts that define their own validation logic.

The key enabler is ERC-4337, which introduces a new transaction flow without requiring changes to Ethereum’s consensus layer. Instead of EOAs sending transactions directly, users submit UserOperations (UserOps) to an alternative mempool, processed by a bundler service.

This model unlocks:

  • Custom signature schemes (biometrics, MPC, social recovery).

  • Gas sponsorships (transactions without holding ETH).

  • Flexible UX (batching, meta-transactions, account upgradeability).

2. UserOperations

A UserOperation is the ERC-4337 equivalent of a transaction, but with richer structure.

Core Fields

  • sender – Smart account address.

  • nonce – Replay protection.

  • initCode – Code to deploy the account if it doesn’t exist yet.

  • callData – Encoded function calls.

  • callGasLimit, verificationGasLimit, preVerificationGas – Gas budgeting.

  • maxFeePerGas, maxPriorityFeePerGas – Fee configuration (EIP-1559 compatible).

  • paymasterAndData – Optional field for Paymaster sponsorship.

  • signature – Authorization proof.

  1. User signs and submits a UserOperation to the bundler RPC.

  2. Bundler validates via simulateValidation in EntryPoint.

  3. If valid, it enters the alternative mempool.

  4. Bundler selects UserOps, forms a bundle, and submits a single transaction to EntryPoint.

  5. EntryPoint executes and emits UserOperationEvent logs.

3. Core Components

3.1 EntryPoint Contract (v0.6)

  • Deployed once per chain.

  • Provides validation and execution logic.

  • Tracks deposits for accounts and Paymasters.

  • Ensures replay protection and security checks.

  • Emits logs (UserOperationEvent) for monitoring.

3.2 Bundler Service

The bundler is a specialized node implementing the ERC-4337 mempool and RPC.

Responsibilities

  • Accept UserOps via RPC (eth_sendUserOperation).

  • Run simulateValidation:

  • Validates account logic.

  • Checks Paymaster conditions.

  • Computes prefunding.

  • Maintain mempool and reputation system.

  • Bundle UserOps based on thresholds/time and submit to EntryPoint.

  • Provide query methods:

  • eth_estimateUserOperationGas

  • eth_getUserOperationReceipt

  • eth_getUserOperationByHash

Execution Flow

  1. Validate UserOp.

  2. Compute prefund requirement.

  3. Add to mempool with reputation tracking.

  4. Bundle → Submit → Process events.

Bundler implementation: Eth Infinitism reference repo, extended for BlockDAG.

3.3 Paymaster Contract (Verifying Paymaster)

The Verifying Paymaster enables gasless transactions by covering gas costs for users.

How paymasterAndData Works

paymaster(20 bytes)

+ abi.encode(uint48 validUntil, uint48 validAfter)

+ signature

  • Constructed by VerifyingPaymasterAPI.ts.

  • Signs a hash of the UserOperation plus validity window.

  • Computes preVerificationGas (PVG) with a placeholder signature, re-signs if necessary.

Runner Integration

  • CLI flags:

  • --paymaster <addr>

  • --verifierMnemonic <file>

  • --pmValidFor <seconds>

  • --pmAutoTopUp

  • Verifies account owner and Paymaster signatures before submission.

  • Can automatically top up Paymaster deposit in EntryPoint.

Requirements

  • Paymaster must be staked and funded.

  • On-chain verifying signer must match local signer.

Outputs

  • Logs PVG components and computed hash.

  • Provides detailed error diagnostics on failure.

4. System Workflow

flowchart TD

A[User] -->|Signs UserOp| B[Bundler RPC]

B --> C[simulateValidation in EntryPoint]

C -->|Valid| D[Mempool]

D --> E[Bundle Manager]

E -->|Submit tx| F[EntryPoint Contract]

F -->|Executes call| G[dApp/Smart Account]

F -->|Gas Sponsorship| H[Verifying Paymaster]

F --> I[UserOperationEvent Logs]

5. References

6. Conclusion

Account Abstraction on BlockDAG introduces programmable accounts, gasless transactions, and advanced sponsorship models. With EntryPoint v0.6, a fully compliant bundler service, and the Verifying Paymaster, we have established a secure and extensible framework for user-friendly decentralized applications.

Last updated

Was this helpful?