Most stablecoin trackers use a single price source. That's fine until that source has an outage, a bad tick, or gets manipulated.
For PegCheck I pull from CoinGecko, Coinbase, Binance, Kraken and DefiLlama, then take the median. Single source outages don't affect the result, and it filters out obvious bad data automatically.
A few things I learned building it:
Binance and Kraken don't list many of the smaller stablecoins so you end up with 2-3 sources for coins like RLUSD and FDUSD rather than the full 5.
DefiLlama's stablecoin endpoint is underrated, good coverage and reliable uptime.
CoinGecko free tier rate limits will catch you out if you're not caching properly.
The spread between sources is actually a useful signal in itself, when sources start disagreeing it's often an early warning sign before a full depeg shows up.
Happy to go deeper on the architecture if anyone's interested.
pegcheck.uk"
Built a 5-source median price feed for stablecoin monitoring — here's what I learned…
byu/Used-Breakfast8478 inCryptoTechnology
Posted by Used-Breakfast8478