Methodology · every number, its formula, its source, its caveat
What this is00 / disclosure
DEVIATION is an unofficial terminal for Metric, built by @zerokn0wledge_. It is not affiliated with Metric. No Metric logo, wordmark or artwork is used. No token exists and this app does not speculate on one.
Everything is drawn as distance from one line: the oracle reference. A pool's price before spread is reference × (1 + deviation), where deviation is the position in the active bin. Metric calls that distance the deviation, which is where the name comes from.
Nothing on the site is estimated silently. A section that is not fed by real data yet is marked "coming soon" and stays empty.
Data sources01 / as of 16 Oct 2026
| Source | Used for | Refresh |
|---|---|---|
| Metric public API | Pool metadata: tiers, fees, provider details, extensions, 24h analytics. Live bid_ask depth. Factory settings. | 30 s · 1 s · hourly |
| Alchemy | newHeads per chain. Swap, BinSwapped, LiquidityAdded and LiquidityRemoved logs on every pool, live over WebSocket and backfilled over eth_getLogs for the rolling 24 h window. Factory and extension event history. | push · 60 s aggregates |
| DefiLlama | All-chain volume, all-time V0 + V1, TVL, per-chain DEX totals and rank, partner-chain volumes. | 15 min |
| Pyth Hermes | Reference price series for reference-vs-execution and markouts. | coming soon |
Alchemy coverage used02 / verified 16 Oct
| Capability | ETH | BSC | RHC |
|---|---|---|---|
| RPC, archive eth_call, eth_getLogs | yes | yes | yes |
| WebSockets (logs, newHeads) | yes | yes | yes |
| Transfers, Token, Prices APIs | yes | yes | yes |
| Debug and Trace (call-tree attribution) | yes | yes | no |
| Pending transactions | yes | verify | no |
No traces on Robinhood Chain, so router attribution there can only come from the swap's sender and transfer paths. Today, attribution on every chain uses the Swap event's indexed sender, which is the contract that called the pool, matched against a verified router list. Unknown callers are shown as "unlabelled", never guessed.
Known gaps and caveats03 / honest list
- Protocol spread fee: the docs say 7.5%, onchain and factory-settings say 15%. The onchain value is shown.
- "Spread earned" is the API's feesFiat until it is reconciled against the exact BinSwapped fee legs.
- APRs from the API annualise 24 h, and aprBps7d trails 7 d. They are not yield and ignore inventory risk.
- Trader identity is the recipient of the swap output. Aggregator settlement contracts show as contracts, flagged in the table.
- Router labels cover a small share of volume because Metric pools are called by aggregator executor contracts; those stay unlabelled until verified.
- History covers a rolling 24 h window for swaps and LP events. Longer history, retention and the weekday heatmap fill in as the worker keeps running.
- Swap size in USD uses the API's token fiat prices at poll time.
- Markouts, when they ship, depend on the chosen reference feed. V0 history depends on DefiLlama's adapter addresses.
- US sessions are computed in New York time; market holidays are not modelled yet.
- Analytics: a cookieless, self-owned Matomo instance counts page views and clicks on the Trade links. No cookies, no fingerprinting, Do Not Track is honoured, IPs are anonymised. Nothing is shared with third parties.
Price quality04 / metric dictionary
| Metric | Formula | Source | Freshness | Caveat | Status |
|---|---|---|---|---|---|
| Quoted spread (bp) | (ask / bid − 1) × 1e4 from bid_ask, Q64.64 decoded as ÷ 2^64 × 10^(dec0 − dec1) | Metric API bid_ask | 1 s open pool, 15 s others | Includes provider half spread and any per-bin fee; notional fee excluded | live |
| Deviation (bin) | curBinIdx from metadata; per swap: binIdx and posInBin from the packed Swap.details word | Metric API, Swap logs via Alchemy | 30 s / live | Bin width differs per pool; shown as bin index | live |
| Depth within N bp | Σ levelUsd of bid_ask levels with priceImpactE6 ≤ N × 100, both sides | Metric API bid_ask | 1 s | USD via API token fiat prices | live |
| Effective spread per swap | |exec − reference_at_block| / reference × 1e4 | Swap logs + Pyth Hermes | live | Reference feed choice matters | coming soon |
| Freshness and feed_down | Seconds since last reference update vs maxRefStaleness; feed_down minutes per day | Metric API priceProviderStatus; provider views over Alchemy | 30 s / live | Shows status and limit; live seconds-since-update is coming | live |
| Fresh-quote fill share, pick-off rate | Share of swaps executed on a quote older than the limit or before the block's update; cost = exec vs next reference | Block tx order + traces (ETH, BSC); block order only (RHC) | per block | RHC has no traces | coming soon |
Liquidity and LPs05 / metric dictionary
| Metric | Formula | Source | Freshness | Caveat | Status |
|---|---|---|---|---|---|
| TVL and turnover | tvlFiat; turnover = 24 h volume / TVL | Metric API, DefiLlama | 30 s / 15 min | All-chain TVL from DefiLlama, public-chain TVL from the API | live |
| LP events and wallets | LiquidityAdded/Removed logs per 24 h: adds, removes, providers, bins, USD from unscaled bin deltas × fiat price | 24 h log backfill via Alchemy | 60 s | A wallet adding through a vault shows the vault | live |
| Per-bin LP revenue | BinSwapped.fees high 128 bits (LP leg that stays in the bin), exact | BinSwapped logs via Alchemy | live | Scaled balances convert with token0ScaleMultiplier | coming soon |
| Markout | LP PnL = (exec − ref_{t+h}) × size for a trader buy, at h = 1 s, 10 s, 1 m, 5 m, 30 m, 1 h | Swap logs + Pyth Hermes | t + h | Depends on the reference feed | coming soon |
| LP edge | Spread earned − |markout| per horizon | derived | t + h | The honest LP number | coming soon |
| APR three ways | API 24 h annualised; aprBps7d; markout-adjusted | Metric API, derived | 30 s | Annualised 24 h, not yield; ignores inventory risk | live |
Flow and traders06 / metric dictionary
| Metric | Formula | Source | Freshness | Caveat | Status |
|---|---|---|---|---|---|
| Volume, swaps, average size | Σ analytics24h.volumeFiat, swapTxCount; live: |amount1| × token1 price per Swap log | Metric API, Swap logs | 30 s / live | QA: decoded Σ within 2% of the API over 24 h | live |
| Caller share, Flow River | Caller of pool.swap: the indexed Swap.sender vs a verified router list, aggregated chain → pool → caller over 24 h | 24 h Swap log backfill | 60 s | Executor contracts stay unlabelled until verified | live |
| Unique traders, size buckets | Distinct Swap.recipient per 24 h; <$1K, 1 to 10K, 10 to 100K, >$100K | 24 h Swap log backfill via Alchemy | 60 s | Recipient is a proxy for the trader; settlement contracts show as contracts; retention needs more than one day | live |
Curators and trust07 / metric dictionary
| Metric | Formula | Source | Freshness | Caveat | Status |
|---|---|---|---|---|---|
| Curator league | Pools, TVL, 24 h volume and fees grouped by pool admin | Metric API metadata | 30 s | Fees earned exact from ProtocolFeesCollected admin legs is coming | live |
| Trust Ledger | Every fee, provider, admin and StopLoss change with before/after, proposer, executeAfter, timelock applied | Factory and extension events via Alchemy | live | Indexed from each chain's factory deploy block | coming soon |
| Guardrail limits | StopLoss drawdownE6, velocity maxChangePerBlockE18, staleness limit, pause level, allowlists | Metric API extensionDetails | 30 s | Live readings from the extension views are coming | live |
Stocks08 / metric dictionary
| Metric | Formula | Source | Freshness | Caveat | Status |
|---|---|---|---|---|---|
| US market session | Pre 4:00 to 9:30, regular 9:30 to 16:00, post 16:00 to 20:00 New York time; weekend closed | clock | 30 s | Holidays not yet in the calendar | live |
| Session volume | Stock-pool swap volume bucketed by the New York session at the swap timestamp | 24 h Swap log backfill | 60 s | Holidays not modelled | live |
| Weekend premium, multiplier events, venue share | Weekend premium vs Friday close and Monday open; MultiplierOracle events; venue share per ticker | quotes history, oracle contract, DefiLlama | daily | — | coming soon |
Chains and competition09 / metric dictionary
| Metric | Formula | Source | Freshness | Caveat | Status |
|---|---|---|---|---|---|
| Share of chain DEX volume, rank | Metric 24 h / chain DEX 24 h; rank among DEX protocols on that chain | DefiLlama overview/dexs/{chain} | 15 min | DefiLlama's protocol list and chain slugs | live |
| All-time volume | V0 + V1 totalAllTime | DefiLlama summary/dexs/metric, metric-v0, metric-v1 | 15 min | V0 history depends on the adapter addresses | live |
| Protocol revenue | Exact from Swap.platformFees and ProtocolFeesCollected | logs via Alchemy | live | — | coming soon |