Skip to main content
The Sudo Policy grants unrestricted access to specified contract functions. It’s the simplest policy—and the most powerful.

When to Use Sudo

Target contract is audited and trusted (Uniswap, Aave, Morpho)
No user funds at direct risk (game actions, governance votes)
You need simplicity over granular control
Combined with time limits or usage limits

When NOT to Use Sudo

Agent handles significant user funds without other limits
Target contract has dangerous functions (e.g., approve for arbitrary spenders)
You need spending caps or parameter validation
Indefinite access without time bounds

Basic Usage

Agent Examples

Yield Optimizer Agent

Trust deposits/withdrawals on vetted protocols:

Gaming Agent

Full access to game contract with usage limits:

Governance Agent

Vote on proposals automatically:

Security Checklist

Timeframe Policy configured
Only specific functions allowed (not entire contract)
Target contract is audited
Usage limit considered for high-risk actions
Gas spend capped (maxPaymentAmount)

Common Mistakes

Granting Sudo to approve() functionThis lets the agent approve arbitrary spenders. Never do this:
No time limitWithout timeframe policy, the permission never expires:

When to Upgrade to Universal Action

Switch to Universal Action when you need:
  • Spending limits (per-action or total)
  • Recipient whitelisting
  • Parameter validation
  • Cumulative caps
See Universal Action Policy for details.