Skip to content

rizalcodes/dao_governance_tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ DAO Governance Tracker

Monitor DAO proposals & voting activity across Uniswap, Aave, Compound, MakerDAO & Gitcoin with real-time Telegram alerts β€” powered by Snapshot API + Tally API.

Python Snapshot Telegram Ethereum License


πŸ” What is DAO Governance Tracking?

DAO governance tracking monitors on-chain and off-chain voting proposals from decentralized protocols β€” helping DeFi participants stay informed about protocol changes before they pass and affect token prices or protocol rules.

This bot tracks governance using:

  • πŸ“Έ Snapshot API β€” free off-chain governance data (no API key needed)
  • πŸ—³οΈ Tally API β€” on-chain Governor Bravo proposals
  • πŸ›οΈ 5 Major DAOs β€” Uniswap, Aave, Compound, MakerDAO, Gitcoin

✨ Features

  • πŸ“‹ Active Proposals β€” fetch open voting proposals per DAO
  • πŸ—³οΈ Vote Breakdown β€” For/Against/Abstain with percentage bars
  • πŸ”” New Proposal Alerts β€” instant Telegram alert on new proposals
  • ⚠️ Deadline Alerts β€” notify when voting ends in < 24 hours
  • πŸ“Š DAO Summary β€” followers, total proposals, votes stats
  • πŸ‘₯ Top Voters β€” see who voted and how
  • πŸ† Top Active β€” all active proposals sorted by urgency
  • πŸ“‘ Auto Monitor β€” background polling every 5 minutes
  • πŸ€– Telegram Bot β€” 9 interactive commands

πŸš€ Quick Start

1. Install dependencies

pip install requests

2. Set API keys

Open dao_governance_tracker.py and configure:

TELEGRAM_TOKEN   = "your_telegram_bot_token"
TELEGRAM_CHAT_ID = "your_chat_id"

No additional API keys needed β€” Snapshot API is free and open!

3. Run as Telegram Bot

python dao_governance_tracker.py

4. Quick CLI check (one-time)

python dao_governance_tracker.py check uniswap
python dao_governance_tracker.py check aave

πŸ€– Telegram Commands

Command Description
/gov_proposals <dao> Active proposals for a DAO
/gov_proposal <id> Proposal detail + top voters
/gov_add <dao> Add DAO to watchlist
/gov_remove <dao> Remove DAO from watchlist
/gov_list Show watched DAOs
/gov_summary <dao> DAO overview & stats
/gov_daos List all available DAOs
/gov_monitor on/off Toggle auto monitoring
/gov_top All active proposals by urgency

πŸ“Š Sample Output

πŸ¦„ Uniswap Governance
━━━━━━━━━━━━━━━━━━━━━━
πŸ“‹ Deploy Uniswap V3 on X Chain

🟒 Status  : ACTIVE
πŸ“‘ Source  : Snapshot
πŸ‘€ Author  : 0x1a2b3c...

πŸ“Š Vote Breakdown:
- For             β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 78.4%
- Against         β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 18.2%
- Abstain         β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  3.4%

πŸ† Leading: For (78.4%)
🎯 Quorum : 82.3%
⏰ Ends in : 2d 14h

πŸ—³οΈ Votes   : 1,247
πŸ”— View Proposal

🚨 Alert System

Alert Trigger
πŸ”” New Proposal New active proposal detected
⚠️ Deadline Alert Voting ends in < 24 hours

πŸ—οΈ Architecture

dao_governance_tracker.py
β”œβ”€β”€ SnapshotClient      β†’ Snapshot GraphQL API (off-chain)
β”‚   β”œβ”€β”€ get_proposals()       β†’ fetch active/closed proposals
β”‚   β”œβ”€β”€ get_proposal_detail() β†’ single proposal full data
β”‚   β”œβ”€β”€ get_votes()           β†’ top voters per proposal
β”‚   └── get_space_info()      β†’ DAO followers & stats
β”œβ”€β”€ TallyClient         β†’ Tally GraphQL API (on-chain)
β”‚   └── get_proposals()       β†’ Governor Bravo proposals
β”œβ”€β”€ GovernanceAnalyzer  β†’ Core tracking engine
β”‚   β”œβ”€β”€ fetch_proposals()     β†’ fetch + format for one DAO
β”‚   β”œβ”€β”€ fetch_all_watched()   β†’ scan all watched DAOs
β”‚   β”œβ”€β”€ check_new_proposals() β†’ detect unseen proposals
β”‚   β”œβ”€β”€ check_ending_soon()   β†’ detect deadline < 24h
β”‚   └── get_dao_summary()     β†’ DAO stats overview
└── GovernanceBot       β†’ Telegram bot with 9 commands
    └── _monitor_loop()       β†’ background polling thread

πŸ“‘ Data Sources

Source Usage
Snapshot API Off-chain governance (no API key)
Tally API On-chain Governor proposals

πŸ›οΈ Supported DAOs

DAO Token Governance Type
πŸ¦„ Uniswap UNI Snapshot + Governor Bravo
πŸ‘» Aave AAVE Snapshot + Aave Gov V2
🏦 Compound COMP Snapshot + Governor Alpha
Ⓜ️ MakerDAO MKR Snapshot + DSChief
🌱 Gitcoin GTC Snapshot + Governor Bravo

βš™οΈ Configuration

Variable Default Description
POLL_INTERVAL 300s How often to check proposals
DEADLINE_ALERT_HOURS 24h Hours before deadline to alert
MIN_QUORUM_ALERT 50% Quorum percentage to alert

⚠️ Disclaimer

This tool is for informational purposes only. Always do your own research before participating in governance votes.


πŸ”§ Requirements

requests>=2.28.0

No Web3.py required β€” uses REST/GraphQL APIs only!


πŸ‘€ Author

Rizal β€” @rizalcodes

Building Web3 tools with Python πŸβ›“οΈ


πŸ“„ License

MIT License β€” free to use, modify, and distribute.

About

πŸ›οΈ DAO Governance Tracker β€” Monitor proposals & voting activity from Uniswap, Aave, Compound, MakerDAO & Gitcoin with real-time Telegram alerts. Built with Python, Snapshot API & Tally API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages