Recipe: swapper policy
Goal — Delegate limited token swaps to trusted operators. The policy pins the exact assets and caps the spend per period.
Good for:
- Treasury rebalancing between approved assets.
- Recurring trades, run by a team member or a bot.
- Liquidity and runway management.
- Bounded de-risking during volatile markets.
Configuration
-
Sell tokens — the assets that members can swap out of the vault.
-
Buy tokens — the assets that members can acquire.
-
Allowances — a spend limit per refill period:
Interval Period Daily 24 hours Weekly 7 days Monthly 30 days Quarterly 91 days Yearly 365 days
An allowance is optional. Without an allowance, the policy permits unlimited swaps for that asset. Set one unless the sell list alone bounds your risk.
Example: stablecoin rebalancing
A protocol treasury delegates stablecoin rebalancing to an operations address:
- Sell: USDC, DAI, USDT — 5,000 each, monthly.
- Buy: USDC, DAI, USDT.
The operator can rotate between the three stablecoins, and nothing else. The worst case per month is bounded by the allowances.
Steps
- Open Policies and click Create policy.
- Name the policy and assign it to the vaults.
- Add the members that get swap permission.
- In Actions, click Add action and select Swap.
- Add the sell tokens and the buy tokens. Configure the allowances.
- Click Apply Changes and sign with the Safe.
Do it as code
Swaps run through CoW Protocol order signing. The SDK’s swap() action describes the
same swap the app configures — pinned sell and buy lists — and compiles into identical
permissions when the constellation is deployed. Start from the
Roles quickstart, and define the spend caps as
allowances.