What is a Paymaster?
A paymaster is a smart contract in the ERC-4337 account abstraction system that sponsors gas fees on behalf of smart account users or agents — enabling gasless transactions by paying for gas with alternative tokens or having a third party cover the cost entirely.
WHY IT MATTERS
Gas fees are a UX nightmare. Before you can make a USDC payment, you need ETH in your wallet to pay gas. For agents, this means funding wallets with two currencies — the payment token and the gas token. Paymasters eliminate this requirement.
Paymasters can sponsor gas entirely (the application pays), accept gas payment in alternative tokens (pay gas in USDC instead of ETH), or implement conditional sponsorship (free for small transactions, paid for large ones). This flexibility makes agent wallets much simpler to manage.
For agent deployment, paymasters are practically essential. Without them, every agent wallet needs an ETH balance for gas, which must be monitored and replenished. With paymasters, agents only need the tokens they're transacting in.
HOW POLICYLAYER USES THIS
PolicyLayer integrates with paymasters to enforce spending policies while providing gas sponsorship. The paymaster verifies the transaction passes PolicyLayer's checks before sponsoring gas — combining gas abstraction with policy enforcement in a single flow.