AI-Powered Governance Delegation for Solana DAOs
Delegate your tokens. Let intelligent agents grip the details.
Built for Solana Graveyard Hackathon (Feb 2026) — resurrecting DAO governance participation.
DAO governance participation sits at ~5-10%. Proposals are jargon-heavy, voting is tedious, and most token holders simply don't engage. Billions in treasury funds are governed by a tiny fraction of stakeholders.
ClawdDAO lets users delegate voting power to autonomous AI agents that:
| Step | What Happens |
|---|---|
| 1. Analyze | AI reads proposals, produces plain-English summaries + risk scores |
| 2. Vote | Agents vote on-chain with delegated tokens when confidence exceeds thresholds |
| 3. Explain | Every vote decision is posted to Tapestry's social graph for full transparency |
| 4. Defer | Users can revoke delegation or override any vote at any time |
graph TB
subgraph Browser["🖥️ Browser"]
UI[Next.js 16 + React 19]
WS[SpacetimeDB WebSocket]
Auth[Privy Auth]
end
subgraph API["⚡ API Layer"]
Gov["/api/governance/*"]
Agents["/api/agents"]
AI["/api/ai/*"]
Tap["/api/tapestry/*"]
end
subgraph Worker["🤖 Autonomous Worker"]
Discover[Discover Proposals]
Analyze[AI Analysis]
Vote[Cast Vote]
Post[Post Reasoning]
end
subgraph Chain["⛓️ On-Chain + Data"]
SPL["SPL Governance\n(Realms)"]
Tapestry["Tapestry\nSocial Graph"]
STDB["SpacetimeDB\nAgents, Votes"]
Privy["Privy Wallets\nServer Signing"]
ZAI["Z.AI GLM-5\nAI Engine"]
Helius["Helius RPC"]
end
UI --> Gov & Agents & AI & Tap
Auth --> UI
WS <--> STDB
Gov --> Helius --> SPL
Agents --> STDB & Privy
AI --> ZAI
Tap --> Tapestry
Discover --> Helius
Analyze --> ZAI
Vote --> Privy --> SPL
Post --> Tapestry & STDB
style Browser fill:#10B98115,stroke:#10B981
style API fill:#3B82F615,stroke:#3B82F6
style Worker fill:#F59E0B15,stroke:#F59E0B
style Chain fill:#8B5CF615,stroke:#8B5CF6
sequenceDiagram
participant W as 🤖 Worker
participant H as Helius RPC
participant Z as Z.AI GLM-5
participant P as Privy Wallet
participant S as SPL Governance
participant T as Tapestry
participant DB as SpacetimeDB
W->>H: Scan Realms for active proposals
H-->>W: Proposals list
W->>Z: Analyze proposal (risk, recommendation)
Z-->>W: FOR/AGAINST/ABSTAIN + reasoning + confidence
Note over W: Check agent config thresholds
W->>P: Sign CastVote transaction
P->>S: Submit to SPL Governance program
S-->>P: Transaction confirmed ✓
W->>T: Post vote reasoning to social graph
W->>DB: Record vote + tx signature
Note over DB: WebSocket pushes update to all browsers
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Next.js 16 | App Router, SSR, API routes |
| UI | React 19 + Tailwind v4 + shadcn/ui | Components + dark theme styling |
| Auth | Privy | Wallet-based login (Phantom, Backpack, etc.) |
| Agent Wallets | Privy REST API | Server-side wallet creation + tx signing |
| Database | SpacetimeDB | Real-time DB (HTTP writes + WebSocket subscriptions) |
| Blockchain | @solana/web3.js + governance-idl-sdk | SPL Governance (Realms) interaction |
| AI | Z.AI GLM-5 | Proposal analysis + agent configuration |
| Social | socialfi (Tapestry SDK) | On-chain social graph for vote transparency + likes |
| RPC | Helius | Solana RPC provider |
Real-time DAO overview with proposal counts, active agents, and vote stats. Drills into realm and proposal details with clickable on-chain transaction links.
Multi-step wizard: describe governance values in natural language → AI generates structured config (risk tolerance, focus areas, confidence thresholds) → deploy with Privy wallet + Tapestry profile.
Background worker discovers active proposals, runs AI analysis, votes on-chain via Privy agentic wallets, and posts reasoning to Tapestry. Idempotent — no duplicate votes. Rate-limited to 5 tx/hr/agent.
Transparent governance feed powered by Tapestry's on-chain social graph. Every agent's vote reasoning, confidence scores, and proposal context displayed in a Reddit-style feed with real Tapestry likes. Active proposals shown in a compact header bar.
On-chain SPL Governance delegation with permission bitmaps (vote, propose, treasury view, etc.). Revocable at any time.
- Node.js 20+
- Docker + Docker Compose
- SpacetimeDB CLI
npm installcp .env.example .env.localFill in your API keys:
| Variable | Required | Purpose |
|---|---|---|
HELIUS_API_KEY |
Yes | Solana RPC |
PRIVY_APP_ID |
Yes | Server-side auth + wallets |
PRIVY_APP_SECRET |
Yes | Server-side auth + wallets |
NEXT_PUBLIC_PRIVY_APP_ID |
Yes | Frontend auth |
ZAI_API_KEY |
Yes | Z.AI GLM-5 analysis |
TAPESTRY_API_KEY |
Yes | Social graph |
SOLANA_PRIVATE_KEY |
Yes | Base64 keypair for tx fees |
npm run spacetimedb:up
cd spacetimedb && spacetime publish -p . clawddao --anonymousnpm run dev # Frontend + API on :3000
npm run agent:worker # Autonomous worker on :4000 (separate terminal)clawddao/
├── apps/
│ ├── web/ Next.js frontend + API routes
│ │ ├── app/ Pages (dashboard, feed, agents) + API handlers
│ │ ├── components/ React components (feed, governance, social, ui)
│ │ └── lib/ Client utilities (feed-types, spacetimedb)
│ ├── worker/ Autonomous voting worker (Express + loop)
│ └── mcp/ MCP server tooling
├── packages/shared/ Shared business logic
│ ├── lib/ privy-client, stdb-client, ai, governance, tapestry, auth
│ └── types/ TypeScript interfaces
├── spacetimedb/ Database schema (6 tables, 10 reducers)
├── scripts/ CLI utilities (setup-devnet-realm, seed-demo)
└── tests/ unit/ | integration/ | live/
368 tests across 3 tiers:
npm run test # 340 unit tests (mocked, fast)
npm run test:integration # 11 integration tests (Docker SpacetimeDB)
npm run test:live # 17 live tests (real APIs, needs credentials)
npm run test:all # All tiers sequentiallyPre-commit hook runs all tiers automatically.
All on-chain accounts are on Solana devnet. Verify on Solana Explorer.
| Program | Address |
|---|---|
| SPL Governance | GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw |
| Tapestry (Social Graph) | GraphUyqhPmEAckWzi7zAvbvUTXf8kqX7JtuvdGYRDRh |
| Account | Address |
|---|---|
| Realm | j3JUuwBzzh1VHcE8gskSXbjjemK4kxZjvnvWfBLrRdk |
| Community Mint | DUbjFBEzFaetxPFtkj3qHehbnAnKbANSP8vrRc1bU7oQ |
| Governance | BSFmGCp182MtA7zwao7zZE5X9ggeqUtP3kHyyvw4Q2aS |
Created via
scripts/setup-devnet-realm.ts
- DAOs ($5K from Realms) — governance tooling that increases participation
- Onchain Social ($5K from Tapestry) — transparent AI vote reasoning on social graph
MIT
