depeg-monitor
Watches major stablecoins across DEX and CEX venues and raises alerts when price drifts beyond your thresholds—informed by BIS / NBER run-risk framing.
Quick start
pip install -e .
depeg-monitor --config config/default.yaml
Features
- Multi-source: Uniswap V3 TWAP, Curve, Binance/Coinbase spot (extensible)
- Per-asset warn / critical thresholds
- Alerts: console, Discord, Slack, generic HTTP webhook
- Asyncio + aiohttp for high-throughput polling
Data flow
Sources (DEX + CEX)
↓ async fetch loop
Threshold compare
↓
Alert dispatcher → console / Discord / Slack / webhook
Example config
stablecoins:
- symbol: USDC
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: ""
interval_seconds: 30