Paymaster
Sponsor gas for your users with ERC-4337 paymasters, or let them pay gas in stablecoins, on Tenzro Network 1.
A paymaster pays the gas for someone else's transaction. On Tenzro Network 1, paymasters follow ERC-4337 v0.8 account abstraction. Use one to make your app gasless for its users, to sponsor only certain calls or callers, or to let accounts pay gas in a stablecoin instead of TNZO.
How sponsorship works
Smart accounts on Tenzro submit UserOperations to the EntryPoint rather than plain transactions. A UserOperation can name a paymaster:
- The account builds the operation and asks the paymaster to sponsor it. The paymaster returns
paymasterData, usually a signature over the operation plus a validity window. - The operation is sent to the network with
eth_sendUserOperation. - During validation, the EntryPoint calls the paymaster, which accepts or rejects the operation under its own rules.
- If it accepts, the EntryPoint charges the gas to the paymaster's deposit instead of the account. After execution, the paymaster's post-operation hook can settle anything it needs to, such as recovering the fee in a stablecoin.
The account still signs its own operation with its own hardware-rooted key. A paymaster pays for gas; it can never authorise an action on the account's behalf.
The v0.8 fields
In the packed ERC-4337 v0.8 format, sponsorship is carried in four fields:
| Field | Meaning |
|---|---|
paymaster | Address of the paymaster contract |
paymasterVerificationGasLimit | Gas the paymaster may use during validation |
paymasterPostOpGasLimit | Gas the paymaster may use in its post-operation hook |
paymasterData | Paymaster-specific data, such as its signature and validity window |
A sponsored operation, as submitted:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendUserOperation",
"params": [
{
"sender": "0x<smart-account>",
"nonce": "0x0",
"callData": "0x<call>",
"callGasLimit": "0x30d40",
"verificationGasLimit": "0x186a0",
"preVerificationGas": "0xc350",
"maxFeePerGas": "0x<fee>",
"maxPriorityFeePerGas": "0x<tip>",
"paymaster": "0x<paymaster>",
"paymasterVerificationGasLimit": "0x186a0",
"paymasterPostOpGasLimit": "0xc350",
"paymasterData": "0x<paymaster-signature-and-window>",
"signature": "0x<account-signature>"
},
"0x<entrypoint>"
]
}Related methods, all on https://rpc.tenzro.xyz:
| Method | Class | Purpose |
|---|---|---|
eth_supportedEntryPoints | Open | EntryPoint addresses the node accepts |
eth_estimateUserOperationGas | Open | Gas limits for an operation, including the paymaster's |
eth_sendUserOperation | Owner (signed by the account) | Submit an operation |
eth_getUserOperationReceipt | Open | Result of an operation |
Paying gas in stablecoins
Tenzro Network 1 lets accounts pay gas in stablecoins. There are two ways to use it:
- Directly. An account that holds a supported stablecoin pays the fee in it, and the network settles the fee in TNZO underneath. No paymaster is needed. See Stablecoin payments.
- Through a token paymaster. The paymaster pays the fee in TNZO from its deposit and, in its post-operation hook, collects the equivalent in a stablecoin from the account. This lets you set your own pricing and rules, for example sponsoring a user's first operations for free and charging in a stablecoin after that.
Either way, fees are denominated and settled in TNZO. The account never has to acquire TNZO to act.
Common sponsorship policies
A paymaster decides what to sponsor in its validation logic. Typical rules:
- only operations from accounts registered with your app;
- only calls to your own contracts, or to specific functions;
- a per-account or per-day gas budget;
- a validity window in
paymasterData, so a sponsorship signature cannot be reused later.
New passkey accounts benefit directly: the first operation of a passkey account, which registers its passkey as the account's validator, can be sponsored so the user starts with no balance at all. See Console and passkey wallet.
Fees and burn
A sponsored operation pays the same fees as any other: an EIP-1559-style base fee, burned with a treasury split, plus a priority tip. On top of that, the paymaster fee is burned in full. The paymaster burn rate is fixed at 100% and cannot be redirected, so sponsored gas never becomes a way to route fees around the burn. Current burn settings are visible with:
tenzro adaptive-burn configSee Token economics for the base fee, burn and treasury split, and Smart-account policies for the validator modules that sign UserOperations.