Skip to content

JaDi03/AmbDAO

Repository files navigation

🛡️ Governance Sentinel

AI-Powered DAO Proposal Security Filter using Ambient's On-Chain LLM

A smart contract and web interface that audits DAO governance proposals for malicious patterns using Ambient's Tool Oracle for on-chain LLM inference.

🎯 What It Does

  1. Submit Proposal → User submits governance proposal content
  2. On-Chain Record → AuditRecord saved to Ambient via custom smart contract
  3. AI Analysis → Content sent to Ambient Tool Oracle for LLM analysis
  4. Security Verdict → Returns SAFE or RISKY based on detected patterns

Threat Detection Examples

  • Treasury drains
  • Unauthorized fund transfers
  • Malicious contract upgrades
  • Voting power manipulation
  • Governance attacks

🏗️ Architecture

┌─────────────────┐     ┌──────────────────────┐     ┌─────────────────────┐
│   Web UI        │────▶│  Governance Sentinel │────▶│  Ambient Tool Oracle│
│   (React)       │     │  (Solana Program)    │     │  (LLM Inference)    │
└─────────────────┘     └──────────────────────┘     └─────────────────────┘
                               │
                               ▼
                        ┌──────────────┐
                        │ AuditRecord  │
                        │ (PDA)        │
                        └──────────────┘

Programs

Program ID Purpose
Governance Sentinel 4pnFAxP84aujFAMsNtVkpC8ViUZD8M3ZKwo3yBD8gp5H Save audit records, orchestrate analysis
Tool Oracle 721QWDeUzVL77UCzCFHsVGCMBVup8GsAMPaD2YvWvw97 On-chain LLM inference via Ambient

🚀 Running Locally

Prerequisites

  • Node.js 18+
  • Rust + Solana CLI (for contract deployment)
  • AMB on Ambient Testnet

Install & Run

# Install dependencies
cd ui
npm install

# Run development server
npm run dev

Deploy Contract (if needed)

# From project root
npm run deploy

📁 Project Structure

├── programs/
│   └── governance-sentinel/
│       └── src/lib.rs          # Solana program
├── ui/
│   ├── src/
│   │   ├── solana.ts           # Blockchain integration
│   │   ├── views/
│   │   │   └── SubmitProposal.tsx
│   │   └── App.tsx
│   └── package.json
├── oracle.md                   # Tool Oracle documentation
├── aap.md                      # Auction Program documentation
└── README.md

📜 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors