Skip to main contentSkip to data table
Pharos

Data Flow Map

Source-to-UI map for Pharos stablecoin data, covering market prices, peg monitoring, liquidity, report cards, alerts, and generated public artifacts.

Overview

This map links each major Pharos data domain from upstream source to frontend consumption:

external source -> worker cron / sync -> D1 table or cache key -> API endpoint -> frontend hook -> page(s)

Core Flows

DomainExternal SourcesWorker Ingest / ComputeStorage LayerAPI SurfaceFrontend Hook(s)Primary UI
Stablecoin core list + pricesDefiLlama, CoinGecko, CMC, DexScreener, DexPaprika, CoinGecko Onchain, Alchemy Prices, Moralis token prices, Birdeye token prices, Pyth Network, Binance, Kraken, Bitstamp, Coinbase, RedStone, GeckoTerminal pool probes, Curve on-chain, protocol redemption quotes, Chainlink FX/commodity overlays, FX sources (Frankfurter, Open Exchange Rates, fawazahmed0/currency-api, ExchangeRate-API), and gold-api.com commodity referencesworker/src/cron/sync-fx-rates.ts, worker/src/cron/sync-stablecoins.ts, stage modules under worker/src/cron/sync-stablecoins/, worker/src/lib/address-price-providers/index.ts, worker/src/lib/authoritative-price-sources/, worker/src/lib/price-consensus.ts, worker/src/lib/price-validation.tscache keys: fx-rates, stablecoins; surface_publication_generations after migration for generic publication statusGET /api/stablecoins, GET /api/status (publicationHealth.surfaces["stablecoins"])useStablecoinsHomepage, Compare, Dependency Map, many cards, /status publication health
Aggregate stablecoin chartsDefiLlama aggregate chart history, D1 supply_history overlays for structural supplemental tracked assets, live stablecoins cache for the trailing pointworker/src/cron/sync-stablecoin-charts.ts + read-time hydration in worker/src/api/cache-handlers.tscache key: stablecoin-charts (+ live stablecoins cache at read time)GET /api/stablecoin-chartsuseStablecoinChartsHomepage charts
Stablecoin detail historyDefiLlama detail/chart, CoinGecko fallback, supply_history fallback pathsOn-demand detail handler plus worker/src/cron/snapshot-supply.ts / worker/src/api/backfill-supply-history.tsHandler-computed detail payload, per-coin D1 cache, supply_historyGET /api/stablecoin/:id for public detail-prefetch/API consumers; GET /api/supply-history for chart historyDetail page view model composes useSupplyHistory, useStablecoins, peg/liquidity/report-card/redemption/yield/stress/flow/blacklist/reserve hooks; usePrefetchStablecoin uses /api/stablecoin/:id for hover prefetchStablecoin detail market chart, Compare
Per-coin supply historyCached stablecoins payload snapshot, CoinGecko or DefiLlama backfillsworker/src/cron/snapshot-supply.ts, worker/src/api/backfill-supply-history.tssupply_historyGET /api/supply-historyuseSupplyHistory, useCompareDataModelStablecoin detail page, Compare
Depeg events + peg summaryStablecoin cache prices + DEX corroborationworker/src/cron/detect-depegs.ts (+ pending confirmation)depeg_events, depeg_pendingGET /api/depeg-events, GET /api/peg-summaryuseInfiniteDepegEvents, usePegSummaryDepeg page, homepage peg columns, detail cards
Depeg Duration Resolver + ReviewerConfirmed canonical depeg incidents, stablecoin metadata, supply history, DEWS, liquidity, redemption backstops, first-publication manifests, errata, and later canonical outcomesworker/src/cron/compute-depeg-resolver.ts plus worker/src/cron/compute-depeg-resolver-review.ts helper after DDRv2 sealing/publicationDDRv2 incident/link/lock-state/public-prediction/publication/errata tables, depeg_resolver_assessments, cache["depeg-resolver:snapshot"], cache["depeg-resolver-review:snapshot"], cache["ddr:repair-debt:v1"], worker_repair_tasks (ddr-repair-required-event)GET /api/depeg-resolver, GET /api/depeg-resolver-review, GET /api/status (dataQuality.repairDebt)useDepegResolver, useDepegResolverReviewDepeg page DDR and DDRR modules, /status repair-debt diagnostics
DEX liquidity + DEX implied pricesDefiLlama Yields, DefiLlama Protocols, Curve, Uniswap/Aerodrome/PancakeSwap subgraphs, protocol-native APIs (Fluid, Balancer, Raydium, Orca, Meteora), Fluid DexReservesResolver on supported EVM chains, Aerodrome/Velodrome Slipstream Sugar view contracts on Base/Optimism, plus CG/GT/DexScreener/CG Tickers -> [discovery cron] -> dex_pool_staging (D1)Discovery runs in worker/src/cron/dex-discovery/orchestrator.ts (t1/t2/t3 priority, backoff, staleness sorting, live FX/metal refs). At 10,40, sync-dex-liquidity-stage loads direct/API/subgraph/view-contract sources; its direct API phase owns serial provider execution plus circuit/timeout handling in worker/src/cron/dex-liquidity/orchestrator-phases/direct-api.ts. The stage merges fresh rows with confidence decay, constructs the exact ordered pool graph, and writes schema-v1 192-KiB chunks while releasing each serialized pool/profile object. The handoff includes the already-loaded trust-filtered primary-price map; if an observed asset is missing, the scoring consumer loads the strict cache once and fills only absent prices before primary-relative publication guards run. At 16,46, sync-dex-liquidity prefers the source slot six minutes earlier, reuses that exact stage when retrying after consumption, otherwise falls back to the newest ready stage within 55 minutes, consumes D1 only, scores/publishes, and then yields to charts. Direct pools use DexApiPool, source family direct_api, and outrank overlapping DL pools only under the existing exact/unique identity and volume rules.dex_pool_staging -> dex_liquidity_scoring_stages / dex_liquidity_scoring_stage_chunks -> dex_liquidity_run_rows / dex_liquidity_publication_generations -> published dex_liquidity, plus dex_liquidity_history, dex_prices, per-source cache["circuit:<source>"] breaker rows aggregated on read into providerCircuitHealthGET /api/dex-liquidity, GET /api/dex-liquidity-history, GET /api/status (publicationHealth.surfaces["dex-liquidity"], providerCircuitHealth, dependencyHealth.dependencies["dex-liquidity"])useDexLiquidity, useDexLiquidityHistoryLiquidity page, Compare, report-card inputs, /status liquidity health, provider-circuit health, publication-health, and dependency root-cause cards
Blacklist / freeze trackerEtherscan v2, TronGrid, RPC providers, frozen operator recovery manifestsworker/src/cron/sync-blacklist.ts + helper modules under worker/src/cron/blacklist/; guarded one-off recovery in worker/scripts/reconcile-night-watch-blacklist.tsblacklist_events, typed/generation-fenced blacklist_sync_state, blacklist_current_balances, blacklist_amount_repair_queue, blacklist_provider_scan_telemetry, blacklist_reconciliation_runsGET /api/blacklist, GET /api/blacklist-summary, GET /api/status (dataQuality.blacklistReconciliation)useBlacklistEventsPage, useBlacklistSummaryFreezeWatch page, public/admin recovery diagnostics
Mint/Burn flow trackerAlchemy logs (configured issuance chains; currently Ethereum plus native Arbitrum for USDai)worker/src/cron/sync-mint-burn.ts + worker/src/cron/mint-burn/run-state.ts, slot dispatch via worker/src/handlers/scheduled/mint-burn-slot.tsmint_burn_events, mint_burn_hourly, mint_burn_sync_stateGET /api/mint-burn-flows, GET /api/mint-burn-eventsuseMintBurnFlows, useMintBurnFlowsCoin, useMintBurnEventsFlows page, homepage flow snapshot, coin overlays
Live reserve compositionProtocol reserve APIs, dashboards, and on-chain/accounting reads via adapter-specific fetchesworker/src/cron/sync-live-reserves.ts; isolated recovery in worker/src/handlers/scheduled/reserve-recovery.tsreserve_composition, reserve_sync_state, generation-fenced worker_scheduled_checkpointsGET /api/stablecoin-reserves/:id, GET /api/report-cards/v9, GET /api/statususeStablecoinReserves, useReportCardsV9Stablecoin detail reserve card, report-card collateral quality inputs, reserve-drift/status surfaces
Redemption backstops + effective exitStablecoin cache, DEX liquidity snapshot, live reserve-sync metadata, and redeemability config registryworker/src/cron/sync-redemption-backstops.tsredemption_backstop, redemption_backstop_historyGET /api/redemption-backstops, GET /api/report-cards/v9useRedemptionBackstops, useReportCardsV9Stablecoin detail redemption card, report-card liquidity inputs
Stability Index (PSI)Stablecoin cache + active depeg state + DEWS stress breadthworker/src/cron/stability-index.ts, daily worker/src/cron/snapshot-psi.tsstability_index_samples, stability_indexGET /api/stability-index, GET /api/status (publicationHealth.surfaces["psi"], dependencyHealth.dependencies["psi"])useStabilityIndex, useStabilityIndexDetailStability Index pages, digest snapshot, /status publication/dependency health
DEWS stress signalsStablecoins + liquidity + blacklist + mint/burn + yield + PSI inputsworker/src/cron/compute-dews.tsstress_signals, stress_signal_history, stress_signals_latest, cache dews freshness sentinel, exact publication pointer cache["dews:published-generation"]GET /api/stress-signals, GET /api/status (publicationHealth.surfaces["dews"], dependencyHealth.dependencies["dews"])useStressSignals, useStressSignalDetailDepeg tracker risk panels, homepage radar snapshot, /status publication/dependency health
Yield intelligenceCanonical current report-cards:v9 publication for hourly scoring and API-time hydration, on-chain rate calls, DefiLlama pools, supplemental protocol snapshots, price fallbacks, benchmark feeds, and source-risk evidenceworker/src/cron/sync-yield-data.ts, worker/src/cron/sync-yield-supplemental.ts, helpers under worker/src/cron/yield-sync/, and worker/src/cron/fetch-tbill-rate.tsyield_data, yield_history, yield_publication_generations, source decisions, yield-rankings, benchmark and supplemental cachesGET /api/yield-rankings, GET /api/yield-history, GET /api/yield-adapter-manifest, GET /api/statususeYieldRankings, useYieldHistory, useYieldAdapterManifestYield page, stablecoin detail, methodology source monitor, and status health
Daily digestAnthropic Claude + PSI snapshot contextworker/src/cron/daily-digest.ts, worker/src/lib/telegram-digest-outbox.tsdaily_digest, exact-payload telegram_digest_outbox, + static build sync to data/digests.jsonGET /api/daily-digest, GET /api/digest-archive, GET /api/digest-snapshotuseDailyDigest, useDigestArchive, useDigestSnapshotDigest page + archive
Bluechip ratingsBluechip rating publicationsworker/src/cron/sync-bluechip.tscache key: bluechip-ratingsGET /api/bluechip-ratingsuseBluechipRatings/about/bluechip/, Compare, stablecoin badges, Screener Picker
USDS freeze statusUSDS contract storage/call probesworker/src/cron/sync-usds-status.tscache key: usds-statusGET /api/usds-statususeUsdsStatusUSDS status card
Public daily dataset snapshotsCompleted D1/cache artifacts: stablecoins cache, complete current canonical V9 Safety Score publication, prior-day PSI snapshot, exact published DEWS generation, and optional current DEX liquidity rows. The writer reloads and atomically fences the exact V9 publication identity before sealing the immutable row.worker/src/cron/snapshot-public-dataset.tspublic_snapshotsGET /api/snapshots/index, GET /api/snapshots/:date.json, GET /api/snapshot/:date/stablecoin/:idExternal integrations and historical dataset consumers
Safety Scores + dependency graphPeg summary, DEX liquidity, redemption backstops, reserves, attribution, stablecoin metadata, and reviewed dependencies; V9 consumes the publication-exact base input and peg-provenance seedworker/src/cron/prepare-safety-score-v9-input.ts, worker/src/cron/compute-safety-score-v9.ts, and fenced supply attributionPrivate inputs: report-cards:fixed-input:exact, report-cards:v9-peg-provenance-seed:exact, and the V9 attribution generation; canonical artifacts: report-cards:v9 and report-cards:v9:publication-healthGET /api/report-cards/v9, GET /api/statususeReportCardsV9Safety Scores, Portfolio, Dependency Map, homepage, Yield, status, digest, and Telegram
Status reliabilityInternal router probes + production-domain HTTP canaries + DB/cache-only structural canaries + status synthesisworker/src/cron/status-self-check.ts, worker/src/cron/data-invariant-canary.ts, worker/src/api/status.ts, worker/src/api/public-status-history.ts, static dependency registry shared/lib/data-dependency-registry.tsstatus_state, status_transitions, status_probe_runs, status_discrepancy_state, worker_canary_runs; derived dependencyHealth is response-onlyPublic: GET /api/health, GET /api/public-status-history; admin: GET /api/status, GET /api/status-history (canaries)Public: useHealth, usePublicEndpointProbes, usePublicStatusHistory; admin: useStatus, useEndpointProbes, useStatusHistory/status public health board, /admin operator dashboard
Telegram pulseTelegram subscribers, pending queue, usage analytics, and delivery diagnosticsworker/src/api/telegram-pulse.ts snapshot publisher on the five-minute Telegram lanecache key: telegram:pulse:snapshotGET /api/telegram-pulseuseTelegramPulse/pharoswatchbot/ pulse strip
Telegram risk alertsDEWS, depeg, safety, launch, and reserve snapshot deltas plus D1 direct/preset/global/snooze preference stateworker/src/cron/dispatch-telegram-alerts.ts, source-specific candidate/routing in dispatch-telegram-authoritative-planning.ts, durable manifest coordination in telegram-alert-target-plans/Immutable telegram_alert_source_events, source-resolution/candidate/plan/job/target lineage, exact telegram_pending_alerts transport rowsAdmin status/health and Access-gated Telegram operations APIs; no public mutation APINo direct client hookPrivate/group Telegram risk-alert delivery through the pending queue
Personalized Telegram daily recapCanonical tape_events plus existing D1 subscriber, direct-watchlist, preset, snooze, and global-family state; no provider/API or AI callsworker/src/cron/telegram-recap-planner.ts (DB-only due-page planner), worker/src/lib/telegram-recap-facts.ts, worker/src/lib/telegram-recap-ranking.ts, worker/src/lib/telegram-recap-formatting.tstelegram_recap_preferences, telegram_recap_targets, exact telegram_pending_alerts rows with source_type = personalized_recapNo public API; private commands and signed Mini App state/mutationMini App Settings Daily Recap sectionPrivate Telegram chats, one material recap message per local date
Chain analyticsStablecoins cache aggregate circulating buckets, chainCirculating buckets (already aggregated by DefiLlama), report card cache (safety scores for quality sub-factor)worker/src/api/chains.ts (compute on read from stablecoins + report-card D1 caches and emit freshness metadata); worker/src/cron/snapshot-chain-supply.ts writes daily totals to D1Live leaderboard: computed on-the-fly from D1 caches with _meta freshness; history: chain_supply_historyGET /api/chainsuseChains, useChainProfileData, useChainStablecoins/chains/ leaderboard, /chains/[chain]/ profile pages
Alt-peg / non-USD sharesupply_history rows for commodity-pegged and fiat non-USD stablecoinsworker/src/api/non-usd-share.ts computes historical aggregate shares on read from daily supply snapshotssupply_historyGET /api/non-usd-shareuseNonUsdShare/alt-pegs/ market-share chart and non-USD/commodity context
Timeline / Tape eventsDepeg, freeze, safety-score, PSI, DEWS, mint/burn, yield, methodology, cemetery, and lifecycle source tables/static registriesworker/src/cron/project-tape.ts projects source transitions through class-specific tape projectors on the DEWS/PSI DB-only lanetape_eventsGET /api/eventsuseEvents, useLatestEvents, useTimelineFeedData/timeline/ cross-class event feed and homepage timeline modules

The DEX flow has an additive measured-execution subflow. Pinned Uniswap V3 on Ethereum, Polygon, and Arbitrum, PancakeSwap V3, and Base Aerodrome Slipstream QuoterV2/factory RPC reads, the Fluid resolver adapter, reviewed Curve CryptoSwap get_dy pools, the Ethereum hook-free Uniswap V4 PoolManager/StateView/Quoter shadow adapter, the exact Ethereum legacy Curve 3pool StableSwap get_dy(int128,int128,uint256) deployment, native Solana Raydium CLMM/Orca Whirlpool exact quotes, and reviewed Tron SunSwap V2 factory/reserve plus SUN Smart Router or pinned V2 Router proofs enter worker/src/cron/measured-execution/ through the isolated sync-cl-exit-depth job. Fluid's address-only official ticker rows receive canonical tracked-token metadata only in the bounded target copy, and target construction admits only exact pools on pinned resolver deployments; unsupported chains and identity-poor discovery fingerprints remain unresolved. Curve CryptoSwap activation verifies pinned runtime code/dependency identities and the on-chain coins(i) order before active quotes can become score-eligible. The legacy 3pool path separately binds the pool and main-registry runtime hashes, registry LP token, registry and pool token order, and token decimals at the quote block. Its two counter-stablecoin directions are joined atomically, so a partial packet falls back to the existing reserve simulation instead of satisfying physical-pool coverage. The measured packet remains diagnostic until both directions have three complete and three successful fresh cycles. External pool metadata therefore cannot choose physical quote indices alone. The prior retained-pool target generation is stored in dex_measured_execution_targets; raw proof and validated quote profiles are generation-fenced in dex_measured_execution_quotes. The 10,40 source stage carries this target graph into its exact bounded D1 handoff. The 16,46 sync-dex-liquidity consumer prefers that source slot, reuses that exact stage when retrying after consumption, otherwise falls back to the newest ready stage within 55 minutes, and consumes only a published prior quote generation, exposing proof-free profiles and explicit capability gates through the existing DEX API before charts runs serially. Mature fresh last-known-good profiles can remain route-only across a temporary liquidity shortlist rotation, without re-entering aggregate liquidity inputs; for the 3pool the route compiler reconstructs both sibling directions from the same retained packet or admits neither. A measured target rotation or quote failure leaves an independently complete exact AMM model available instead of attaching a measurement gate to that fallback; unrelated capability gates and actual measured/exact conflicts still fail closed. Native Solana and Tron joins apply explicit reviewed active/shadow registry policy after full proof and current-target validation. Only active native profiles enter the P4 capacity compiler and physical-pool completeness denominator; shadow profiles retain activation-pending, and case-sensitive native pool identities remain case-sensitive through route selection. The reviewed wM/USDC Raydium CLMM policy still captures a pool segment and replays the direct quote's fee, output, and post-swap sqrt price, but it is shadow-only after the first post-activation scoring consumers exceeded the Worker memory limit. Generic Raydium, Orca, Meteora, and unreviewed measured cohorts remain score-ineligible while their activation evidence is pending. Fresh Solana LKG evidence is permitted only after explicit operational collection failure; semantic or malformed rows remain barriers. SunSwap V2's activation and rollback history is incident context only; current registry state is shadow and score-ineligible while target and quote collection continue for revalidation. A Smart Router response containing only multi-hop candidates may use the pinned V2 Router's exact direct-path quote; invalid direct candidates and missing, failed, stale, or identity-mismatched profiles remain target-level fail-closed. SunSwap census rows are excluded from liquidity scoring and price consensus; its latest-only TronGrid state reads are accepted only inside a bounded before/after block bracket.

The private report-cards:fixed-input:exact row is the deterministic compiler-input bridge. It retains the exact V8-shaped input schema only because V9 compilation and replay consume that structure; it is never served as a V8 rating.

Safety Score V9 supply attribution remains on the dedicated +8 trigger. Exact V9 input preparation now runs serially after each successful 16,46 DEX publication and receives that publication's generation ID; compilation runs at 22,52. If the DEX consumer throws, is locked, or deliberately withholds publication, the dependent preparation child records a neutral not-started skip instead of a second synthetic failure; a nominally successful DEX result without an exact generation still fails closed. Preparation rejects a snapshot that does not capture the expected DEX generation, and compilation re-reads the latest accepted DEX generation before enrichment and again before evaluation so an older candidate cannot publish. Delayed or overlapping invocations skip before loading their runner graphs. The supply-attribution producer due interval is quantized below the compiler acceptance window so the quarter-hour trigger grid produces roughly 30-minute healthy captures instead of a 45-minute beat. Compilation requires a finished same-version quarter-hour core slot. An ok slot admits directly; a degraded slot admits only when the durable publication ledger proves that the same Worker published the current stablecoins cache in that slot. The compiler then requires the fixed input's stablecoin timestamp to equal the live cache generation, so isolated row-coverage gaps can become asset-local V9 evidence without allowing stale or no-write stablecoin runs through.

The compiler requires matching fixed-input, peg-provenance, attribution, methodology, and evaluation-build identities. It then evaluates V9 and writes the accepted report-cards:v9 publication with matching health. Global or identity-level failures hold the prior accepted publication. A complete supply-attribution generation that belongs to the same fixed input but finished just after that input's scoring clock is treated as a neutral cadence defer instead of publishing an aggregate-only partial candidate; malformed, rejected, stale, registry, or inventory-incompatible attribution still fails closed through the normal publication gates and records a clause-specific reason. Asset-local producer failures do not freeze unrelated ratings while at least 90% of active assets remain unaffected, and tolerated partial publications remain cron-healthy while surfacing affected assets in metadata. The V9 compiler captures DEX, redemption, and live-reserve load health before fallback filtering. Immediately before canonical persistence, an acceptance fence combines those global source states, the existing active-result and rated-count floors, and newly binding producer-failed deterioration against the last accepted V9 envelope. Producer-failed deterioration becomes a global hold only when fewer than 90% of active assets remain unaffected; isolated failures above that healthy-coverage floor do not freeze unrelated ratings. The accepted publication and current health commit atomically. A held attempt updates only report-cards:v9:publication-health, leaving accepted ratings and timestamps unchanged. The V9-only supply-attribution enrichment may also bind an aggregate asset supply to a reviewed route-ID inventory. The wM observer requires the complete Ethereum, Arbitrum, Base, Plume, and Solana deployment packet, verifies pinned runtime/controller identities at fixed-clock blocks or slots, and conserves the existing aggregate supply while allocating it across routes. The Centrifuge observer applies the same all-or-nothing rule only to the allowlisted JTRSY and ACRDX burn/mint inventories: it binds every official EVM deployment to exact runtime code, a non-proxy implementation slot, and the authorized Centrifuge Spoke, then binds the official Token-2022 Solana mint to its exact direct authority in one finalized context. It never admits lock/mint or adapter inventories whose totalSupply() sums could double-count backing. The XAUT observer binds the configured Tether transparency disclosure to one finalized Ethereum token/treasury/adapter observation and the complete reviewed XAUt0 representation-group inventory. The issuer's totalAuthorized - notIssued amount is admitted as circulating liabilities only when finalized totalSupply() and treasury balanceOf() independently match the two disclosed inputs and quarantined supply is zero. It emits one non-group canonical row and one pooled group row carrying the exact locked share of circulating liabilities and common failure domains, without claiming destination-chain shares. Any missing, duplicate, stale, skewed, issuer/on-chain-mismatched, identity-mismatched, inventory-mismatched, materially unresolved, or non-conserving packet fails closed; V8 and public payloads remain unchanged. Reserve sync may carry a nested V9-only exact route attempt into the redemption-backstop preload and then the V9 extension. The first such path is FPI's Controller Pool observation, which is bound to the same successful issuer collateral adapter result and one pinned Ethereum block. Accepted and rejected attempts remain outside public V8 reserve, redemption, and report-card payload semantics. GET /api/report-cards/v9 exposes the canonical, fully identified V9 publication. The active frontend, yield, Telegram, chain analytics, and V9-compatible history all consume that publication directly. Held V9 remains available only as the last accepted API/UI snapshot with explicit held metadata. Current-data consumers, organic safety alerts, and organic history writes fail closed without falling back to V8; independent depeg and incident pipelines continue.

Scheduling Backbone

Cron expressions are deployed from worker/wrangler.toml; shared/lib/cron-jobs.ts owns canonical schedule/job metadata and shared/lib/scheduled-runner-registry.ts owns expression-to-runner dispatch. Use Worker Infrastructure: Cron Scheduling for execution details and npm run check:cron-sync / npm run check:cron-connections for the authoritative live inventory and connection-budget report.

Freshness Contract (Frontend)

API hooks that use useApiQuery follow the interval supplied by their caller:

  • staleTime = interval
  • refetchInterval = 2 * interval

Defined centrally in src/hooks/use-api-query.ts. Cron-backed hooks should pass the producer cadence unless a documented route-specific exception applies. Current exceptions include /api/health (1-minute diagnostic polling, not cron-backed) and /api/usds-status (15-minute UI polling over a daily source snapshot).

Notes

  • Core aggregate boundary: shared/data/stablecoins/listing-decisions.json classifies the catalog, while shared/lib/stablecoins/aggregate-registry.ts projects active core-stablecoin and cash-equivalent entries for monetary aggregates. PSI, digest market/supply totals, current homepage market cap, chain totals/history, and non-USD share consume that projection. Depeg, DEWS, price, per-asset history, and digest risk-signal lanes continue monitoring every active listing, including variants and stable-value investments. Client ranking filters use the compact listingClass field in coins.client.generated.json, not the full decision ledger. New PSI and digest snapshots identify the aggregate boundary as core-stablecoins-v1 so consumers can distinguish legacy rows.
  • DEX price bridge: The half-hourly DEX liquidity cron now rebuilds dex_prices.price_sources_json from the final retained priced-pool surface after dedupe, caps, scoring filters, and unit normalization, publishing one aggregate per protocol. The quarter-hourly pricing cron reads these via loadDexPriceSources() and promotes at most one individually-weighted consensus source per protocol: fluid-dex (weight 3), balancer-dex (weight 3), curve-dex (weight 3), uniswap-v3-dex (weight 2), uniswap-v4-dex (weight 2), raydium-dex (weight 2), orca-dex (weight 2), meteora-dex (weight 2), pancakeswap-dex (weight 2), aerodrome-dex (weight 2), velodrome-dex (weight 2). These promoted protocol sources only enter primary consensus when corroborated or when no non-DEX voices exist, and the overlapping dex-promoted aggregate (weight 1) is withheld whenever at least one promoted protocol candidate passes freshness and TVL validation for the same asset, even if that candidate is then excluded for lack of corroboration. The aggregate DEX fallback enters consensus only when no protocol candidate clears those pre-corroboration checks. DEX admission/merge skip reasons are emitted into logs and cron metadata so stale rows, malformed snapshots, TVL filters, missing registry mappings, and duplicate identities can be traced without scraping the raw tables.
  • Abort-aware high-volume publication: DEX liquidity and DEWS persistence pass the cron AbortSignal into chunked D1 batches, retrying D1 operations, and final freshness-sentinel guards. If timeout or lease-loss aborts the run after a partial batch, the run fails before publishing freshness:dex-liquidity, freshness:dews, or the exact DEWS publication pointer. Durable DEWS consumers, canaries, and freshness reporting use the pointer rather than raw MAX(computed_at) rows.
  • Cache passthrough endpoints include freshness metadata via _meta and/or X-Data-Age.
  • Chain profile pages intentionally coordinate two APIs: GET /api/chains for the summary card and GET /api/stablecoins for composition. The detailed sections stay hidden until both snapshots share the same updatedAt, which keeps incomplete or mismatched data from being presented as a full per-chain breakdown.
  • chain_supply_history remains a forward-only internal dataset until the post-2026-04-08 baseline. Earlier rows were written before shared chain-label canonicalization and are not approved for public charting.
  • /api/dex-liquidity is meta-aware on the frontend: the page uses worker freshness metadata (and degraded-run Warning headers) rather than client fetch time to assess staleness.
  • Liquidity history now carries coverageClass / coverageConfidence; trend and durability consumers should treat low-confidence snapshots as informational, not authoritative baselines.
  • dex_liquidity_history is retained for the public 365-day history window; older daily snapshots are pruned during successful sync-dex-liquidity persistence instead of living as an indefinite research archive.
  • Transient measured-execution, scoring-stage, liquidity-run, price-run, and pool-staging rows are pruned by their owning producers in bounded oldest-first D1 passes. Cleanup telemetry is additive to cron metadata and cleanup failure cannot invalidate an already successful publication.
  • Admin/backfill endpoints bypass edge cache via cacheBypass flags in shared/lib/api-endpoints/.
  • The stablecoins cache loader distinguishes ok, degraded, and error states. Operator-facing or published consumers (/status, daily digest, safety snapshot) now fail closed on non-ok cache reads instead of treating broken cache state as an empty valid dataset.
  • consensusSources flows from the price-consensus cron stage through the stablecoins cache → /api/stablecoins and /api/peg-summaryuseStablecoins / usePegSummary hooks → PriceTransparencyCard on the detail page and CoverageBadge source-count enrichment on the coverage page.
  • priceSourceConfidenceProfile flows from DEX-inclusive primary pricing through the stablecoins cache and /api/stablecoins. It is omitted for non-DEX prices and currently remains a data/API transparency field rather than a UI dependency.