Subscribe to agents, not apps. Wallet-native subscriptions powered by ERC-7715.
# Cascade
Permission-Native Autonomous Agents for Web3
## Overview
Cascade is an agent-based Web3 automation platform built on MetaMask Advanced Permissions (ERC-7715).
It enables autonomous execution without exposing private keys, granting broad approvals, or requiring repeated wallet confirmations.
Users delegate **explicit, fine-grained authority** to agents:
- fixed daily budgets
- specific contracts
- exact function calls
- time-bounded permissions
All enforcement happens on-chain via MetaMask Smart Accounts.
---
## Core Principle
Agents execute off-chain.
Authority is enforced on-chain.
MetaMask is the permission gate.
Cascade separates **decision-making** from **execution rights**, enabling autonomy without custody risk.
---
## Agents
### Agent 1 — Portfolio Rebalancer
**Purpose**
Maintains a target ETH / USDC ratio through bounded, periodic adjustments.
**Permissions**
- Maximum 2 USDC per day
- Allowed contract: `RebalanceVault`
- Allowed function: `rebalance(uint256)`
- Permission expiry: 30 days
**Behaviour**
- Reads market ratio
- Submits rebalance attempts
- Automatically blocked when daily limit or cooldown is reached
---
### Agent 2 — Gas Optimiser
**Purpose**
Pays infrastructure and relayer fees on behalf of the user.
**Permissions**
- Maximum 1 USDC per day
- Allowed contract: `GasRelay`
- Allowed function: `payRelayer(uint256)`
- Permission expiry: 30 days
**Rationale**
Demonstrates that Advanced Permissions apply to infrastructure payments, not only protocol interactions.
---
## Architecture
- Frontend: Next.js
- Agent Runtime: Server-side (Vercel)
- Reasoning Layer: Vercel AI SDK
- Execution: viem + MetaMask Smart Accounts Kit
- Permissions: ERC-7715 (Advanced Permissions)
- Network: Sepolia (EIP-7702 supported)
Agents are triggered via a daily scheduler and may execute multiple safe actions until their permission limits are exhausted.
---
## Advanced Permissions (ERC-7715)
Cascade enforces:
- exact contract addresses
- function-level execution
- token spend caps
- daily reset windows
- explicit expiry
Any transaction outside the granted scope is rejected by MetaMask before execution.
---
## Smart Contracts
### RebalanceVault
- Stores target ETH ratio
- Enforces rebalance cooldown
- Emits detailed rebalance events
- No ownership or privileged roles
### GasRelay
- Represents infrastructure payment endpoint
- Tracks cumulative fees paid
- Emits relayer payment events
- No token custody
Contracts are intentionally minimal to emphasise permission enforcement over contract complexity.
---
## Execution Flow
1. User connects MetaMask
2. User approves Advanced Permissions
3. Permissions are stored in the Smart Account
4. Daily scheduler triggers agents
5. Agents reason and attempt execution
6. Smart Account enforces ERC-7715 rules
7. Transactions execute or fail safely
No wallet interaction is required after initial approval.
---
## Example 24-Hour Cycle
- Rebalancer performs one adjustment
- Subsequent attempts are blocked by daily limits
- Gas Optimiser pays relayer once
- Permissions reset automatically the next day
All actions are transparent and auditable on-chain.
---
## Hackathon Track Alignment
Track: Most Creative Use of Advanced Permissions
Cascade demonstrates:
- autonomous agents with bounded authority
- function-level permission enforcement
- infrastructure-paying agents
- clear UX around autonomy and limits
---
## Tech Stack
- Next.js
- TypeScript
- viem
- MetaMask Smart Accounts Kit
- ERC-7715 Advanced Permissions
- Vercel AI SDK
- Sepolia testnet
---
## Future Extensions
- agent-to-agent permission re-delegation
- subscription-based agents
- permission visualisation dashboards
- multi-chain execution
---
## Summary
Cascade shows how Web3 agents can act autonomously while remaining strictly permission-bound.
It demonstrates the intended use of ERC-7715: explicit authority, enforced by the wallet, not by trust.
