Skip to main content
Spend Permissions let you designate a trusted spender that can spend tokens on behalf of your Smart Account. After you sign the permission, the spender can initiate token spending within the limits you define. You can define limits based on token, time period, and amount. Spend Permissions utilize the Spend Permission Manager contract deployed on Base and other networks. Some use cases this feature enables:
  • Subscription payments - Enable recurring payments for SaaS, content subscriptions, or membership fees
  • Agentic payments - Control your agent’s spending limits for autonomous operations
  • Algorithmic trading - Allow trading bots to execute trades within predefined limits
  • Automated payouts - Schedule regular distributions or reward payments
  • Allowance management - Give team members or family controlled access to funds
  • Dollar-cost averaging - Automate periodic investment purchases

How it works

There are two parties involved in a Spend Permission:
  • Account - The smart account that creates the Spend Permission and approves it onchain.
  • Spender - The entity that can spend tokens on behalf of the account within the limits defined by a Spend Permission. Can be a Smart Account or a regular account.

Anatomy of a spend permission

  • Spender - The entity that can spend tokens on behalf of the account.
  • Token - The token that the Spend Permission is for. Use "eth" or "usdc" as shortcuts (Base and Base Sepolia only), or provide an ERC-20 contract address for other tokens.
  • Allowance - The amount of the token the spender is allowed to spend, in the token’s smallest unit (e.g. wei for ETH, 6-decimal units for USDC).
  • Time period - Use periodInDays for simple daily/weekly limits, or period, start, and end for advanced rolling windows and fixed time ranges.
  • Salt - A random value to differentiate between permissions with the same parameters. Generated automatically by the SDK.
  • Extra Data - Arbitrary data for additional information about the permission.

Enable spend permissions

Enable at account creation

Set enableSpendPermissions: true in your CDPHooksProvider config:

Enable on an existing account

This is currently only supported for User Wallets.
If a Smart Account was created without spend permissions, use useEnableSpendPermissions to enable them retroactively.
evmSmartAccount is optional. The hook auto-resolves it from the authenticated user’s primary smart account. Pass it explicitly only if the user has multiple smart accounts and you need to target a specific one.
Before enabling spend permissions on an existing account, make sure the Smart Account:
  • Has completed at least one user operation on the network where you’ll enable spend permissions.
  • Holds enough of that network’s native token to cover gas, unless the enable operation is sponsored (for example, via a paymaster).

Create a spend permission

Use useCreateSpendPermission to create a permission. Creating a permission is a user operation that requires gas — use useCdpPaymaster: true on Base or provide a paymasterUrl.

Use a spend permission (spender side)

Once a permission is created, the designated spender lists the account’s permissions to find theirs, then calls useSpendPermission to spend within the defined limits.

List spend permissions

useListSpendPermissions automatically lists permissions for the authenticated user’s smart account.

Revoke a spend permission

Check remaining allowance

Query the getCurrentPeriod function on the Spend Permission Manager contract to see how much of an allowance remains in the current period.
Node (TypeScript)

Spend Permissions vs Policies

Supported networks

Mainnets

Arbitrum, Avalanche, Base, Ethereum, Optimism, Polygon

Testnets

Base Sepolia, Ethereum Sepolia
The Spend Permission Manager contract is deployed at 0xf85210B21cC50302F477BA56686d2019dC9b67Ad on all supported networks.