Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

Setting Up Alerts for Critical Governance and Community Metrics

A technical guide for developers to build automated monitoring for DAO health indicators like voter turnout, delegation concentration, treasury activity, and sentiment analysis.
Chainscore © 2026
introduction
INTRODUCTION

Setting Up Alerts for Critical Governance and Community Metrics

Learn how to monitor on-chain governance proposals, treasury movements, and community sentiment with automated alerts.

Effective governance is the backbone of a decentralized protocol's long-term health and security. For developers, researchers, and active community members, manually tracking every proposal, vote, or treasury transaction across multiple forums and blockchains is impractical. Automated alerts solve this by providing real-time notifications for critical events, enabling proactive participation and risk management. This guide covers how to set up monitoring for key governance and community metrics using on-chain data and public APIs.

The first step is identifying the specific metrics that matter for your protocol. Critical governance events include new proposal submissions, vote quorum thresholds being met or missed, and the execution of passed proposals that alter protocol parameters. For treasury management, alerts for large, unexpected withdrawals or multi-signature wallet actions are essential. Community health can be gauged by tracking metrics like the number of active voters over time, delegate concentration, and sentiment shifts in governance forums. Tools like Tally, Snapshot, and OpenZeppelin Defender provide structured data feeds for these events.

To implement alerts, you can use services that connect directly to blockchain nodes or indexers. For example, using the Chainscore API, you can programmatically query for new events on a governor contract. A basic code snippet to check for ProposalCreated events might look like:

javascript
const response = await fetch('https://api.chainscore.dev/events', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    address: '0xGovernorAddress',
    event: 'ProposalCreated',
    fromBlock: 'latest'
  })
});

This data can then trigger notifications via email, Discord, or Telegram.

Beyond raw event data, sentiment analysis on forum discussions (like Commonwealth or Discourse) can provide early warnings of community disputes or shifting priorities. While more complex, integrating natural language processing tools to scan proposal discussions for keywords related to security, contention, or urgency can add a valuable layer to your alert system. Combining on-chain execution alerts with off-chain sentiment analysis creates a comprehensive monitoring dashboard for governance risk.

Finally, establish clear response protocols for different alert types. A critical treasury withdrawal alert may require immediate multisig signer coordination, while a new proposal alert might simply trigger a calendar reminder for review. Documenting these procedures ensures that when an alert fires, your team or community knows exactly how to respond, turning passive monitoring into active governance stewardship and enhanced protocol security.

prerequisites
GETTING STARTED

Prerequisites

Before configuring automated alerts for governance and community health, you must establish the foundational infrastructure and data sources. This setup ensures your monitoring is reliable, secure, and actionable.

The first prerequisite is a secure wallet with a private key you control, such as MetaMask or a hardware wallet. This wallet will be used to authenticate with on-chain data providers and, if needed, to sign transactions for automated responses. Ensure it is funded with native gas tokens for the networks you intend to monitor (e.g., ETH for Ethereum, MATIC for Polygon). For production systems, consider using a dedicated, non-custodial vault solution like Safe for enhanced security and multi-signature controls.

Next, you need programmatic access to blockchain data. For real-time governance events like proposal creation or votes, you'll require an RPC node connection. Services like Alchemy, Infura, or QuickNode provide reliable HTTP and WebSocket endpoints. For querying historical data, social metrics, or aggregated protocol statistics, you will integrate with specialized APIs. Key providers include The Graph for indexed subgraph data, Dune Analytics for custom SQL queries, and platforms like Snapshot for off-chain governance data.

Your alerting logic will run in a serverless environment or a dedicated server. Common setups include AWS Lambda, Google Cloud Functions, or a long-running Node.js/Python process on a VPS. This environment must have network access to your chosen data providers and the ability to execute code on a schedule (cron) or in response to WebSocket events. You will also need to securely manage environment variables for your wallet's private key, API keys, and any destination webhook URLs.

Finally, define your notification channels. Decide where alerts should be sent: - Discord/Telegram/Slack for real-time team alerts using incoming webhooks. - Email for less critical, digest-style reports. - PagerDuty/OpsGenie for critical, on-call incidents. You will need the webhook URLs or API keys for these services. For maximum resilience, consider implementing a fallback channel; if a Discord webhook fails, the system could retry via Telegram or log a critical error to a monitoring service.

defining-critical-metrics
ALERT CONFIGURATION

Step 1: Defining Critical Metrics and Thresholds

Effective monitoring begins with identifying the specific on-chain and off-chain signals that indicate the health and security of your protocol's governance and community. This step focuses on selecting the right metrics and establishing actionable thresholds.

Governance and community health are not abstract concepts; they are measurable through specific, on-chain data points. For governance, the most critical metrics often revolve around voter participation and proposal velocity. You should track the percentage of circulating token supply that votes on proposals, as a sharp decline can signal voter apathy or a loss of stakeholder confidence. Simultaneously, monitor the rate of new proposal submissions and their lifecycle duration—a sudden halt or an abnormally fast execution can indicate manipulation or a broken process.

For the community layer, focus on metrics that reflect engagement and sentiment. Key indicators include the growth rate of unique governance token holders, the volume of discussions in official forums (like Commonwealth or Discourse), and sentiment analysis from social platforms. A significant drop in active forum participants or a spike in negative sentiment can be early warnings of a brewing controversy or a communication breakdown that may soon impact governance decisions.

Setting precise thresholds transforms raw data into actionable alerts. Avoid vague triggers like "low participation." Instead, define clear rules: "Alert if voter turnout falls below 15% for two consecutive proposals" or "Alert if the number of new token holders declines by 20% week-over-week." These thresholds should be based on historical baselines for your protocol. For example, if your DAO typically sees 25-40% turnout, a threshold of 15% is a meaningful deviation. Use a tool like Dune Analytics to query historical data and establish these benchmarks.

Consider creating tiered alert severities. A critical alert might fire for a multi-signature wallet executing a large, unexpected token transfer. A high-severity alert could be triggered by a governance proposal passing with anomalously low turnout. Medium-severity alerts might track negative sentiment trends. This prioritization ensures your team focuses on the most urgent signals first. The goal is to move from reactive monitoring to proactive governance risk management.

COMMON CONFIGURATIONS

Example Alert Thresholds for a DAO

Suggested trigger values for monitoring key governance and community health metrics.

MetricLow PriorityMedium PriorityHigh Priority

Voter Participation Rate

< 15%

< 10%

< 5%

Proposal Quorum Deficit

15%

30%

50%

Treasury Outflow (24h)

5% of TVL

10% of TVL

20% of TVL

Active Delegator Decline (7d)

10%

25%

40%

Governance Token Price Volatility (24h)

15%

30%

50%

Forum/Discord Activity Drop (7d)

30%

50%

70%

Failed Proposal Rate

20%

40%

60%

sourcing-data
DATA SOURCING

Setting Up Alerts for Critical Governance and Community Metrics

Learn how to programmatically source and monitor key governance and community signals from APIs and on-chain data to build effective alert systems.

Governance and community health are leading indicators for protocol success and risk. To monitor them effectively, you need to source data from two primary locations: off-chain APIs and on-chain smart contracts. Off-chain sources include platforms like Discord, Snapshot, and forum APIs (e.g., Discourse, Commonwealth) for proposal discussions, sentiment, and voter turnout. On-chain data, sourced via RPC nodes or indexers like The Graph, provides definitive records of proposal execution, treasury transactions, and delegate activity. Setting up alerts begins with identifying which metrics are critical for your analysis, such as quorum thresholds, voting power concentration, or sudden changes in forum activity.

For on-chain governance data, you'll typically interact with the protocol's governance contract ABI. Using a library like ethers.js or viem, you can query events like ProposalCreated, VoteCast, or ProposalExecuted. For example, to monitor for new proposals on a Compound-style governor, you would listen for the ProposalCreated event and parse its arguments for the proposal ID, proposer, and targets. This real-time data feed forms the backbone of an alert for new governance actions. Remember to use a reliable RPC provider with archival node support to ensure you don't miss historical events when initializing your listener.

Off-chain metrics require interacting with REST or GraphQL APIs. For sentiment analysis, you might fetch recent posts from a project's forum and use a simple lexicon-based scorer or a dedicated sentiment API. For engagement, track metrics like active contributors per week or reply velocity on governance threads. A practical step is to set up a cron job that polls these APIs at regular intervals, compares the new data against your defined baselines or thresholds, and triggers an alert if a condition is met—for instance, if the number of unique voters on a Snapshot proposal drops below 50% of the historical average.

The most powerful alerts combine on-chain and off-chain data to provide context. An on-chain alert for a large treasury withdrawal is useful, but coupling it with off-chain data showing no prior discussion in the governance forum significantly raises its severity. To build this, your system needs to correlate data across sources. For example, when your on-chain listener detects a ProposalExecuted transaction, your script should immediately query the forum API to check for a corresponding discussion thread and its sentiment score, then compile a single alert report. This integrated approach turns raw data into actionable intelligence.

Finally, implement the alert logic and delivery. Use a lightweight framework for defining conditions, such as if (voterTurnout < quorum) && (timeUntilEnd < 24h). Delivery channels can include Discord webhooks for community alerts, Telegram/Slack bots for internal teams, or PagerDuty for critical security events. Always include actionable details in the alert message: proposal links, relevant wallet addresses, and a summary of the anomaly. Regularly review and adjust your thresholds and data sources based on protocol upgrades and changes in community behavior to keep your monitoring system effective and relevant.

building-monitor-script
IMPLEMENTATION

Step 3: Building the Monitoring Script

This guide details how to construct a Node.js script to monitor critical on-chain governance and community metrics, automating alerts for key events and thresholds.

The core of your monitoring system is a script that periodically queries blockchain data and triggers alerts. We'll build this using Node.js, Ethers.js for Ethereum interaction, and a simple configuration file. Start by initializing a new project and installing dependencies: npm init -y and npm install ethers dotenv. Create a .env file for sensitive data like your RPC URL and alert webhook URLs. The main script will follow a loop: fetch data, evaluate conditions, and send notifications.

First, define the metrics and thresholds you want to monitor. Common governance metrics include: - Proposal state changes (e.g., from Active to Executed), - Quorum and vote differential thresholds being met, - New delegate registrations or significant voting power shifts. For community metrics, track: - Treasury balance drops below a safety minimum, - Protocol revenue anomalies, - Key contract upgrade events from the Timelock. Store these targets in a config.js file for easy adjustment.

Using Ethers.js, connect to your chosen RPC provider and the specific contract ABIs. For a Compound-style governor, you would need the GovernorBravoDelegate ABI. To monitor proposals, listen for the ProposalCreated, ProposalQueued, and ProposalExecuted events using filters or by polling the contract's state. Fetching the current state of an active proposal involves calling state(proposalId) and comparing it to the previous cached state to detect transitions.

Implement the alert logic. When a condition is met, such as a proposal entering a Defeated state or the treasury ETH balance falling by 10%, the script should format a clear message and send it to your chosen channel. For Slack, use the Incoming Webhooks API; for Discord, a similar webhook. Include essential details: proposal ID, new state, voting results, and a link to the block explorer like Etherscan. Use axios or node-fetch to make the POST request.

Finally, ensure the script runs reliably. Use a process manager like PM2 (pm2 start monitor.js --name governance-monitor) to keep it running and restart on crashes. Schedule it to execute every minute or five minutes using setInterval or a more robust scheduler like node-cron. Log all checks and sent alerts to a file for auditing. The complete script automates vigilance, turning manual dashboard checks into proactive, real-time notifications for your team.

configuring-alert-delivery
NOTIFICATION SETUP

Step 4: Configuring Alert Delivery to Discord/Telegram

Learn how to route your on-chain alerts to Discord channels or Telegram groups for real-time monitoring of governance proposals, whale movements, and community sentiment.

After defining your alert logic, the final step is to configure the delivery channel. Chainscore supports direct webhook integration with Discord and Telegram, the primary communication platforms for most Web3 communities. This ensures your team or community receives immediate, actionable notifications without manual dashboard checks. For example, you can configure a DAO_Governance alert to post a formatted message to a dedicated #governance-alerts Discord channel whenever a new proposal is submitted on Aave or Uniswap.

To set up a Discord webhook, navigate to your server's channel settings, select Integrations, and create a new webhook. Copy the generated webhook URL. In your Chainscore alert configuration, paste this URL into the Webhook Endpoint field. You can customize the alert message using a template that includes variables like {{protocol_name}}, {{event_type}}, and {{transaction_hash}}. This allows you to create informative messages such as: "🚨 New Snapshot proposal #{{proposal_id}} created for {{protocol_name}}. Voting ends in {{days_remaining}} days."

For Telegram, the process involves creating a bot via @BotFather to obtain an API token and your chat ID. Chainscore's API can then send POST requests to the Telegram Bot API endpoint (https://api.telegram.org/bot<token>/sendMessage). This is ideal for sending private alerts to a core team group or a public announcement channel. Ensure your alert payload is structured correctly, typically as a JSON object containing chat_id and text fields, to avoid delivery failures.

You can implement advanced routing logic by using different webhooks for different alert severities. For instance, critical alerts like a governance proposal reaching its quorum threshold could be sent to an #urgent channel with @here mentions, while informational alerts like a new forum post could go to a general #updates channel. This tiered system prevents alert fatigue and ensures high-signal events get immediate attention. Most alerting systems also allow you to test the webhook connection before saving the configuration.

For developers, here is a basic Node.js example using axios to simulate what Chainscore does when triggering a Discord webhook for a governance alert:

javascript
const axios = require('axios');
const WEBHOOK_URL = 'YOUR_DISCORD_WEBHOOK_URL';

const alertData = {
  content: `<@&ROLE_ID> New Proposal Alert`,
  embeds: [{
    title: 'Proposal #123 Live on Snapshot',
    description: 'Proposal to increase ETH staking cap is now live for voting.',
    color: 0x00ff00,
    fields: [
      { name: 'Protocol', value: 'Lido DAO', inline: true },
      { name: 'Ends In', value: '5 days', inline: true }
    ]
  }]
};

axios.post(WEBHOOK_URL, alertData)
  .then(response => console.log('Alert sent!'))
  .catch(error => console.error('Error:', error));

Once your webhooks are configured and tested, your alert pipeline is complete. You will now receive automated, real-time notifications directly in your team's communication hub. This setup is crucial for proactive community management and allows for rapid response to critical on-chain events, from executing a treasury transfer after a successful vote to monitoring for suspicious whale activity that could impact token price. Regularly review and update your webhook URLs and alert thresholds as your monitoring needs evolve.

automation-deployment
AUTOMATION AND DEPLOYMENT

Setting Up Alerts for Critical Governance and Community Metrics

This guide explains how to automate monitoring for key on-chain governance and community signals using Chainscore's API and webhook integrations.

Automated alerts are essential for proactive project management, allowing teams to respond instantly to critical events without manual monitoring. For governance, this means tracking proposal submissions, voting quorums, and execution statuses. For community health, key metrics include active voter count, delegate participation, and forum engagement. Setting up these alerts involves defining specific triggers based on on-chain data and configuring a notification pipeline to services like Discord, Slack, or email.

Chainscore provides a unified API to query these metrics across multiple protocols. For example, to monitor for new proposals on Arbitrum's DAO, you can poll the proposals endpoint. A more efficient method is to use webhooks, where Chainscore sends a POST request to your configured URL when an event occurs. The payload includes all relevant data, such as proposal ID, creator, and start block. This eliminates the need for constant polling and reduces latency in your alerting system.

Here is a basic Node.js example for setting up a webhook listener that logs new proposals and sends a Discord alert using the axios library. The server listens for POST requests from Chainscore, parses the incoming governance event, and forwards a formatted message to a Discord webhook URL.

javascript
const express = require('express');
const axios = require('axios');
const app = express();
app.use(express.json());

app.post('/chainscore-webhook', async (req, res) => {
  const event = req.body;
  console.log('New Proposal:', event);
  
  // Send alert to Discord
  await axios.post('YOUR_DISCORD_WEBHOOK_URL', {
    content: `🚨 New ${event.protocol} Proposal #${event.proposalId}: ${event.title}`
  });
  
  res.status(200).send('OK');
});

app.listen(3000, () => console.log('Webhook listener running on port 3000'));

Beyond simple notifications, you can build complex alert logic. For instance, trigger an alert only when a proposal's for votes surpass a 10% quorum threshold within the first 24 hours, indicating high early engagement. Or, monitor for a sudden 20% drop in weekly active delegates on Optimism, which could signal community disengagement. Chainscore's API allows you to query historical delegate data to establish a baseline and calculate these deviations programmatically before sending an alert.

For deployment, consider using serverless functions (AWS Lambda, Vercel, Cloudflare Workers) to host your webhook logic, ensuring high availability and scalability. Set up environment variables for your Discord webhook URL and Chainscore API key. Implement retry logic and error logging for failed notifications. Finally, test your integration by creating a mock proposal event using Chainscore's sandbox environment before connecting to mainnet data streams.

ALERTS & MONITORING

Troubleshooting Common Issues

Common problems and solutions for setting up alerts on critical governance and community metrics using Chainscore's monitoring tools.

If your alerts for new proposals, votes, or execution aren't firing, check these common issues:

1. Verify the Contract Address: Ensure the contract_address in your alert configuration matches the correct governance contract (e.g., the timelock or governor contract, not the token contract). 2. Check Event Signatures: Proposals are typically created via events like ProposalCreated. Confirm the event signature in your alert matches the ABI of the contract. Use a block explorer to verify the exact event name and parameters. 3. Review Alert Conditions: Your condition might be too restrictive. For example, filtering for a specific proposer address will miss proposals from other users. Start with a broader filter and refine it. 4. Network & RPC Health: Ensure your connected RPC endpoint (e.g., for Ethereum Mainnet) is synced and responsive. Chainscore relies on this connection to listen for events.

GOVERNANCE & COMMUNITY ALERTS

Frequently Asked Questions

Common questions and solutions for setting up real-time alerts on governance proposals, community sentiment, and protocol metrics using Chainscore.

The most critical governance metrics for real-time alerts are proposal creation, voting activity, and delegation changes. You should set up alerts for:

  • New Proposal Submission: Trigger when a new governance proposal is posted on platforms like Snapshot, Tally, or Compound Governance. Include the proposal ID and title.
  • Voting Thresholds: Alert when a proposal reaches a quorum (e.g., 4% of total supply) or a specific vote differential (e.g., For/Against split hits 60/40).
  • Large Delegation Shifts: Monitor for significant delegation changes (e.g., >1% of voting power) to delegates or whales, which can signal upcoming voting campaigns.
  • Execution State Changes: Track when a proposal moves from 'Active' to 'Queued' or 'Executed' on-chain.

Monitoring these metrics helps you react to governance events that could impact protocol parameters, treasury allocations, or upgrade schedules.

conclusion
IMPLEMENTATION

Conclusion and Next Steps

You have configured a system to monitor the health of your DAO. The final step is to operationalize these alerts and plan for continuous improvement.

Your alerting dashboard is now a live monitoring tool. The key to its value is proactive action. Configure your notification channels—such as Discord webhooks, Telegram bots, or email—to ensure the right team members are pinged immediately for critical issues like a quorum failure or a sudden drop in voter participation. For high-severity alerts, consider integrating with incident management platforms like PagerDuty or Opsgenie to enforce response protocols. Regularly review alert logs to identify false positives and fine-tune your thresholds.

To deepen your analysis, explore integrating on-chain data with off-chain sentiment. Tools like Snapshot's API or Tally's governance data can be combined with community activity metrics from Discord (using bots like Collab.Land) or forum platforms. This creates a 360-degree view: you can correlate a spike in forum proposals with on-chain voting volume, or detect sentiment shifts before they impact treasury allocations. Setting up a weekly or monthly report that aggregates these metrics can provide invaluable strategic insights for core contributors.

The blockchain ecosystem and your DAO's needs will evolve. Plan to audit and update your monitoring setup quarterly. New governance mechanisms (like optimistic voting), upgrades to your treasury management smart contracts (e.g., moving to a Zodiac Safe), or changes in your token's utility may require new metrics or adjusted alert logic. Subscribe to updates from your data providers (The Graph, Dune, Goldsky) and governance tooling providers to stay current. Finally, document your alerting playbook so that knowledge is retained as your contributor base grows.