Skip to main content

What is gas wallet monitoring?

Gas wallet monitoring is the job of watching the wallets that pay network fees (gas) and refilling each one before it runs out; teams also call these network-fee wallets.

Banks, stablecoin issuers and payment platforms that send transactions of their own keep a gas wallet on every chain they use, and an empty one stops payouts, mints or settlements on that chain until someone notices and refills it.

Goldsky can watch every gas wallet’s balance, warn when one falls below the floor you set and run the top-up, while your custody provider’s policy decides whether each refill is signed.

You can monitor and top up gas wallets two ways: stream balances with Turbo Pipelines and start a Compose top-up when one drops below its floor, or run a scheduled Compose task that reads balances from Feeds.

Who uses gas wallet monitoring?

Sponsor banks, crypto-native banks and stablecoin payment rails that send their own transactions on several chains; an app that pays its users’ fees through a paymaster tracks that cost as sponsored gas spend instead.

How gas wallet monitoring and top-ups work

The diagram follows one gas wallet from the fees that drain it to the top-up that refills it, and shows who does each step. Your setup may differ.

Goldsky, step 2: TurboWatch every gas walletBalance read after each transaction
Blockchains, step 1: Fees drain a walletEach transaction it sends spends gas
Goldsky, step 3: TurboWarn before it runs dryBelow your floor, a webhook fires
Your business, step 5: CustodianSign under policyYour custodian approves the transfer
Goldsky, step 4: ComposeStart the top-upThe webhook starts your task
Goldsky, step 6: ComposeSend the gasFrom treasury to the wallet
Blockchains, step 7: Wallet refilledReady before the next transaction
  • Goldsky
  • Your provider

Ways to monitor and top up gas wallets

The pipeline reads a wallet’s balance whenever transfers touch it and warns the moment it crosses its floor; the scheduled task checks every wallet on a timer, with no pipeline or database to run.

Best for
Many gas wallets, warned the moment one runs low
Products
TurboCompose
What you run
The destination: your database, queue or bucket, or a Postgres database Goldsky hosts
What you write
Pipeline YAML and SQL; TypeScript transforms when needed
Where your data lives
In your own database or systems
How results reach you
Pushed to you
Best for
A few dozen wallets, checked on a timer
Products
ComposeFeeds
What you run
Nothing on Goldsky cloud; single-tenant, VPC and on-premises deployments are enterprise options
What you write
TypeScript tasks
Where your data lives
Hosted by Goldsky
How results reach you
Acts onchain or calls your systems

Option 1: Monitor and top up gas wallets by streaming balances

A pipeline keeps each gas wallet’s balance current in your database and sends a webhook when one falls below its floor. The webhook starts a task that sends gas from treasury, signed under your custody policy.

When to stream gas wallet balances

You run many gas wallets across chains and want a warning the moment one crosses its floor, with every balance kept in your own database.

What you’ll need

  • Goldsky Turbo
  • Goldsky Compose
  • A custody provider with an approval policy that can sign EIP-712 typed data and EIP-7702 authorizations, reached through a signing endpoint you host
  • A treasury wallet holding gas on each chain
  • A database for the watch list and current balances
  • A minimum balance (floor) for your gas wallets, set by your operations team
  1. Spend gas on every transaction

    Every transaction a wallet sends pays a network fee (gas) in the chain’s native token, so a wallet that sends often slowly empties.

    Payouts, mints and settlements all pay their fee from the wallet that sends them. When that wallet can’t cover the fee, the transaction isn’t sent and everything queued behind it waits.

  2. Watch every gas wallet’s balance

    Handled by Goldsky Turbo

    You can only refill a wallet in time if you know its balance as it changes.

    Keep the list of gas wallets in one place and read each one’s balance from the chain, not by adding up transfers, so fees and other changes are counted. Gas paid on a transaction that moves no value lowers the balance without a transfer, so add a periodic recheck for wallets that mostly send contract calls.

    With Goldsky, a Turbo Pipelines dynamic table holds the gas wallet addresses, and the pipeline calls _gs_evm_get_balances to read each watched wallet’s exact balance from an RPC node whenever a native transfer touches it. Rows land in your database keyed on address, one current balance per wallet.

    Read native balances in SQL (opens in a new tab)
  3. Warn when a wallet drops below its floor

    Handled by Goldsky Turbo

    A floor gives you time to refill before the wallet can’t pay its next fee.

    Set the floor from how much gas the wallet spends between checks, with room to spare, and send the warning to something that acts on it. A warning that only reaches a channel nobody watches at night is a stalled payout by morning.

    In the same pipeline, a SQL transform can keep only balances below the floor written into its WHERE clause and send them to a webhook sink, one row per request. Delivery is at least once, so the receiver treats a repeat as the same warning.

    Set up the webhook sink (opens in a new tab)
  4. Start the top-up

    Handled by Goldsky Compose

    The warning only helps if it turns into a refill without someone starting it by hand.

    The top-up starts from the warning, re-reads the balance and decides how much to send. Two warnings for the same wallet must not send two refills, so the top-up checks what it has already sent.

    Goldsky Compose can expose the top-up task at an HTTP trigger with token authentication, and the webhook sink calls it with the low-balance row. The task can read the wallet’s balance again with getBalance before it sends anything.

    Start a task from an HTTP trigger (opens in a new tab)
  5. Approve the top-up under your policy

    Moving funds out of treasury takes a signature, and most firms keep treasury keys with a custody provider whose rules say what can be approved.

    Set the rules before the first top-up: which wallets may receive gas, the most each refill can send and who approves anything larger. Your signing endpoint enforces them by reading the recipient and amount from each refill’s call data; a refill path with no limits is a way to drain treasury, one small transfer at a time.

  6. Send gas from treasury

    Handled by Goldsky Compose

    The refill is a transfer of the chain’s native token from your treasury wallet to the gas wallet.

    The transfer has to be sent, wait for confirmations and be resent if a reorg drops it, without paying the same wallet twice. A refill sent from a hot key in application settings bypasses your custody policy.

    Compose can send the transfer through a webhook wallet, which sends the signing endpoint you host a UserOperation (the transaction format smart-account wallets use) to sign, plus a one-time EIP-7702 authorization the first time it sends on a chain, and submits it once signed. Every call the task makes is logged, so each refill can be traced back to the warning that started it.

    Learn about webhook wallets (opens in a new tab)
  7. Confirm the wallet is refilled

    The top-up is done when the gas lands in the wallet and the next transaction can pay its fee.

    Check the new balance once the transfer has enough blocks on top of it. A refill that was dropped or undone leaves the wallet as empty as before, and the floor check has to catch it again.

What to know about streaming gas wallet balances

  • Goldsky runs the pipeline and the top-up task; you own the database, the floors and the signing policy.
  • The pipeline reads a balance when a native-token transfer touches the wallet, so gas spent on transactions that move no value shows up at the next transfer.
  • The floor check looks at one row at a time, so a rule such as “no top-up in the last day” belongs in the task.
  • The webhook fires when the low balance is seen, before the block is final, so the task checks the balance again before sending.

Option 2: Monitor and top up gas wallets with a scheduled task

A task that you write and Goldsky hosts runs on a timer, reads each gas wallet’s balance from a wallet API and sends gas to any wallet below its floor. Every check and transfer is logged.

When to top up gas wallets on a schedule

You have a few dozen gas wallets on chains the wallet API covers, and a check on a short timer leaves enough room before any of them runs dry.

What you’ll need

  • Goldsky Compose
  • Goldsky Feeds
  • A custody provider with an approval policy that can sign EIP-712 typed data and EIP-7702 authorizations, reached through a signing endpoint you host
  • A treasury wallet holding gas on each chain
  • A list of gas wallets and their floors, kept in the task’s settings or your own store
  1. Spend gas on every transaction

    Every transaction a wallet sends pays a network fee (gas) in the chain’s native token, so a wallet that sends often slowly empties.

    Payouts, mints and settlements all pay their fee from the wallet that sends them. When that wallet can’t cover the fee, the transaction isn’t sent and everything queued behind it waits.

  2. Check balances on a schedule

    Handled by Goldsky Compose

    A regular check catches a wallet running low before its next transaction fails.

    Pick an interval shorter than the time your busiest wallet takes to spend its margin above the floor. A check that runs too rarely finds wallets already empty.

    Goldsky Compose runs the task on a cron trigger, with a five- or six-field expression that sets how often it checks.

    Schedule a task with cron (opens in a new tab)
  3. Read each gas wallet’s balance

    Handled by Goldsky Feeds

    The check compares each wallet’s current native-token balance with its floor.

    Read every gas wallet on every chain it uses, including the native token, which pays the fee. A lookup that leaves a chain out never warns about that chain’s wallet.

    The task can call the Feeds balances endpoint for each wallet and get its latest native and ERC-20 balances across chains in one response.

    Read the balances endpoint reference (opens in a new tab)
  4. Decide which wallets need gas

    Handled by Goldsky Compose

    Only wallets below their floor get a refill, and only once.

    Compare each balance with its floor and work out the amount that brings it back to target. Record each decision, so a retry of the same run doesn’t send a second refill.

    With Goldsky, the comparison is code in the Compose task, and the task’s logger records each wallet it checked and what it decided, searchable from the run.

    How Compose logs each run (opens in a new tab)
  5. Approve the top-up under your policy

    Moving funds out of treasury takes a signature, and most firms keep treasury keys with a custody provider whose rules say what can be approved.

    Set the rules before the first top-up: which wallets may receive gas, the most each refill can send and who approves anything larger. Your signing endpoint enforces them by reading the recipient and amount from each refill’s call data; a refill path with no limits is a way to drain treasury, one small transfer at a time.

  6. Send gas from treasury

    Handled by Goldsky Compose

    The refill is a transfer of the chain’s native token from your treasury wallet to the gas wallet.

    Each transfer waits for confirmations and is resent if a reorg drops it. If the task restarts halfway, wallets it already refilled must not be paid again.

    Compose sends each transfer through a webhook wallet, which has your signing endpoint sign it as a UserOperation (the transaction format smart-account wallets use), plus a one-time EIP-7702 authorization on a new chain. A context call that already finished returns its saved result on a retry, so a restarted run doesn’t send the same refill twice.

    Learn about webhook wallets (opens in a new tab)
  7. Confirm the wallet is refilled

    The top-up is done when the gas lands in the wallet and the next transaction can pay its fee.

    Check the new balance once the transfer has enough blocks on top of it. A refill that was dropped or undone leaves the wallet as empty as before, and the floor check has to catch it again.

What to know about topping up gas wallets on a schedule

  • The task pulls on a timer, so a wallet that drains faster than the schedule can run dry between checks.
  • There’s no pipeline or database to run; the code is one TypeScript task.
  • Balances come from the wallet API, so wallets on chains it doesn’t cover need another route.
  • Rules about time, such as “no more than one refill an hour”, sit in the task code next to the check.

What you control

Your providers
  • Custodian

Security and deployment

  • SOC 2 Type IIIndependently audited security controls.
  • Dedicated infrastructureSingle-tenant options for production workloads.
  • Data residencyCloud, on-premises or co-located.

Monitor and top up gas wallets with Goldsky

We’ll map it to your systems and show you what Goldsky runs, so your team builds the product, not the pipelines underneath it.

© Endless Sky Inc. All rights reserved.

PrivacyTermsSecurity

System status