Skip to content

firedintern/stablecoin-heatmap

Repository files navigation

Stablecoin Smart Money Heatmap

A data-driven tool to track stablecoin flows across blockchain ecosystems and identify "smart money" movements using DefiLlama data.

Thesis

  • Stablecoins are the main liquidity leg in DeFi
  • When stablecoin balances move between chains, it signals capital rotation into/out of ecosystems
  • Concentration in reputable venues (Aave, Curve, Maker) vs random farms = proxy for "smart money" behavior
  • Combining chain-level netflows + venue-level TVL gives early signals on where serious capital is rotating

Features

  • Fetch historical stablecoin circulation data by chain
  • Calculate netflows (inflows/outflows) to detect capital rotation
  • Track TVL in major DeFi protocols (smart money venues)
  • Generate smart money scores based on venue concentration × netflow strength
  • Interactive heatmap visualizations showing chains over time
  • Export data to CSV for custom analysis

Quick Start

Installation

pip install -r requirements.txt

Run Full Analysis

Generate all visualizations and metrics:

python3 main.py

Output saved to output/ directory:

  • Interactive HTML heatmaps and charts
  • CSV data files for further analysis

Ad-Hoc Analysis

Quick chain analysis:

# Analyze a single chain
python3 analyze.py --chain Ethereum

# Compare multiple chains
python3 analyze.py --compare Arbitrum Base Optimism

# Show top N chains
python3 analyze.py --top 10

Key Metrics Explained

Smart Money Score

Combines netflows (capital rotation) with concentration (% in major protocols).

High score = Strong inflows + High concentration in reputable venues (bullish signal)

Concentration Ratio

Percentage of stablecoins deposited in major protocols (Aave, MakerDAO, Uniswap, etc.) vs total stablecoin supply.

High concentration = More institutional/"smart" capital Low concentration = More retail/speculative activity

Netflows

Daily change in stablecoin supply, smoothed over 7-day window.

Positive = Inflows (capital entering the chain) Negative = Outflows (capital exiting the chain)

Current Findings (Jan 2026)

Top Smart Money Chains:

  1. Arbitrum (15.4) - Strong inflows + 32% concentration
  2. Avalanche (14.7) - Healthy growth + 31% concentration
  3. Base (13.4) - Massive inflows + 25% concentration

Notable Trends:

  • Base seeing explosive 37% annual growth
  • Ethereum losing stables to L2s (-2.3% monthly)
  • Solana experiencing -9.2% outflows
  • Tron dominates supply ($84B) but zero DeFi usage

See RESULTS_SUMMARY.md for detailed analysis.

Project Structure

stablecoin-heatmap/
├── main.py              # Main analysis pipeline
├── analyze.py           # Quick analysis CLI
├── src/
│   ├── config.py        # Configuration
│   ├── api_client.py    # DefiLlama API client
│   ├── data_processor.py # Metrics calculation
│   └── visualizer.py    # Plotly visualizations
├── data/                # Cached API responses
└── output/              # Generated visualizations

Documentation

  • QUICKSTART.md - Installation and usage guide
  • RESULTS_SUMMARY.md - Latest analysis results
  • PROJECT_STRUCTURE.md - Detailed technical documentation

Customization

Edit src/config.py to:

  • Add/remove chains to track
  • Change smart money protocols
  • Adjust time windows and parameters

Data Sources

All data sourced from DefiLlama API

  • Free and open API
  • No authentication required
  • Data cached locally for 6 hours

About

Stablecoin heatmap flow (DefiLlama API)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors