crypto project measurement
Here’s a PostgreSQL CREATE TABLE statement that defines a crypto_community_metrics table, assuming you already have a coins table with a coin_symbol primary key.
CREATE TABLE crypto_community_metrics (
id SERIAL PRIMARY KEY,
coin_symbol VARCHAR(10) NOT NULL,
active_users INTEGER CHECK (active_users >= 0),
developer_commits INTEGER CHECK (developer_commits >= 0),
social_engagement_score INTEGER CHECK (social_engagement_score >= 0),
unique_token_holders INTEGER CHECK (unique_token_holders >= 0),
governance_participation INTEGER CHECK (governance_participation >= 0),
collected_at TIMESTAMPTZ NOT NULL DEFAULT now(),
CONSTRAINT fk_coin
FOREIGN KEY (coin_symbol)
REFERENCES coins (coin_symbol)
ON DELETE CASCADE
);
Explanation:
coin_symbol: Foreign key linking to the coins table.
active_users: Number of community members interacting across platforms.
developer_commits: Count of GitHub commits (can also be expanded into more dev metrics).
social_engagement_score: Aggregated metric from various social platforms.
unique_token_holders: Number of distinct wallet addresses.
governance_participation: Count of votes or active DAO participation instances.
collected_at: Timestamp of when the metrics were collected (defaults to current time).
CHECK constraints: Ensure all metrics are non-negative.
Let me know if you want to normalize any of these metrics into separate tables (e.g., tracking per platform or over time).
Ways to Collect Crypto Community Metrics
1. Active User Base
- Discord API:
/guilds/{guild.id}/members
(requires privileged intents)
- Telegram API:
getChatMembersCount
or use bots
- Reddit API: Query subreddit active user stats
- Community Forums: Scrape post frequency from platforms like Discourse
2. Developer Activity
- GitHub API:
GET /repos/{owner}/{repo}/commits
GET /repos/{owner}/{repo}/contributors
GET /repos/{owner}/{repo}/pulls?state=all
- Libraries:
octocrab
(Rust), PyGithub
(Python)
3. Social Media Engagement
- X (Twitter) API: Tweet counts, retweets, followers
- Reddit API: Subreddit post and comment stats
- YouTube Data API: Channel views, comments
- Coingecko / CMC: Community stats (limited detail)
- Scraping Tools:
Puppeteer
, Playwright
4. Token Holder Distribution
- Block Explorer APIs: Etherscan, BscScan, Polygonscan, Solana Explorer
- Query Types: Holder count, balance distribution, wallet concentration
- Libraries:
web3.py
, ethers-rs
, Alchemy SDK
5. Governance Participation
- Snapshot API: For off-chain voting
- Aragon, Tally, OpenZeppelin Governor: On-chain governance stats
- Aggregators: DAOscan, DeepDAO
- Metrics: Proposals created, voter turnout, voter power distribution
Automation Considerations
- Frequency: Daily, weekly, or monthly
- Storage: PostgreSQL with
timestamp
, or TimescaleDB
- Normalization: Scale metrics to a 0–100 range for comparison
-
CoinGecko
https://www.coingecko.com
Focus: Market data, developer activity, community engagement, and liquidity.
Key Metrics: Market cap, trading volume, GitHub commits, social media following.
-
Token Terminal
https://www.tokenterminal.com
Focus: Financial metrics and fundamental analysis of crypto protocols.
Key Metrics: Revenue, fees, P/E ratios, active developers.
-
CryptoRank
https://cryptorank.io
Focus: Market analytics, token sales, and fundraising history.
Key Metrics: ROI, token unlock schedules, fundraising rounds.
-
DeFiLlama
https://defillama.com
Focus: Total value locked (TVL) in DeFi protocols.
Key Metrics: TVL by protocol, chain-specific breakdowns, yield analytics.
-
Messari
https://messari.io
Focus: Institutional-grade crypto research and analytics.
Key Metrics: Project profiles, governance activity, market insights, KPIs.