Live at stablecoin.io
Real-time peg health and risk scores for 50+ stablecoins. Tracks price deviation from $1.00, market cap, mechanism type (fiat-backed, CDP, algorithmic, RWA), chain distribution, and exchange availability.
- Peg health — live price vs $1.00 with color-coded deviation bands (0–0.5%, 0.5–2%, 2%+)
- Risk scores — composite score factoring peg deviation, mechanism type, market cap, and volume
- Mechanism classification — fiat-backed, CDP, algorithmic, RWA, hybrid
- Chain distribution — number of chains and chain logos per stablecoin
- Exchange availability — which major exchanges list each stablecoin
- Market cap and volume — 24h data from CoinGecko, circulating supply from DeFi Llama
Also embedded as the third tab on shitcoin.io.
Single-file Cloudflare Worker. No database, no backend framework.
index.html — all UI, data, and logic (~1200 lines)
worker.js — Cloudflare Worker: routing, proxy, legal pages, SEO
build.js — inlines index.html into worker.js → worker.dist.js
wrangler.toml — Cloudflare deploy config
Proxy layer — the worker proxies two APIs through allowlisted endpoints:
| Route | Upstream | Allowed endpoints |
|---|---|---|
/llama/* |
DeFi Llama stablecoins API | /stablecoins |
/cg/* |
CoinGecko API v3 | /coins/markets |
Responses are cached via the Cloudflare Cache API with stale-while-revalidate.
The stablecoin project shares the dev server pattern with shitcoin.io. For local development, clone the shitcoin repo and use its server.js (which supports the /llama/ proxy route), or serve index.html directly and update the fetch URLs to point at the upstream APIs.
git clone https://github.com/heathermhuang/stablecoin.git
cd stablecoin
# Use the shitcoin server.js if available, or open index.html directlyDeploy to Cloudflare Workers via Wrangler. The stablecoin project does not have its own node_modules — use Wrangler from the shitcoin project or install globally:
npm install -g wrangler
node build.js # inlines index.html → worker.dist.js
wrangler deploy # deploys to CloudflareRequirements:
- Cloudflare account with Workers enabled
wrangler login- Domain pointed at Cloudflare
| Data | Source |
|---|---|
| Peg price, circulating supply, chain list | DeFi Llama Stablecoins API (public, no key) |
| Market cap, volume, coin icons | CoinGecko API v3 (free tier, no key) |
| Chain logos | DeFi Llama icons CDN |
Contributions welcome. The most useful work is:
- Adding missing stablecoins — edit the
SC_HARDCODEDarray inindex.htmlwith the coin's DeFi Llama ID, CoinGecko ID, mechanism type, and exchange list - Fixing mechanism classifications — fiat/CDP/algo/rwa labels in the hardcoded list
- Improving risk scoring — the
scCalcRiskfunction inindex.html
Open a PR with any changes. Please keep the project dependency-free.
- shitcoin.io — Binance and Coinbase delisting monitor (source)
This site does not provide financial advice. Stablecoin peg data is for informational purposes only. Stablecoins can and do lose their peg. Do not rely on this data for financial decisions.
MIT — see LICENSE.