Hackathon Project: Multi-agent AI system for DAO treasury protection on Monad blockchain
AI Guard Dog Intern is a multi-agent AI system that automatically analyzes DAO proposals and protects treasury funds from malicious or poorly-written proposals. It runs on the Monad blockchain for high-speed, low-cost governance.
DAOs face constant threats:
- π Malicious proposals draining treasury
- π Low-quality proposals wasting voter time
- β° Voter fatigue leading to poor decisions
- π¨ Scams disguised as legitimate proposals
Three AI agents work together to:
- Analyze every proposal for red flags
- Score risk levels automatically
- Route proposals appropriately:
- β Auto-approve low-risk proposals
- π Flag medium-risk for human review
- π« Auto-reject high-risk scams
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER SUBMITS PROPOSAL β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β monad-dao/ β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β DAOToken β β Treasury β β ProposalManager β β
β β (Governance)β β (Funds) β β (Lifecycle) β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β VotingEngineβ β Timelock β β AIAgentRegistry β β
β β (Tallying) β β (Delay) β β (AI Whitelist) β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β ProposalCreated Event
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI GUARD DOG (GuardDao/) β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Agent 1: Reputation Checker β β
β β - Wallet age, history, ENS verification β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Agent 2: NLP Analyzer β β
β β - Red flag detection, scam patterns β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Agent 3: Mediator β β
β β - Combines scores, makes routing decision β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β Risk Score
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ROUTING DECISION β
β Risk < 20: β
Auto-Approve (VotingAgent votes FOR) β
β Risk 20-79: π Human Review (Flag for DAO members) β
β Risk β₯ 80: π« Auto-Reject (VotingAgent votes AGAINST) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
GuardDao/
βββ contracts/ # AI Guard Dog contracts
β βββ VotingAgent.sol # AI agent that casts votes
β βββ AuditLogger.sol # Logs all AI decisions
β βββ DAOGovernor.sol # Governor interface
β βββ MockToken.sol # Test token
β
βββ monad-dao/ # Core DAO implementation
β βββ contracts/
β β βββ core/
β β β βββ DAOCore.sol # Main coordinator
β β β βββ DAOToken.sol # Governance token
β β β βββ Treasury.sol # Fund management
β β βββ governance/
β β β βββ ProposalManager.sol # Proposal lifecycle
β β β βββ VotingEngine.sol # Vote tallying
β β β βββ Timelock.sol # Execution delay
β β βββ membership/
β β β βββ MemberRegistry.sol # Member profiles
β β βββ integration/
β β β βββ AIAgentRegistry.sol # AI agent whitelist
β β βββ interfaces/ # All interfaces
β β
β βββ scripts/
β βββ deploy.js # Deploy all contracts
β βββ setup-dao.js # Configure DAO
β βββ fund-treasury.js # Add funds
β βββ register-ai-agent.js # Connect AI
β βββ create-test-proposal.js # Demo proposals
β
βββ PRD_AI_Guard_Dog_Intern.md # Product requirements
βββ Proposal_examples.md # Sample proposals
βββ README.md # This file
- Node.js v18+
- npm or yarn
# Main project
cd GuardDao
npm install
# DAO contracts
cd monad-dao
npm installcd monad-dao
npx hardhat compile# Terminal 1 - Keep running
npx hardhat node# Terminal 2
cd monad-dao
npx hardhat run scripts/deploy.js --network localhost
npx hardhat run scripts/setup-dao.js --network localhost
npx hardhat run scripts/fund-treasury.js --network localhost
npx hardhat run scripts/create-test-proposal.js --network localhost| Contract | Address (localhost) | Purpose |
|---|---|---|
| DAOToken | deployment.json | Governance token with voting power |
| Treasury | deployment.json | Holds and manages DAO funds |
| ProposalManager | deployment.json | Creates and tracks proposals |
| VotingEngine | deployment.json | Handles vote casting and tallying |
| Timelock | deployment.json | Delays execution for security |
| MemberRegistry | deployment.json | Tracks member profiles |
| DAOCore | deployment.json | Coordinates all contracts |
| AIAgentRegistry | deployment.json | Whitelists AI agents |
| Contract | Purpose |
|---|---|
| VotingAgent.sol | AI agent that analyzes and votes on proposals |
| AuditLogger.sol | Immutable log of all AI decisions |
- β° Timelock: 2-day delay before execution
- π° Treasury Limits: 20% daily spending cap
- π€ AI Monitoring: Automatic red flag detection
- π Audit Trail: All AI decisions logged on-chain
The demo creates 3 proposals with different risk levels:
| Proposal | Amount | Risk Level | Expected AI Action |
|---|---|---|---|
| Q1 Marketing | 10 MON | Low (~15) | β Auto-Approve |
| Emergency Audit | 50 MON | Medium (~45) | π Human Review |
| Partnership Deal | 500 MON | High (~90) | π« Auto-Reject |
// hardhat.config.js
localhost: {
url: "http://127.0.0.1:8545"
}monadTestnet: {
url: process.env.MONAD_TESTNET_RPC,
accounts: [process.env.PRIVATE_KEY]
}The AI analyzes proposals using:
| Phrase | Severity | Score Impact |
|---|---|---|
| "guaranteed returns" | Critical | +30 |
| "trust us" | Warning | +10 |
| "urgent/ASAP" | Warning | +5 |
| "anonymous team" | Critical | +25 |
| "confidential details" | Critical | +20 |
- Budget breakdown completeness
- Team verification
- External link validity
- Historical pattern matching
- Core DAO contracts
- Deployment scripts
- Test proposals
- AI risk scoring service
- Frontend dashboard
- Monad testnet deployment
- Production audit
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
MIT License - see LICENSE for details.
- Monad Team for the high-performance blockchain
- OpenZeppelin for security patterns
- Hackathon organizers