8000 GitHub - alexanderxfgl-bit/depeg-monitor: Real-time stablecoin depeg detection and alerting across DEXes and CEXes. Tracks USDT/USDC/DAI, fires alerts on configurable thresholds. · GitHub
[go: up one dir, main page]

Skip to content

About

Real-time stablecoin depeg detection and alerting across DEXes and CEXes. Tracks USDT/USDC/DAI, fires alerts on configurable thresholds.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

depeg-monitor

Real-time stablecoin depeg detection and alerting. By kcolbchain (est. 2015).

Why this exists

Stablecoin depegs can cascade into billions in losses within hours (USDC/SVB 2023, UST 2022). Existing monitoring tools are either proprietary or delayed. This tool watches USDT/USDC/DAI across DEXes and CEXes in real-time and fires alerts the moment price deviates beyond your threshold.

Built on findings from the BIS and NBER stablecoin run-risk research (2025).

Quick start

pip install -e .
depeg-monitor --config config/default.yaml

Features

  • Multi-source: Uniswap V3 TWAP, Curve pool prices, Binance/Coinbase spot APIs
  • Configurable thresholds: Warning at 0.5%, critical at 1%, custom per-stablecoin
  • Multiple alert channels: Console, Discord webhook, Slack webhook, generic HTTP
  • Async: Built on asyncio + aiohttp for high-throughput monitoring
  • Extensible: Add new price sources or alert channels by implementing a base class

Architecture

Sources (DEX + CEX)
    ↓ async fetch
Monitor loop (configurable interval)
    ↓ compare against thresholds
Alert dispatcher
    ↓ fan-out
Console / Discord / Slack / Webhook

Config

stablecoins:
  - symbol: USDC
    peg: 1.0
    warn_threshold: 0.005    # 0.5%
    critical_threshold: 0.01  # 1.0%
  - symbol: USDT
    peg: 1.0
    warn_threshold: 0.005
    critical_threshold: 0.01

sources:
  cex:
    - binance
    - coinbase
  dex:
    rpc_url: "https://eth.llamarpc.com"

alerts:
  console: true
  discord_webhook: ""  # optional
  slack_webhook: ""    # optional

interval_seconds: 30

License

MIT

About

Real-time stablecoin depeg detection and alerting across DEXes and CEXes. Tracks USDT/USDC/DAI, fires alerts on configurable thresholds.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0