ana
fi
ANA.FI/BLOG/TREASURY

Hot wallet top-ups and sweeps: thresholds, limits and approvals

Updated · 4 min read

On this page

A top-up refills a hot wallet when its balance falls below a minimum. A sweep moves the surplus back when the balance rises above a maximum. Together they keep each hot wallet inside a range, so withdrawals keep flowing and only a small, known amount is exposed online at any moment.

Approach Who can move funds Where the limits live Trade-off
Manual signing Your signers, each time In a runbook Every transfer waits for signers, nights and weekends included
A script with a hot key Whoever controls the script In the script itself One key or one bad deploy can move everything
A wallet platform’s automation The platform, under your policies In the platform Covers the wallets held on that platform
Rules signed on your own wallets An engine that can sign only what the rules allow In a rule file your signers approved Automation stops if the engine is offline; funds stay where they are

How do you set the minimum and the maximum?

  • The minimum covers the withdrawals you expect while a refill is on its way.
  • The maximum is the most you accept to have online in one wallet. What a hot wallet holds is what is exposed if it is compromised.

Do not guess either number. Replay your own history against the rule and read off two things: the largest balance each hot wallet would have reached, and how often it would have been refilled.

Which limits does a refill rule need?

  • A cap per transfer, so one refill cannot be large.
  • A rolling cap per hour, day or week, so many small refills cannot add up.
  • A destination allowlist, so funds move only between your own wallets.
  • A time window, if refills should run only in certain hours.
  • An approval step for transfers above a size you choose.
  • A freeze that stops every outflow in one step.

The limits should sit outside the code that moves the money. If the team that writes the automation can also change its limits, a single bad deploy can overpay.

What should happen past a limit?

The next transfer is refused, the decision is recorded, and someone is told. From there people take over. In a withdrawal spike this means refills keep the hot wallet in its range until the daily cap is reached and then stop, and your signers move funds by hand past that point.

What about depegs and cold storage?

A depeg guard moves a wallet out of a stablecoin that slips from its peg, once, and counts the swap toward the daily cap. Cold storage stays outside automation: rules may send surplus up to cold and never take it out, so only your signers move money out of the cold wallet.

How Anafi Treasury does it

Anafi Treasury runs top-ups and sweeps on rules your signers approve once.

  • Your wallets, as they are. Anafi is technology agnostic. On a Safe, signers enable one module and the Safe keeps its owners and threshold. MPC wallets, ERC-4337 and EIP-7702 accounts work too, and a plain-key hot wallet connects through a Permit2 approval.
  • Keys. Your signers keep every key. The engine holds only its own signing key, inside an Intel TDX enclave, and the module accepts a transfer only with a valid engine signature that has not expired or been used before.
  • Limits. There are 15 rule types, including all six above and a depeg guard. Past a cap the engine refuses to sign, records the decision and notifies you by email. Depending on the account type, some caps are also enforced on chain.
  • Testing. Three stages: a replay of 30 to 365 days of your own activity, with shocks such as a withdrawal spike, a depeg or a chain halt; a dry run that watches your real wallets and records what the rules would have done; then live.
  • Stopping. If Anafi goes offline, automation stops and funds stay in your Safe. The engine signs a heartbeat that records the block it has processed to, so anyone can see if it has stopped. To leave, one multisig transaction per Safe removes the module.

It works beside an existing policy engine: the policy engine approves or blocks a transfer, and Anafi decides when a transfer is needed.

Six questions to ask any vendor

  1. Who holds the keys, and who can sign a transfer?
  2. Where do the limits live, and who can change them?
  3. What happens to the next transfer when a cap is reached?
  4. Can we replay the rules against our own history before going live?
  5. What proves that no transfer was skipped or sent twice?
  6. If we leave, what has to move?

More guides

USE CASES

NEXT STEP

Start in the sandbox.
Nothing real moves.

Or write to hi@ana.fi.

Message Us

We will be in touch with you within one business day.

By sending you agree to our Privacy Policy.