ana
fi
ANA.FI/BLOG/PAYMENTS

How to automate a stablecoin wallet: triggers, actions and limits

Updated · 6 min read

On this page

You automate a stablecoin wallet with rules you sign once. Each has three parts. The trigger says when: a date, an incoming transfer, a balance, a price or a biller’s pull. The action says what: a payment, a bank payout, a swap or a refill. The limits, checked before every payment, say what it can never do.

Trigger Fires when Typical use
Time A date arrives, once or on repeat A standing order: rent, savings, a monthly transfer to family
Incoming transfer Funds arrive, above a minimum or from a named sender Split a salary, set a share aside for tax, forward part of it to a bank account
Balance A wallet falls below or rises above a level Refill a spending wallet, move a surplus to savings
Price A token crosses a price Buy below a level, take profit above one
A biller’s pull A biller you authorized requests a payment Utilities and other bills whose amount changes

What can a rule do?

Four actions cover most needs:

  • Send on chain. Pay one address, or several in one batch, all or nothing.
  • Bank transfer. Pay a bank account in the payee’s currency. A licensed partner converts the stablecoins and pays out over the payee’s local rail, such as ACH or SEPA, with a payment reference.
  • Swap. Trade one token for another, with a maximum slippage.
  • Refill. Top a wallet back up to a level, with a maximum per refill.

One trigger can run several actions. When a salary arrives, one rule can send 10% to savings, pay the rent to the landlord’s bank account and swap 100 USDC into ETH. You sign it once.

What makes a good trigger?

A trigger should fire exactly when you mean it to, and not on noise.

  • Set a minimum on incoming transfers. Without one, a dust transfer of a few cents can start a rule.
  • Name the sender when it matters. “When my employer pays me” is safer than “when anything arrives”.
  • Hold a price before acting. A price that touches a level for a second and falls back should not start a trade. Requiring it to stay there for a few minutes filters out spikes.
  • Add a pause after a run. A price that crosses a level back and forth could fire a rule ten times in an hour. A rule that cannot run again within a set time fires once.
  • Pick dates every month has. February and the 30-day months have no 31st. “The last day of the month” comes every month.

How much does a rule pay, and from where?

A fixed amount works with every trigger: pay 1,200 USDC on the 1st. A balance rule pays the gap to its level: refill to 500 USDC.

A percentage needs a base. With an incoming transfer, the base is that transfer: 10% of each incoming payment, in that payment’s token. With a date, a price or a balance level, the only base is the wallet’s balance, as in “sell 10% of my ETH above a price”. Say which base you mean, or use a fixed number.

The action is funded from the transfer that started it or from the wallet’s balance. That matters when the tokens differ. A bank payout is funded in USDC or USDT, so a rule triggered by incoming ETH needs a swap first, and the rule should say so.

Which limits does every rule need?

The trigger and the action describe what you want. The limits describe what can go wrong, and they matter more.

  • A payee list. Payments go only to the addresses or bank accounts named in the rule.
  • A cap per payment and a cap per period, so a wrong amount stays small.
  • A token list. The rule spends only the tokens you named.
  • Start and end dates. A rule for this year’s lease ends with the lease.
  • Maximum slippage on every swap.
  • A way out. You can change or revoke the rule from your wallet at any time.

A rule with a narrow trigger and wide limits is riskier than one with a broad trigger and tight limits. Set the limits first.

What lets a rule spend from your wallet at all is a separate choice: a token approval, Permit2, a session key or a mandate. Recurring stablecoin payments compared sets them side by side.

Who checks the limits, and who can see them?

A limit protects you only if it is checked before each payment is signed, by something the payee cannot change, and if your wallet rejects any payment signed another way. A limit kept in the payee’s own system is a promise.

Written in a public contract, a rule tells everyone when your salary lands, where it goes and what you keep. The payments are public on chain. The rule that produced them can stay private.

What do automation rules look like? Five examples

  1. On the 1st of every month at 09:00, pay 1,500 USD to my landlord’s bank account.
  2. When 2,000 USDC or more arrives from my employer, send 10% of it to my savings wallet.
  3. When my spending wallet falls below 200 USDC, refill it to 500 USDC, at most 500 USDC per refill.
  4. When my main wallet rises above 3,000 USDC, move everything above 2,000 USDC to my savings wallet.
  5. When my electricity company pulls a payment, pay it, up to 150 USDC a month, and notify me before each pull so I can cancel it.

How Anafi does it

The Anafi dApp runs rules from your own wallet. You sign a rule once. It is encrypted on your device, and your funds stay in your wallet until it runs. As of November 2026:

  • Triggers: a date, a balance or an incoming payment. A pull from a biller you authorized is in beta testing.
  • Actions: payments to the destinations you listed, on chain or to a bank account through licensed partners.
  • Limits: a cap on every payee. A rule cannot send to an unlisted destination, exceed your caps or frequency, or change after you sign it.
  • Before you sign: the engine checks the rule for mistakes in types, caps, allowlists, and dates some months lack.
  • Signing: every payment is checked against your rule by an engine inside an Intel TDX enclave before it is signed. Your wallet accepts a payment only with a valid engine signature that has not expired and has not been used before.
  • Change: edit or revoke a rule in one step.
  • Fee: the dApp charges 0.2% of each transaction, capped at USD 10. Partner and network fees are separate.

Wallets and neobanks offer the same rules inside their own app with Anafi Mandates: the app builds the rule from a form, and the user reads it as one sentence and signs one transaction from their own wallet. The app holds no key and no funds, so a breach of the app cannot move a user’s money, and the app’s admin account can pause its users’ operations at once. Companies run price rebalances and other treasury rules on Anafi Treasury.

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.