Rules
Rules are stored in the wallet contract and checked inside every agent call. The owner's own calls skip them and pay no fee.
Daily caps
Each tracked token has a cap: the most that may leave the wallet through the agent over the last 24 hours. The wallet reads the balance of every tracked token before the call and after it, and charges every decrease to that token's window. Over the cap, the whole call reverts with DailyCap(token, used, cap).
Measuring the balance catches what a decoder cannot: a router that pulls more than the swap needs, a second token taken through an approval, ETH sent as value. Incoming tokens are never credited back, so a swap that returns tokens does not reopen the cap.
The window is kept in 25 hourly buckets, so a spend leaves it 24 to 25 hours later: no 24-hour interval ever sees more than the cap. ETH and USDG are always tracked; a wallet tracks up to 10 tokens, any of the 47 stock tokens included. The 0.01 USDG fee counts against the USDG cap.
Allowlist and modes
| Mode | Targets | Token recipients | Threat list |
|---|---|---|---|
| Strict (default) | Only allowlisted contracts, optionally limited to some function selectors | Only allowlisted recipients | Not consulted: your allowlist decides |
| Open | Any contract not on the threat list | Any address not on the threat list | Read inside execute() |
A plain ETH send goes to an allowlisted recipient. In Open mode a call that hits the threat list is not executed: the wallet records the hit on-chain (event CallBlocked), still takes the fee, and returns. A batch with a hit reverts with Blocked(target, entryId).
Approvals
approveandincreaseAllowanceonly to an allowlisted contract, in both modes.- Never
type(uint256).max:UnlimitedApproval. The amount must fit in what is left of today's cap. setApprovalForAllis always refused. NFTs in the wallet never move through the agent.- Permit2 is a target only when you allowlist it; its
approvefollows the same rules. - Tokens you did not add can sit in the wallet; the agent cannot transfer or approve them (
UntrackedToken).
No signatures
The wallet has no ERC-1271: isValidSignature always fails. No Permit, Permit2 or EIP-3009 signature can ever move its funds. The SDK refuses to sign typed data with the agent key at all.
Hot float for x402
x402 payments are EIP-3009 signatures, which a contract wallet cannot make. A policy line keeps a small USDG float on the agent key instead: "top up the agent key to X USDG, at most Y per day". Anyone can call topUpFloat(); it sends what is missing, within its own 24-hour window, and nothing while the wallet is frozen. Your exposure is the day's caps plus the float.
Freeze, rotate, withdraw
freeze() blocks the agent key at once (Frozen). setAgent() rotates the key. withdraw(token, to, amount) moves anything out, frozen or not. Only the owner can call them.
Fees
Each agent transaction pays 0.01 USDG from the wallet: half to the sentinel pot of the threat registry, half to the burn vault. Owner transactions are free. Owners holding the $BULWARK holder threshold pay no fee once the token is wired in.