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 panel that is not yet fed by real data says so and stays empty. The amber tag marks the intended chart, never a number.
Data sources01 / as of 16 Oct 2026
| Source | Used for | Refresh |
|---|---|---|
| Metric public API | metadata (pools, tiers, fees, provider details, 24h analytics), bid_ask depth, factory settings | 30 s · 1 s open pool · hourly |
| Alchemy | newHeads per chain, Swap and BinSwapped logs on every pool (live tape, pulses), getLogs backfill of the last minutes; day 2 and 3: traces, archive binStates, Transfers API | push |
| DefiLlama | all-chain volume, all-time V0 + V1, TVL, per-chain DEX totals and rank | 15 min |
| Pyth Hermes | reference series for reference-vs-execution and markouts (day 2) | stream |
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 RHC router attribution falls back to the swap's sender and transfer paths and is marked heuristic. Day 1 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 "unlabelled", never guessed.
Known gaps and caveats03 / honest list
- Protocol spread fee: docs say 7.5%, onchain and factory-settings say 15%. The onchain value is shown.
- feesFiat from the API is shown as "spread earned" until it is reconciled against exact BinSwapped fee legs.
- APRs from the API annualise 24 h (and aprBps7d trails 7 d). They are not yield and ignore inventory risk.
- Markouts, when they ship, depend on the chosen reference feed.
- V0 history depends on DefiLlama's adapter addresses.
- Pipelines, Subgraphs and pending-tx coverage on BSC and RHC are unconfirmed.
- The swap tape is a session buffer from live logs plus a short backfill, not full history.
- Day 1 size in USD uses the API's token fiat prices at poll time.
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 on day 1, bp on day 2 | 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 | day 2 |
| 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 | Day 1 shows status and limit only | 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 | day 3 |
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 | day 2 |
| 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 | day 3 |
| LP edge | Spread earned − |markout| per horizon | derived | t + h | The honest LP number | day 3 |
| 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; next: call-tree caller from debug_traceTransaction | 24 h Swap log backfill, Alchemy Debug API | 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 on day 2 | live |
| Trust Ledger | Every fee, provider, admin and StopLoss change with before/after, proposer, executeAfter, timelock applied | Factory and extension events via Alchemy | live | Needs backfill from the factory deploy block | day 2 |
| Guardrail limits | StopLoss drawdownE6, velocity maxChangePerBlockE18, staleness limit, pause level, allowlists | Metric API extensionDetails | 30 s | Live readings from extension views on day 3 | 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 | day 3 |
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 | day 2 |