Lab: free tools · size first · stock scanner · crypto scanner · journal

Market Structure

Paymasters (ERC-4337)

A paymaster is a smart contract in Ethereum's ERC-4337 account abstraction system that pays a transaction's gas so the user doesn't have to.

Under ERC-4337, the person using a smart wallet and the person paying for its gas don't have to be the same. A dapp can sponsor its users' fees, or a paymaster can take USDC from the user and pay ETH to the network. For users, it mostly removes the need to hold ETH just to start using an app.

Where it sits in the flow

ERC-4337 didn't change Ethereum's consensus rules at all. A smart wallet signs what the standard calls a UserOperation and sends it to a separate mempool. Bundlers collect those and submit a batch of them in one call to a single shared contract, the EntryPoint (more on that in how bundlers work). When a UserOperation names a paymaster, the EntryPoint first checks that the paymaster has enough ETH on deposit, then asks the paymaster contract whether it will pay. If validation hands back a context, the EntryPoint calls the paymaster again after the operation has run.

If the operation is included and then reverts, the paymaster still pays. The spec says it plainly: on a revert the paymaster "still has to pay for gas." Tight rules on whom the paymaster will sponsor are what keep the deposit from being an open tab.

Deposit, stake and getting banned

Paymasters must deposit funds in the EntryPoint contract, and that deposit is what actually pays the gas. Stake is something else. It's locked, with a waiting period before it can be pulled out, and it is never slashed. Its job is protection against Sybil and denial-of-service abuse, and the bundlers enforce that through their own reputation rules, off-chain. A paymaster whose approvals keep turning out invalid wastes their work, and bundlers can throttle or ban it. Paymasters can also be abused if their validation rules are loose, and if I were the one funding that deposit, that's the side I'd lose sleep over.

Paying gas with a token

The token version charges up front. The spec describes charging the user the most the transaction could possibly cost, then refunding the excess afterwards. You pay in an ERC-20 token, the paymaster has already paid the network in ETH, and somebody is setting the rate between the two. Expect their cut to be in that rate.

What it means if you use one

I can't tell you which paymaster services will still be funded a year from now, and neither can anyone selling one. A sponsor can stop whenever it wants. If an app's whole pitch is "no gas," find out what happens when the sponsorship ends. More of the standard is on the ERC-4337 account abstraction page. Session keys have their own page.