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:
- User creates a UserOperation (intent to transact)
- A Bundler packages multiple UserOperations into a single transaction
- The Paymaster validates it can cover gas (or will be reimbursed)
- The transaction executes onchain
- 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
| Model | How It Works | Example |
|---|---|---|
| Token sponsorship | User pays gas in ERC-20 tokens instead of ETH | Coinbase Smart Wallet |
| Free tier | DApp sponsors gas to onboard users | DApps covering first N transactions |
| Subscription | Flat monthly fee for unlimited gas | Wallet-as-a-Service providers |
| Sponsored by protocol | Protocol treasury covers gas to drive adoption | Base 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:
- Create a wallet
- Find a way to buy ETH (requires KYC, exchange account)
- Transfer ETH to their wallet
- 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.