Recipes
Batch your requests
Section titled “Batch your requests”The batch overhead is shared by its addresses: a repeat USDT sweep on Sepolia takes about 44,600 gas alone in its batch and 18,100 in a batch of 50. Send sweep requests in bursts, for example every few minutes for everything that arrived, rather than one by one with pauses. Sweeps of one hot wallet that are queued when a batch is prepared go together, up to the chain’s batch size.
Send authorizations freely
Section titled “Send authorizations freely”You do not need to track which addresses are delegated. Sign an authorization when you create a deposit address and send it with every sweep of that address: the service uses it only when the address needs it. Re-sign only if the address sends a transaction of its own, which changes its nonce.
Decide how much to sweep
Section titled “Decide how much to sweep”- Leave
amountout to sweep the whole balance; set it to sweep part of it. - Turn on
keep_one_unitfor permanent deposit addresses: your users’ next deposits become much cheaper, and with your fee above zero it does not raise what you pay. See Keeping one unit on the address. - Mind the decimals: amounts are integers in the token’s smallest units, and the same token can have different decimals on different chains.
Keep the gas wallet funded
Section titled “Keep the gas wallet funded”- Fund it with a plain transfer of the chain’s native coin. It is one address on every chain, but each chain has its own balance.
- Watch
availableinGET /v1/balance: the balance minus the fees due, which are kept in reserve. - Keep a few days of gas, and set a low balance alert at a day or two.
- If it runs dry, sweeps wait and retry; after five attempts they fail. Top up and send them again with new
external_ids.
Know when the service pays off
Section titled “Know when the service pays off”The savings come from repeat sweeps of permanent deposit addresses, which your users top up again and again. For one-time addresses, such as a new address per invoice, a first sweep costs about as much gas as the classic way: you still get no top-ups and no dust, but no gas saving. See First and repeat sweeps.
The native coin
Section titled “The native coin”- Do not delegate addresses only to sweep ETH or BNB: the first sweep costs more than a plain transfer.
- Sweep the native coin from addresses that are delegated anyway, in batches of 10 or more.
- If users send ETH or BNB to an address from exchanges with a fixed gas limit, do not delegate it: see Deposits from exchanges.
Several hot wallets
Section titled “Several hot wallets”Each hot wallet has its own delegate, and an address runs one delegate at a time. To move an address to another hot wallet, sign an authorization for that hot wallet’s delegate and send it with the next sweep to the new hot wallet. That sweep costs about as much as a first one; no revocation is needed.
Reconcile with your books
Section titled “Reconcile with your books”- Each sweep: the webhook, or
GET /v1/sweeps/{id}, hasswept_amount,tx_hash,gas_costandfee, enough to recompute the fee. - All sweeps:
GET /v1/sweepslists them newest first, filtered bystatus,chain_id,accountorhot_wallet;GET /v1/revocationsdoes the same for revocations. - The gas wallet:
GET /v1/ledgerlists every movement with its sign: gas, fees, withdrawals of fees and top-ups. - By day:
GET /v1/usage?days=30gives sweeps by outcome, revocations, gas and fees per UTC day and chain.
These lists are not in the SDKs yet: call them over HTTP. They are pages of up to 200 rows: pass next_cursor as
cursor for the next one. See the API overview.