Skip to content

Conversation

@fosc19
Copy link
Contributor

@fosc19 fosc19 commented Dec 3, 2025

Summary

This adapter tracks gas sponsorship in the ERC-4337 Account Abstraction ecosystem on Ethereum. It scans the official EntryPoint v0.6 contract and aggregates UserOperationEvent logs to compute the daily gas sponsored by paymasters.

Real Data Example (November 30, 2024)

Metric Value
Total UserOps 552
Sponsored (gasless) 39 (7.07%)
Non-sponsored 513 (92.93%)
Gas sponsored 0.2196 ETH (~$770)
Active paymasters 2

Top Paymaster: 0x00000000000000fb866daaa79352cc568a005d96 sponsored 98.22% of all gasless transactions.

What it measures

Metric Description
dailyFees Total gas (in ETH) paid by paymasters to sponsor UserOperations
dailyRevenue Same as fees (identical value; represents cost to paymaster infrastructure)
meta.totalUserOps Total UserOperations (sponsored + non-sponsored)
meta.sponsoredUserOps Operations where paymaster != address(0)
meta.sponsoredShare Percentage of ops that are sponsored (gasless)
meta.perPaymaster Breakdown by paymaster address (ops count + gas spent)

Data source

  • Contract: ERC-4337 EntryPoint v0.6
  • Address: 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789
  • Chain: Ethereum Mainnet
  • Event: UserOperationEvent
  • Method: 100% on-chain via getLogs (no external APIs)
  • Start: March 1, 2023 (EntryPoint v0.6 deployment, block 16947124; timestamp 1677628800)

Methodology

For each day, we:

  1. Fetch all UserOperationEvent logs from the EntryPoint contract.
  2. Filter operations where paymaster != address(0) (sponsored ops).
  3. Sum actualGasCost for these sponsored operations.
  4. Report as dailyFees and dailyRevenue (they are equal).
  5. Build per-paymaster breakdown in metadata.

Non-sponsored operations (where users pay their own gas via their EntryPoint deposit) are counted in totalUserOps but not included in fees calculation.

Why this matters

While there are explorers for ERC-4337 (JiffyScan, etc.), there is currently no global "who pays the gas" view in DeFi analytics. This adapter creates a new dataset that shows:

  1. Adoption metrics: What percentage of UserOps are gasless? (Currently ~7% on mainnet)
  2. Cost tracking: How much gas are paymaster providers spending daily? (~0.2 ETH/day)
  3. Market analysis: Which paymasters dominate? (One paymaster controls 98%+ market share)

This is particularly valuable for wallet teams, L2 ecosystems, and infrastructure providers competing in the Account Abstraction space.

Technical highlights

  • BigInt-safe: Custom formatWeiToETH() function avoids Number overflow for large values.
  • Block-range limited: Supports getFromBlock()/getToBlock() plus fromBlock/toBlock (and legacy startBlock/endBlock) to prevent unbounded historical queries.
  • Exact start date: March 1, 2023 (EntryPoint v0.6 deployment block 16947124).
  • Tested: Unit tests + integration test validated against a full day of Ethereum data.

Example output (November 30, 2024)

{
  "dailyFees": { "ethereum:0x0000000000000000000000000000000000000000": "219586165041850404" },
  "dailyRevenue": { "ethereum:0x0000000000000000000000000000000000000000": "219586165041850404" },
  "meta": {
    "totalUserOps": 552,
    "sponsoredUserOps": 39,
    "nonSponsoredUserOps": 513,
    "sponsoredShare": 0.0707,
    "sponsoredGasWei": "219586165041850404",
    "sponsoredGasETH": "0.219586165041850404",
    "perPaymaster": {
      "0x00000000000000fb866daaa79352cc568a005d96": {
        "ops": 37,
        "gasWei": "215691860934065920",
        "gasETH": "0.215691860934065920"
      },
      "0x4fd9098af9ddcb41da48a1d78f91f1398965addc": {
        "ops": 2,
        "gasWei": "3894304107784484",
        "gasETH": "0.003894304107784484"
      }
    }
  }
}

Future extensions

  • Multi-chain: Add Base, Optimism, Arbitrum (same EntryPoint address)
  • EntryPoint v0.7: Support when it gains adoption
  • Paymaster registry: Map addresses to names

Checklist

  • Version 2 adapter format
  • Uses createBalances() and addGasToken()
  • Block range limits on getLogs
  • BigInt-safe calculations
  • Includes methodology in adapter meta
  • Start date matches deployment
  • Unit tests passing
  • Validated with real data

This adapter tracks gas fees sponsored by paymasters in the ERC-4337
Account Abstraction standard on Ethereum mainnet.

Data source: UserOperationEvent logs from EntryPoint v0.6 contract
(0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789)

Methodology:
- Scans all UserOperationEvent emissions for sponsored operations
- Filters operations where paymaster != address(0)
- Aggregates actualGasCost as dailyFees and dailyRevenue
- Provides per-paymaster breakdown in metadata
@llamabutler
Copy link

The ethereum-paymasters.ts adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees ethereum-paymasters.ts

🦙 Running ETHEREUM-PAYMASTERS.TS adapter 🦙
---------------------------------------------------
Start Date:	Tue, 02 Dec 2025 03:31:03 GMT
End Date:	Wed, 03 Dec 2025 03:31:03 GMT
---------------------------------------------------

------ ERROR ------
Error: value is NaN | ethereum-meta: [object Object]
    at getChainResult (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:273:56)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
value is NaN | ethereum-meta: [object Object]

@noateden noateden self-assigned this Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants