Skip to Content
GuidesRecipesSwapper policy

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:

    IntervalPeriod
    Daily24 hours
    Weekly7 days
    Monthly30 days
    Quarterly91 days
    Yearly365 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

  1. Open Policies and click Create policy.
  2. Name the policy and assign it to the vaults.
  3. Add the members that get swap permission.
  4. In Actions, click Add action and select Swap.
  5. Add the sell tokens and the buy tokens. Configure the allowances.
  6. 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.

Last updated on