FlowGov
This project extends the original Toucans DAO functionality with AI-powered governance assistance and automated workflow capabilities using Flow's Forte upgrade
视频
描述
FlowGov
Overview
FlowGov is a governance-focused fork of the Toucans DAO project with significant architectural improvements, modern Cadence 1.0 implementation, and enhanced features for Flow blockchain governance.
This project simplifies and modernizes the original Toucans DAO by: - 32% code reduction (548 lines removed) for better maintainability - Modern architecture with native Cadence 1.0 + Flow 2.0 features - EVM integration via Cadence-Owned Accounts (COA) for multi-chain governance - AI-powered governance assistance for proposal understanding and voting guidance - Automated workflow capabilities using Flow’s Transaction Scheduler
🌐 Live Demo: Netlify Deployment
📺 FlowGov Explanation: Watch Overview Video on Google Drive
🎯 Problem & Solution Overview
The Problems We Solve
❌ Problem #1: Manual Execution in Most DAOs
Issue: Traditional DAOs (Compound, Uniswap, Aave) require someone to manually call executeProposal() after voting ends.
Impact: - Execution delays (days or weeks) - Single points of failure - Trust requirements on executors - Maintenance overhead
✅ Our Solution: Trustless Automated Execution via Flow’s Transaction Scheduler - proposals auto-execute without any human intervention.
❌ Problem #2: Poor Proposal Discovery & Understanding
Issue: Users spend excessive time searching and understanding proposals. Good proposals are missed because interested supporters don’t see them.
Impact: - Low participation rates - Missed opportunities for valuable proposals - Time-consuming proposal research - Technical barriers to participation
✅ Our Solution: AI Governance Agent - Conversational interface that helps users understand proposals through natural language queries. Real-time dashboard with proposal filtering and status tracking.
❌ Problem #3: Cadence Limitations (No Arbitrary Data Execution)
Issue: Unlike Solidity, Cadence doesn’t natively support executing arbitrary contract calls or arbitrary data.
Impact: - Limited extensibility - Complex features require contract upgrades - Hard to bridge to removed functionality - Rigid architecture
✅ Our Solution: EVM Integration via COA - Execute arbitrary EVM contract calls through governance proposals. Bridge to Solidity functionality while keeping Cadence’s security benefits.
❌ Problem #4: Toucans DAO - Multisig Model, Not Open
Issue: The original Toucans DAO we forked operates more like a multisig with fixed signers, not truly open for everyone.
Impact: - Restricted participation (signers only) - Not democratic - Fixed access model - Limited community involvement
✅ Our Solution: Token-Weighted Voting & Community Support - Any token holder can vote. Anyone can create and support proposals (not just creators). True democratic governance with economic stake requirements.
🚀 Our Complete Solution
FlowGov addresses all four problems through:
1. 🔄 Trustless Automation - Flow Transaction Scheduler auto-executes all proposals
2. 🤖 AI-Powered Discovery - Natural language queries help users find and understand proposals
3. 🔗 EVM Bridge - Execute arbitrary logic via EVM while maintaining Cadence security
4. 👥 Open Governance - Token-weighted voting, anyone can participate
Result: A truly decentralized, automated, and accessible DAO governance system.
📹 Video Demo & Project Showcase
📺 FlowGov Explanation Video
Overview & Architecture - Learn about FlowGov’s features and how it works!
👉 📺 Watch FlowGov Explanation Video on Google Drive 👈
Complete overview explaining FlowGov’s architecture, features, and how it solves DAO governance challenges.
🎥 Interactive Demo Video
Full Project Walkthrough - See ToucanDAO in action!
👉 🎥 Download/View Demo Video 👈
Interactive demo showcasing FlowGov features, proposal creation, voting, and automated execution in real-time.
Note: Click the link above to view the demo video file. GitHub doesn’t support inline video playback in README files. ### 🔗 Quick Links to Verify Our Work
• 📹 Demo Video: Watch the full walkthrough above
• 🌐 Live Deployment:
– Flowscan Testnet - ToucanDAO
• 🌐 EVM Contract:
– EVM Explorer - FlowTreasuryWithOwner
• 📊 Architecture Diagrams: See the detailed proposal lifecycle flow diagram below
📊 Quick Stats: - ✅ 11 new smart contract features (Proposal System, EVM Integration, Scheduler, etc.) - ✅ AI Governance Agent (Frontend innovation) - 🔄 9 features significantly modified (Voting, Architecture, State Management, etc.) - ❌ 11 features removed (most can be executed via EVM calls!) - 🎯 Core concepts retained (Treasury, Multi-Actor Decisions, Action Execution)
🏆 Hackathon Achievements: - ✅ 32% code reduction while adding new features - ✅ Trustless Automation - all proposals auto-execute (most DAOs lack this!) - ✅ EVM Integration - enables arbitrary logic execution - ✅ Full Automation - auto-execute + auto-refund, zero maintenance - ✅ Community-Driven - anyone can support proposals - ✅ AI-Powered - conversational governance assistance - ✅ Comprehensive E2E Testing - extensive test suite covering all scenarios - ✅ Deployed & Tested - Live on Flow Testnet with 50+ proposals created and voted on
🎯 Key Differentiators: 1. Trustless Automated Execution - No manual execution needed (unlike most DAOs) 2. EVM Arbitrary Calls - Execute any logic via EVM (extensible architecture) 3. Full Automation - Auto-execute + auto-refund (zero maintenance) 4. Community Support - Anyone can activate proposals (not just creator) 5. Comprehensive E2E Testing - Extensive test coverage ensures reliability
🏆 Built for Forte Hacks by Flow: Build with Disney, Dune and Dapper
This project was developed as part of Forte Hacks, Flow’s 2025 flagship hackathon running from October 1-31st. The hackathon invites hackers, creators, and Web3 developers to push the boundaries of smart contract automation, DeFi primitives, and user-centric applications to win a share of $250,000 in bounties and prizes. Supported by partners including Dune, Quicknode, Moonpay, Dapper Labs, Thirdweb, Privy, Crossmint, and more.
🎯 Key Innovations
🚀 Innovation #1: Trustless Automated Execution
The Revolution: Most DAOs require manual execution - someone must call executeProposal() after voting ends. We’ve eliminated this completely - all proposals auto-execute via Flow’s Transaction Scheduler!
Why This Is Revolutionary:
Traditional DAOs | ToucanDAO (Our Solution) |
❌ Manual Execution Required | ✅ Fully Automated Execution |
❌ Someone must call executeProposal() | ✅ Scheduled automatically on deposit |
❌ Relies on trusted executor | ✅ Trustless - Flow network executes |
❌ Execution can be delayed/blocked | ✅ Executes precisely at scheduled time |
❌ Single point of failure | ✅ Distributed, network-level execution |
❌ Requires monitoring and manual work | ✅ Zero maintenance - fully automated |
How It Works:
1. Proposal Created (Pending)
2. Anyone Deposits → Status: Active → Automatically Scheduled for Execution
3. Voting Period (Community votes)
4. Voting Ends → Status Calculated (Passed/Rejected/Expired)
5. Cooldown Period (Safety mechanism)
6. 🚀 AUTOMATIC EXECUTION via Flow Transaction Scheduler (No human needed!)
7. Deposits Auto-Refunded
Key Benefits: - ✅ Trustless: No reliance on specific individuals or multisig executors - ✅ Automated: Execution happens automatically after cooldown - ✅ Precise Timing: Executes at exact scheduled timestamp - ✅ No Single Point of Failure: Flow network handles execution - ✅ Gas Optimization: Fees estimated and paid automatically - ✅ Unstoppable: Cannot be blocked or delayed by centralized parties
Competitive Advantage: > Most DAOs lack this critical feature! They require manual execution which creates: > - Execution delays > - Trust requirements > - Single points of failure > - Maintenance overhead > > ToucanDAO is fully automated and trustless - execution happens automatically without any human intervention!
💎 Core Innovation #2: EVM Integration Enables Arbitrary Logic Execution
The Game-Changer: While we simplified the Cadence contract by removing complex features (NFTs, token locking, batch operations, etc.), we can still execute them via EVM calls!
Why This Matters: - ✅ Best of Both Worlds: Simple, auditable Cadence contract + flexible EVM execution - ✅ No Contract Upgrades Needed: Deploy new EVM contracts, propose calls via governance - ✅ Extensible Architecture: Add functionality without modifying core Cadence contract - ✅ Bridge to Removed Features: Execute removed features (NFTs, batch ops, etc.) via EVM - ✅ Execute Arbitrary Data: Any EVM contract call can be executed through governance
Example Workflow:
User wants NFT support → Deploy EVM NFT contract → Create EVMCall proposal →
Community votes → Passes → Auto-executes after cooldown → NFT operation performed via EVM
All deposits automatically refunded!
📋 Feature Summary by Category
🔧 Smart Contract Features
# | Feature | Description | Innovation |
1 | 🔄 Trustless Auto-Execution | All proposals auto-execute via Flow Transaction Scheduler (most DAOs lack this!) | Trustless, no manual intervention, unstoppable |
2 | 💰 Auto-Refunds | All deposits automatically refunded for all outcomes (Passed/Rejected/Expired) | Depositor never loses funds |
3 | 👥 Community Support | Anyone can deposit to activate proposals (not just creator) | Community empowers each other |
4 | ⏰ Auto-Expiry | Proposals expire automatically if not supported/voted on | Clean system, no stale proposals |
5 | 🔗 EVM Arbitrary Calls | Execute arbitrary EVM contract calls - bridge to removed features | Extensible without upgrades |
6 | 🎯 Token-Weighted Voting | Any token holder votes (economic stake required) | More democratic governance |
7 | 📊 Dynamic Status | Status calculated automatically (no manual updates) | Error-resistant transitions |
8 | 🛡️ Safe Refund System | Proper depositor tracking with capability validation | Fixed critical fund loss bug |
9 | ⏱️ Cooldown Periods | Time delay before execution (safety mechanism) | Prevents rash decisions |
10 | 📈 Differentiated Quorum | Admin ops: 2/3 members, Regular: configurable | Flexible governance rules |
11 | 🔐 Modern Cadence 1.0 | Native Cadence 1.0 + Flow 2.0 features | Future-proof, no migration |
🎨 Frontend Features
# | Feature | Description | Innovation |
1 | 🤖 AI Governance Agent | Conversational interface for proposal understanding | Democratizes governance access |
2 | 💬 Natural Language Queries | Ask questions about proposals in plain English | No technical knowledge required |
3 | 📊 Proposal Dashboard | Real-time proposal status and voting information | Enhanced user experience |
4 | 🔒 Secure Architecture | API keys kept server-side only | Production-ready security |
5 | ⚡ Real-Time Updates | Live proposal data and status tracking | Responsive user interface |
🧪 Testing & Quality Assurance
# | Feature | Description | Innovation |
1 | 🔬 E2E Test Suite | 11 comprehensive E2E test scripts covering all scenarios | Production-ready reliability |
2 | ✅ EVM Integration E2E | Complete EVM call proposal flow tested end-to-end | Verifies cross-chain functionality |
3 | 🛡️ Foundry Tests | Solidity contract test suite (100% pass rate) | Smart contract reliability |
4 | 📊 Multi-Scenario Testing | Edge cases, cancellation, expiry, multi-account tested | Comprehensive coverage |
5 | ✅ Real-World Verification | 50+ proposals tested on Flow Testnet | Battle-tested in production |
🔧 Smart Contract Achievements
Feature | Innovation | Impact |
🔄 Full Automation | All proposals auto-execute after cooldown via Transaction Scheduler | No manual intervention, prevents execution delays |
💰 Auto-Refunds | All deposits automatically refunded for all outcomes | Depositor never loses funds, even if proposal fails |
👥 Community Support | Anyone can deposit to activate proposals (not just creator) | Community empowers each other’s proposals |
⏰ Auto-Expiry | Proposals expire automatically if not supported/voted | Clean system, no stale proposals |
🔗 EVM Bridge | Execute arbitrary EVM calls - bridge to removed features | Extensible without contract upgrades |
🎯 Token-Weighted Voting | Any token holder votes (economic stake required) | More democratic than fixed signers |
📊 Dynamic Status | Status calculated automatically (no manual updates) | Error-resistant, automatic transitions |
🎨 Frontend Achievements
Feature | Innovation | Impact |
🤖 AI Governance Agent | Conversational interface for proposal understanding | Democratizes access, makes governance accessible |
💬 Natural Language Queries | Ask questions in plain English | No technical knowledge required |
📈 Real-Time Dashboard | Live proposal status and voting info | Enhanced user experience |
🔒 Secure Architecture | API keys server-side only | Production-ready security |
🏗️ Technical Excellence
• ✅ 32% Code Reduction: Simplified while adding features
• ✅ Modern Cadence 1.0: Built from scratch, no migration needed
• ✅ Flow 2.0 Features: Transaction Scheduler integration
• ✅ EVM Integration: Cadence-Owned Account (COA) for multi-chain operations
• ✅ Deployed & Tested: Live on Flow Testnet with 50+ proposals
📈 Real-World Deployment Stats
• ✅ 28 active proposals currently on testnet
• ✅ 50+ proposals created and tested
• ✅ Multiple proposal types tested (WithdrawTreasury, EVMCall)
• ✅ Voting system verified with random yes/no votes
• ✅ Auto-execution working via Transaction Scheduler
• ✅ EVM calls successfully executed through COA
🧪 Comprehensive Testing Suite
We have extensive E2E (End-to-End) and integration testing to ensure reliability and correctness!
E2E Testing Scripts
Test Script | Coverage | Description |
13_evm_call_proposal_e2e.sh | ⭐ EVM Integration E2E | Complete flow: Create EVM call proposal → Vote → Auto-execute → Verify EVM call success |
10_comprehensive_test.sh | ⭐ Full System Test | Comprehensive test covering all proposal types, voting scenarios, and edge cases |
01_basic_proposal_workflow.sh | Basic Workflow | Create → Deposit → Vote → Execute flow |
02_multi_voter_scenario.sh | Multi-Voter | Multiple voters voting on same proposal |
03_admin_operations.sh | Admin Ops | Add/remove members, update config proposals |
04_proposal_cancellation.sh | Cancellation | Proposal cancellation and refund flow |
05_multiple_proposals.sh | Multi-Proposal | Handling multiple concurrent proposals |
06_complete_lifecycle.sh | Lifecycle | Full proposal lifecycle: Pending → Active → Passed/Rejected → Executed |
07_voting_scenarios.sh | Voting | Various voting scenarios (yes/no, quorum, expiry) |
08_dao_state_queries.sh | State Queries | Testing DAO state queries and configuration |
09_proposer_depositor_voter_scenarios.sh | Roles | Different roles (proposer, depositor, voter) scenarios |
11_realistic_multi_account.sh | Multi-Account | Realistic multi-account deployment and interaction |
Foundry Tests (Solidity)
Test File | Coverage | Description |
FlowTreasuryWithOwner.t.sol | ⭐ Treasury E2E | Complete FlowTreasury contract tests: deployment, ownership, execution, COA integration |
FlowTreasury.t.sol | Base Treasury | Base treasury contract functionality |
Counter.t.sol | Integration | Example counter contract for testing EVM calls |
Test Coverage Highlights
✅ E2E Test Coverage: - ✅ Proposal Creation - All proposal types (WithdrawTreasury, EVMCall, AdminOps) - ✅ Deposit & Activation - Anyone can deposit, activation flow - ✅ Voting System - Token-weighted voting, quorum enforcement, majority rules - ✅ Auto-Execution - Transaction Scheduler integration, cooldown periods - ✅ Auto-Refunds - Refund verification for all outcomes - ✅ EVM Integration - Complete EVM call proposal E2E (create → vote → execute → verify) - ✅ Proposal Lifecycle - All status transitions (Pending → Active → Passed/Rejected/Expired → Executed) - ✅ Edge Cases - Cancellation, expiry, insufficient funds, invalid votes - ✅ Multi-Account - Realistic scenarios with multiple accounts - ✅ Admin Operations - Member management, configuration updates
✅ Smart Contract Tests: - ✅ FlowTreasuryWithOwner - Full test suite for EVM treasury contract - ✅ COA Ownership - Verifies COA owns treasury correctly - ✅ EVM Execution - Contract call execution verification - ✅ Access Control - Owner-only functions tested
✅ Integration Tests: - ✅ Transaction Scheduler - Automated execution testing - ✅ Multi-Token - Treasury supports multiple token types
Test Results: - ✅ All E2E tests passing on Flow Testnet - ✅ Foundry tests: 100% pass rate - ✅ 50+ proposals tested end-to-end - ✅ Multiple proposal types verified - ✅ Auto-execution verified via Transaction Scheduler - ✅ EVM calls successfully tested and verified
Why This Matters: - 🛡️ Reliability: Comprehensive testing ensures the DAO works correctly - 🔒 Security: Edge cases and failure modes tested - ✅ Production-Ready: Extensive E2E testing validates real-world scenarios - 📊 Confidence: All features tested before deployment
本次黑客松进展
🚀 Key Technical Features 🌟 Smart Contract Innovations 1. EVM Integration & Arbitrary Logic Execution ⭐ Hackathon Highlight ToucanDAO features unprecedented flexibility through EVM integration via Cadence-Owned Accounts (COA). This enables executing arbitrary EVM contract calls, allowing the DAO to perform any logic not natively supported by Cadence structures. Key Capabilities: - ✅ Execute Arbitrary Data: Call any EVM contract with custom function signatures and parameters - ✅ Bridge Removed Features: Functions removed from the original (NFT operations, token locking, batch operations, etc.) can be executed via EVM calls - ✅ Multi-Chain Governance: Execute operations on Flow EVM network through DAO proposals - ✅ Extensible Architecture: Add new functionality without contract upgrades by deploying EVM contracts Example Use Cases: // Execute removed features via EVM calls: - NFT transfers (removed from Cadence) - Batch token operations (removed from Cadence) - Complex DeFi operations - Cross-chain interactions - Custom treasury logic Deployment: - COA Address: 0x000000000000000000000002120f118C7b3e41E4 (Funded with 2M FLOW) - FlowTreasuryWithOwner: 0xAFC6F7d3C725b22C49C4CFE9fDBA220C2768998F (Flow EVM Testnet) - Chain ID: 545 (Flow Testnet EVM) ...