Skip to main content

Overview

Once your client, aka the end-user, deposits into an intermediary vault account, most customers will want to perform a sweeping operation. This operation consolidates all deposited funds from the intermediary vault accounts into a single treasury management vault account for various business purposes. Sweeping funds involves moving assets from address A to address B. It is important to note that this is an on-chain operation and includes transaction fee payments.

Trigger the Sweeping Operation

The trigger for the sweeping operation varies from customer to customer, depending on specific strategies, business needs, and regulatory requirements. For instance, some customers may choose to sweep the funds immediately after the deposit is completed. In contrast, others may trigger the sweeping mechanism only after a certain amount of deposits (either by total balance or number of deposits). Since sweeping is an on-chain operation that incurs transaction fees, some customers opt to execute the sweeping operation only when the current network fee is below a predefined acceptable threshold. Fireblocks enables customers to monitor current network fees/gas prices using the GET /estimate_network_fee endpoint. There is no right or wrong approach; customers should determine what works best for their business needs.

Sweep timing strategies

You can sweep deposits from deposit accounts immediately after each deposit, or batch them over time. As deposits accumulate or network fees change, you can use logic-based triggers based on time, balance, or fee conditions. For example, to minimize fees, you may choose to sweep when the network is less congested or when gas prices fall below a defined threshold. If you want to sweep promptly, sweeping can occur immediately after a deposit or once Gas Station fueling is complete.

Gas Station

The Gas Station feature allows you to designate a vault account in your workspace as a Gas Station tank and keep it funded with the relevant base assets. When a deposit account receives tokens, the Gas Station fuels (transfers) base assets from the tank to the deposit account to cover fees and enable sweeping. You can configure this behavior, including when the transfer occurs and how much is transferred.

Automate Sweeping

You can automate sweeping in two ways: create sweep transactions through the API, or define automation rules in the Console that create them for you (see Sweep with automation rules below). To create sweeping transactions through the API, use the POST /transactions endpoint. Identify the vault account you want to sweep from, then send the sweep transaction request. Repeat this for every vault account you want to sweep. Automating sweeping transactions involves not only creating the transactions in a fully automated manner but also automating the entire signing process. We recommend using an API Co-Signer to automatically sweep funds according to your organization’s logic and fee prices. When sweeping funds, you also pay a fee in the base asset of the deposited token’s blockchain. To ensure you always have enough funds for the sweeping transaction, we introduced the Fireblocks Gas Station feature, which automatically identifies incoming transactions to your predefined vault accounts and deposits enough of the base asset to cover fees for sweeping funds to your main treasury.

Sweep with automation rules

Automation rules let you sweep deposits without writing or running your own code. A rule has a trigger (when), conditions, and an action (then). When the trigger fires and the conditions are met, Fireblocks creates the sweep transaction. To cover many deposit vault accounts with one rule, target a tag in the rule’s trigger instead of listing each vault account. The rule then applies to every vault account that carries the tag. Vault accounts you tag later are covered on their next transaction, so you don’t need to edit the rule as you open new deposit accounts.

Example: sweep deposits into an omnibus vault account

  1. Create a Protected Tag (for example, Clients) and attach it to each deposit vault account. Each attach action requires quorum approval.
  2. Create an automation rule with a transaction trigger. Set the trigger’s Destination to the Clients tag. The rule runs whenever a deposit reaches any tagged vault account.
  3. In the Then step, set the source to Inherited Account. This moves funds out of the vault account that triggered the rule, not a fixed account.
  4. Set the destination to your omnibus vault account.
You can combine tags, Wallet Pools, and individual vault accounts in the same trigger selection. For step-by-step Console instructions, see Use tags in automation rules.

Supported tags and limitations

  • Protected Tags and Wallet Pools only. Unprotected vault tags can’t be used in automation rules. A tag defines which vault accounts a rule acts on, so changing that group requires the quorum approval that only Protected Tags provide.
  • One sweep per deposit. A rule runs when a deposit arrives and sweeps from that vault account. Rules don’t batch deposits, run on a schedule, or check network fees. For those strategies, create sweep transactions through the API.
  • Tags select the trigger, not the action. The action still resolves to one vault account, which is what Inherited Account is for.
The swept vault account still pays the network fee in the base asset. To keep deposit accounts funded for sweeping, use Gas Station or Universal Gasless on EVM chains (see Sweeping Tokens). For more about automation rules, see About Automation, Protected Tags, and Wallet Pools.

Reconciliation Processes

Because memo-based wallets function as omnibus wallets, funds can be reconciled to withdrawal wallets or to cold and treasury management workspaces as needed. UTXO-based wallets also operate as omnibus wallets, allowing multiple deposited UTXOs to be reconciled to target destinations. However, transaction size limits and MPC restrictions apply:
  • For Bitcoin-based wallets, a single transaction is limited to 250 UTXOs.
  • For Cardano transactions, the overall size is capped at 16 KB.
To determine the maximum spendable amount before initiating a sweep, call the Get max spendable amount in a transaction endpoint. UTXO-based chains support multiple destinations, allowing funds to be moved to different targets (for example, cold storage and withdrawal wallets) within a single transaction. For account-based chains, sweeping is done per deposit wallet.

Fees

Because sweeping is normally less time-sensitive, transaction fees can be set lower than the prevailing network fees required for immediate confirmation.

Sweeping Tokens

When sweeping tokens, the wallet should have enough native asset balance to cover the transaction fees. However, some chains support models where another account can pay the fee:
  • EVM chains: Universal Gasless, where a designated relay sponsors gas fees on behalf of your vault accounts. It supports sweeping all Ethereum-based tokens (ERC-20, ERC-721, and ERC-1155), but does not relay native ETH transfers. See Fueling for the available relay options and the Universal Gasless setup guide to configure it.
  • Solana: Fee payer model