How StableLens Works
StableLens combines reliable market data, real-time exchange rate feeds, and automated analysis to deliver a comprehensive view of stablecoin peg stability. Below, we explain exactly how our data pipeline, depeg detection, and scoring methodology work.
Data Pipeline
Collect
Market data
Normalize
Multi-currency
Analyze
Deviation detection
Classify
Severity scoring
Alert
Event creation
Real-Time Price Monitoring
StableLens continuously tracks USD prices for every stablecoin in our index using reliable market data providers. We sample prices at regular intervals throughout the day and preserve all historical data indefinitely for trend analysis.
Multi-Currency Peg Support
Not all stablecoins are pegged to the US dollar. StableLens supports stablecoins pegged to EUR, GBP, AUD, BRL, JPY, SGD, TRY, gold (XAU), and other reference assets. For non-USD stablecoins, we continuously fetch live foreign exchange and commodity rates to compute an accurate peg ratio.
Automated Depeg Detection
Our detection engine continuously monitors every stablecoin's price deviation from its peg target. When sustained price anomalies are detected, StableLens automatically opens a depeg event and classifies its severity. Events are resolved automatically once the peg is restored.
Stability Score
Every stablecoin receives a composite stability score from 0 to 100, calculated from its historical price behavior. The score weighs three components: average deviation, worst-case extremes, and time spent at peg, all normalized to the correct reference asset. Higher scores indicate tighter peg discipline.
Discovery & Enrichment
StableLens continuously discovers new stablecoins that meet our market cap threshold and automatically enriches each listing with metadata: descriptions, social links, contract addresses, exchange tickers, and trading pairs. This ensures our index stays comprehensive and up-to-date without manual curation.
Charts & Visualization
Our interactive charts provide deep insight into stablecoin behavior. For USD-pegged coins, you see the raw price trajectory. For non-USD coins, we offer both a Prices view (overlaying token price and reference market rate) and a Ratio view (the normalized peg ratio centered on 1.0), so you can instantly gauge peg health.
Severity Thresholds
Every price snapshot is evaluated against fixed percentage thresholds. Deviation is calculated as the absolute proportional difference between the observed price (or peg ratio for non-USD coins) and the peg target.
Small deviation from peg. Common during low-liquidity hours or minor market movements. Usually self-corrects quickly.
Noticeable deviation that warrants attention. May indicate emerging liquidity issues or market stress.
Significant loss of peg stability. Often correlates with protocol issues, large sell-offs, or market-wide stress events.
Near-total or total loss of peg. Indicates a fundamental failure of the stability mechanism. Historically rare for major stablecoins.
Formula: deviation = |pegTarget − observedPrice| ÷ pegTarget For non-USD stablecoins, observedPrice is replaced by the peg ratio (tokenPrice ÷ referenceAssetPrice), and pegTarget is 1.0.
Depeg Event Lifecycle
Depeg events are fully automated, from detection to resolution. Here's exactly how the lifecycle works.
Detection
When a stablecoin's price deviates more than 2% from its peg target across at least 2 consecutive price snapshots, a depeg event is automatically opened. The multi-snapshot requirement prevents false positives from momentary price spikes or data anomalies.
Tracking
While a depeg event is active, StableLens continuously updates the event record with the most extreme peg ratios observed (lowest and highest), and escalates the severity classification if the deviation worsens. This ensures the event record captures the full extent of the depeg.
Resolution
When the stablecoin's price returns to within 0.5% of its peg target, the event is automatically marked as resolved. The total duration is recorded, and the event becomes part of the stablecoin's permanent history for future reference.
Depeg Trigger
> 2%
deviation across 2+ snapshots
Resolution Trigger
≤ 0.5%
deviation = peg restored
Stability Score Breakdown
The 0–100 stability score is a weighted composite of three independent metrics. Each component is calculated using proportional deviation, so the formula works identically for $1 USD pegs, €1 EUR pegs, or $2,700 gold pegs.
Average Deviation
Measures the mean proportional deviation of all price snapshots from the peg target. A coin that consistently trades at $1.0002 scores higher than one that oscillates between $0.998 and $1.002.
Maximum Deviation
Captures the single worst deviation in the observed period. Even one brief spike to $0.95 will penalize this component. This prevents a coin with one catastrophic depeg from receiving an artificially high overall score.
Time in Range
The percentage of price snapshots that fall within 0.1% of the peg target. A coin that spends 99% of its time at exactly $1.00 earns nearly full marks here, rewarding sustained precision over time.
Rating Scale
Frequently Asked Questions
How often is price data updated?
Price data is sampled at regular intervals throughout the day. Each update fetches the latest aggregated exchange prices for all tracked stablecoins simultaneously.
What does the stability score mean?
The stability score is a composite rating from 0 to 100, where 100 represents a perfectly stable peg. It weighs three factors: average price deviation (40%), worst-case deviation (30%), and the percentage of time spent within 0.1% of the peg target (30%). Scores above 95 are considered "Excellent," 85–94 "Good," 70–84 "Fair," 50–69 "Poor," and below 50 "Critical."
What triggers a depeg event?
A depeg event is opened when a stablecoin's price deviates more than 2% from its peg target across at least 2 consecutive price snapshots. This multi-snapshot confirmation prevents false alerts from brief, transient price spikes.
How is the peg calculated for non-USD stablecoins?
For non-USD stablecoins (e.g., EUR, GBP, gold), we compute a peg ratio by dividing the stablecoin's USD market price by the live USD price of its reference asset (e.g., EUR/USD rate). A perfectly pegged coin has a ratio of 1.0, regardless of the underlying asset's USD value.
Can a depeg event's severity be upgraded?
Yes. If the deviation worsens while a depeg event is active, the severity is automatically escalated (e.g., from Moderate to Severe). Severity is never downgraded during an active event; the highest severity observed is retained.
When is a depeg event resolved?
A depeg event is automatically resolved when the stablecoin's price returns to within 0.5% of its peg target. The event is then permanently recorded with its full duration, peak deviation, and severity for historical analysis.
Does StableLens accept payments from stablecoin issuers?
No. StableLens does not accept payments, sponsorships, or incentives from any stablecoin issuer. All severity classifications and stability scores are fully automated and applied uniformly across all tracked assets.
How are stablecoins added to the index?
Stablecoins are automatically discovered through market scans that look for assets above a market capitalization threshold. Once discovered, they are enriched with metadata (descriptions, contract addresses, exchange listings, and social links) and immediately begin receiving price monitoring.
Built for Transparency
StableLens is committed to providing accurate, unbiased data about stablecoin peg stability. Our methodology is designed to be objective and consistent. We do not accept payments from stablecoin issuers, and our severity classifications are fully automated.
Important Disclaimer
While we strive for accuracy, our stability scores, peg deviation calculations, depeg event detections, and severity classifications are generated by automated algorithms and mathematical formulas that may occasionally produce incorrect or misleading results. Factors such as rounding errors, data feed delays, software bugs, or edge cases in our scoring logic can lead to inaccurate outputs.
The data on StableLens is provided for informational purposes only and should not be relied upon for financial or investment decisions. Always verify information independently before taking action.
If you spot an error in any score, calculation, depeg event, or data point, we encourage you to let us know so we can review and correct it.
Report an Inaccuracy
Include the stablecoin name, the metric in question, and any supporting details.