Paymaster

Smart Contract Updated Jul 2026

What is a Paymaster?

A Paymaster is a smart contract in the ERC-4337 Account Abstraction stack that can sponsor gas fees for users’ transactions. Instead of users paying gas in ETH, a Paymaster can pay the gas and charge the user in any token — ERC-20 tokens, stablecoins, or even cover the cost entirely (gasless experience).

Paymasters are the reason Account Abstraction wallets can offer “gasless” transactions, where users never need to hold ETH to interact onchain.

How Paymasters Work

In the ERC-4337 flow:

  1. User creates a UserOperation (intent to transact)
  2. A Bundler packages multiple UserOperations into a single transaction
  3. The Paymaster validates it can cover gas (or will be reimbursed)
  4. The transaction executes onchain
  5. The Paymaster pays the gas to the bundler

User wants to send USDC → has no ETH → Paymaster pays gas in ETH → User is charged 0.01 USDC (or nothing — sponsored)

Paymaster Business Models

ModelHow It WorksExample
Token sponsorshipUser pays gas in ERC-20 tokens instead of ETHCoinbase Smart Wallet
Free tierDApp sponsors gas to onboard usersDApps covering first N transactions
SubscriptionFlat monthly fee for unlimited gasWallet-as-a-Service providers
Sponsored by protocolProtocol treasury covers gas to drive adoptionBase sponsoring transactions

Security Considerations

Paymasters introduce new attack vectors:

  • DDoS via Paymaster: An attacker could flood a free Paymaster with transactions, draining its ETH balance
  • Stuck transactions: If a Paymaster runs out of ETH mid-operation, transactions fail silently
  • Centralization risk: If one Paymaster dominates, it becomes a single point of failure for the user experience

To mitigate these, ERC-4337 includes rate-limiting and deposit/withdrawal mechanisms for Paymasters.

Why Paymasters Matter for Adoption

The biggest UX barrier in Web3 is gas. New users must:

  1. Create a wallet
  2. Find a way to buy ETH (requires KYC, exchange account)
  3. Transfer ETH to their wallet
  4. Pay gas for every transaction

Paymasters eliminate steps 2-4. Users can onboard with zero ETH and pay gas in the token they already hold — or pay nothing at all if the dApp sponsors them.

Frequently Asked Questions

Q: Who pays for gas in a Paymaster transaction? A: The Paymaster contract holds ETH and pays the bundler. The Paymaster is then reimbursed by the user (in ERC-20), the dApp (sponsorship), or absorbs the cost as a user acquisition expense.

Q: Can I run my own Paymaster? A: Yes. Anyone can deploy a Paymaster contract. You deposit ETH into it and define the logic for how/when to sponsor transactions.