A comprehensive real-time dashboard for monitoring stablecoin stability, supply dynamics, and market health across major stablecoins.
Stablecoins promise $1.00 stability but face constant market pressures. This dashboard provides professional-grade analytics to track peg deviations, supply changes, and overall health metrics across the stablecoin ecosystem.
Live Dashboard: stablecoin-health-monitor.streamlit.app
- Real-time deviation tracking from $1.00 target
- 30-day historical volatility analysis
- Risk assessment with automated alerts
- Stability ranking system
- Market cap distribution and dominance metrics
- 24-hour supply change tracking
- Concentration analysis (top 3 control metrics)
- Growth/contraction trend identification
- Composite health scores (0-100) based on multiple factors:
- Peg deviation penalties
- Market cap stability
- Trading volume considerations
- Volatility assessments
- Color-coded health status (Excellent/Good/Warning/Critical)
- Historical supply evolution trends
- Week-over-week mint/burn analysis
- On-chain supply distribution
- Integration with Dune Analytics
| Stablecoin | Symbol | Type | Backing |
|---|---|---|---|
| Tether | USDT | Centralized | Cash/Equivalents |
| USD Coin | USDC | Centralized | Cash/Equivalents |
| Dai | DAI | Decentralized | Crypto-Collateral |
| Binance USD | BUSD | Centralized | Cash/Equivalents |
| TrueUSD | TUSD | Centralized | Cash/Equivalents |
| Frax | FRAX | Algorithmic | Hybrid Model |
| Liquity USD | LUSD | Decentralized | ETH-Collateral |
| sUSD | SUSD | Synthetic | SNX-Collateral |
| PayPal USD | PYUSD | Centralized | Cash/Equivalents |
- Python 3.8+
- CoinGecko Pro API key
- Dune Analytics API key (optional, for on-chain data)
- Clone the repository
git clone https://github.com/yourusername/stablecoin-health-monitor.git
cd stablecoin-health-monitor- Install dependencies
pip install -r requirements.txt- Set up environment variables
Create a .env file in the project root:
COINGECKO_PRO_API_KEY=your_coingecko_pro_api_key_here
DEFI_JOSH_DUNE_QUERY_API_KEY=your_dune_api_key_here- Run the application
streamlit run app.pyThe dashboard will be available at http://localhost:8501
- Sign up at CoinGecko Pro
- Get your API key from the dashboard
- Add to
.envfile or Streamlit secrets
- Create account at dune.com
- Get API key from account settings
- Add to environment variables
Note: The app includes fallback data and will function without API keys, but with limited real-time capabilities.
- Fork this repository
- Connect to Streamlit Cloud
- Add secrets in Streamlit Cloud dashboard:
COINGECKO_PRO_API_KEYDEFI_JOSH_DUNE_QUERY_API_KEY
CoinGecko Pro API β Market Data β Health Scoring β Dashboard
Dune Analytics β On-chain Data β Supply Analysis β Visualizations
- 24-hour cache cycle - automatic refresh every 24 hours
- Global cache with threading locks - prevents multiple API calls from concurrent users
- API credit optimization - maximum 1 call per API per day regardless of traffic
- Fallback data system - embedded backup data ensures availability
- Health Scoring Algorithm: Multi-factor composite scoring system
- Real-time Data Pipeline: Optimized API fetching with error handling
- Professional UI: Modern gradient design with interactive visualizations
- Supply Analytics: Market cap analysis and dominance calculations
- Key market metrics and live insights
- Market dominance analysis (bar charts & pie charts)
- Comprehensive health analysis table with rankings
- Real-time peg status grid
- Historical deviation trends (30 days)
- Volatility rankings and stability scores
- Risk assessment alerts
- Current supply intelligence metrics
- Distribution and change visualizations
- Detailed supply breakdown table
- 12-week supply evolution trends
- Current week breakdown
- Week-over-week change analysis
The health score (0-100) considers multiple factors:
Peg Deviation (0-50 points penalty)
-
10% deviation: -50 points (Critical)
-
5% deviation: -35 points (Severe)
-
2% deviation: -20 points (Moderate)
-
1% deviation: -10 points (Mild)
-
0.5% deviation: -5 points (Minor)
Market Cap Stability (0-25 points penalty)
- Based on 24-hour market cap percentage changes
- Higher volatility = higher penalties
Volume & Liquidity (0-15 points penalty)
- Low trading volume penalty for coins <$100M daily volume
Score Ranges:
- 90-100: Excellent π’
- 75-89: Good π‘
- 60-74: Warning π
- 0-59: Critical π΄
- Frontend: Streamlit
- Visualizations: Plotly
- Data Processing: Pandas, NumPy
- APIs: CoinGecko Pro, Dune Analytics
- Styling: Custom CSS with modern gradients
- Deployment: Streamlit Cloud
- Market Data: CoinGecko Pro API
- On-Chain Data: Dune Analytics
- Global Market Data: CoinGecko Global API
- Backup Data: Embedded fallback dataset
- API Calls: Maximum 2 calls per day (1 CoinGecko + 1 Dune)
- Caching: Thread-safe 24-hour cache system
- Error Handling: Comprehensive fallback mechanisms
- Performance: Optimized for high-traffic scenarios
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
This dashboard is for informational purposes only and should not be considered as financial advice. Stablecoin investments carry risks, and past performance does not guarantee future stability. Always conduct your own research and consult with financial advisors before making investment decisions.
- Live Dashboard: stablecoin-health-monitor.streamlit.app
- Dune Dashboard: Stablecoin Supply Analysis
- CoinGecko API: pro-api.coingecko.com
Created by Jo$h - DeFi Analytics Specialist
For questions, suggestions, or collaboration opportunities, please send a DM on Telegram or X.
Remember: Past performance doesn't guarantee future stability. Use this tool as part of a comprehensive analysis approach.