Start
Gas tank
A gas tank is ETH set aside to pay one vault's owner commands, as their ERC-4337 paymaster. It pays nothing else, and only inside a limit per command and per UTC day that only the vault can raise. Mortise adds no ETH of its own and runs no signing server.
How it pays
0xDE7e58b3a3e28Cb52b89430a568E4f374DBF273A keeps the rules and creates one small tank contract per vault, at an address fixed by the vault. The tank's ETH sits in its EntryPoint deposit and pays only user operations whose sender is that vault. It needs no stake, and a bundler such as Alchemy's accepts it: the live runs on mainnet were paid this way. A vault in paymaster-only mode, which a timelock needs, pays through its tank.
The limits
| Rule | Who can change it |
|---|---|
| The most one operation may cost, counted at its maximum gas and fee | The vault, in a root operation; with a timelock, after its delay |
| The most the tank pays in one UTC day | The vault, in a root operation; with a timelock, after its delay |
| Its ETH leaves only to the vault, or to an address registered in the vault's timelock | Nobody; anyone may add ETH with a plain transfer |
Each operation names the UTC day it is paid in, and the tank refuses any other day, so the SDK and the app do not sign one in the last five minutes of a day. A stolen root key could spend at most what is left of one day's limit from the tank before someone freezes it. The vault's own funds are never touched.
Freeze and empty
The vault's pauser and its guardians can freeze the tank at any time from their own wallets, and so can anyone while the vault is paused or a recovery of its post-quantum lock is pending. Empty does the same and sends all of the tank's ETH back to the vault, without spending any of it. Only the vault lifts a freeze, and not while it is paused or a recovery is pending.
The way back
A frozen tank still pays, inside its limits, for the calls that lead out of the freeze: unfreezing, lifting the Gate's pause, moving the tank's ETH to the vault or a registered address, scheduling or cancelling on the timelock, cancelling a recovery and setting the guardians. So a vault that pays only through its tank is never left without a way to pay.
In the app
A vault built locked in the app gets its tank in its first operation: created, limited to 0.0005 ETH a command and 0.002 ETH a day, and filled with 0.0004 ETH from the vault. On any vault, the Gas tank panel creates one, fills it from your wallet, changes the limits, freezes it, empties it and unfreezes it. The app pays a locked vault's commands from the tank whenever the tank can pay, and from the vault's own ETH otherwise.
With the SDK
tankPaymaster checks what the tank would refuse before the operation is signed, so a refused operation never costs a signature. tankStatus reads the balance, limits, today's spending and the freeze; freezeTank and emptyTank send the pauser's or a guardian's transaction.
import { createTank, fillTank, tank, tankPaymaster, tankStatus } from "@mortiseagentvault/sdk";
await createTank(client, wallet, VAULT); // anyone may send it
await fillTank(client, wallet, VAULT, 400_000_000_000_000n); // 0.0004 ETH, a plain transfer
// In a root operation of the vault: 0.0005 ETH a command, 0.002 ETH a UTC day.
const limits = tank.setLimits(500_000_000_000_000n, 2_000_000_000_000_000n);
// Then pass tankPaymaster(client, VAULT) as the paymaster of later root operations.