Skip to main content

Dune Queries

WalletWall uses Dune Analytics scheduled queries as a source-backed data layer for holder analytics, whale activity, and Quantum Intelligence signals. All Dune data is scheduled and cached — it is never live streaming.
Public docs use source aliases instead of deployment environment variable names. Runtime secret and query-ID configuration belongs in the private deployment environment, not Mintlify docs.

Holder Wall queries

48h Active Wallets

Public source alias: Active wallet feed Powers the Active Wallets tab in the Holder Wall treemap. Returns wallets that have been active within the last 48 hours, with balance and activity tier information. Used by: the Holder Wall API route (/api/holder-wall)

Whale Trades

Public source alias: Whale trade feed Powers the Whale Wallets tab in the Holder Wall treemap. Returns large-balance wallets with trade activity data. Used by: the Holder Wall API route (/api/holder-wall)

Whale Watcher queries

12-Week Active Wallets

Public source alias: 12-week activity feed Provides per-day activity data for the 12-week heatmap in the Whale Watcher workspace. Required row fields: Optional — falls back to 48h display when not configured.

Wallet Portfolio

Public source alias: Wallet portfolio feed Provides per-wallet token holdings or trading exposure for the wallet holdings strip. Two query shapes are supported. The API detects the shape from the columns present:
Shows the wallet’s current holdings denominated in USD.
Wallets not present in the result set silently show no holdings strip (inDataset: false).

Quantum Intelligence queries

These queries provide source-backed facts for the Quantum Exposure Score and its components. All four queries run on scheduled cadences and their results are cached.

walletwall_dormant_quantum_exposure_v1

Public source alias: Dormancy exposure feed
Suggested cadence: Weekly
Emits one row per wallet that is both dormant (no observed outgoing activity beyond a configurable threshold) and has implied ECDSA/secp256k1 signature exposure. Provides the primary data for dormant-holder quantum-exposure signals in the Holder Wall treemap and the Vault Readiness Card. Key output fields: Staleness threshold: 30 hours — show stale badge but do not hide signal.

walletwall_wallet_signature_exposure_v1

Public source alias: Signature exposure feed
Suggested cadence: Daily or on-demand per wallet
Emits per-wallet source facts for quantum-signature exposure heuristics. Used for single-wallet lookups in Whale Watcher and Coinstellation detail panels. Key output fields: Staleness threshold: 30 hours.

walletwall_quantum_value_at_risk_v1

Public source alias: Value-at-risk feed
Suggested cadence: Daily
Provides source-backed balance and supply-share facts for the valueAtRiskScore component of the Quantum Exposure Score. Key output fields: Staleness threshold: 30 hours. USD values are snapshots — present them as estimates.

walletwall_wallet_migration_readiness_v1

Public source alias: Migration readiness feed
Suggested cadence: Weekly
Emits migration-readiness signals and wallet structure facts. Feeds the migrationReadinessScore component and the migrationReadinessHints section of the Vault Readiness Card. Key output fields: Staleness threshold: 7 days — migration-readiness facts change slowly.

Stable Seer queries (drafts)

Draft SQL for two Stable Seer queries is maintained privately (not in these public docs):
  • Peg metrics — peg stability and deviation across major stablecoins
  • Liquidity flows — stablecoin inflows and outflows across major DeFi protocols
These are drafts for Ethereum and EVM-compatible chains. Solana holder analytics are excluded.

Freshness and staleness summary

All timestamps are surfaced to the UI via queryRunAt and the freshnessStatus / staleMessage mechanism in the Dune caching layer.

Integration pattern

Queries are consumed through the readOrCache() pattern in the Dune caching layer. Each query requires:
  1. A Dune saved query with a numeric query ID
  2. A private deployment configuration entry that maps the relevant public source alias to that saved query ID
  3. The configuration entry set in the deployment provider and local development environment
Missing query-ID configuration causes a "query ID not configured" warning to be appended to the API response’s metadata.warnings array, which is then promoted to a caveat on the Quantum Exposure Score via appendDuneSourceCaveats().

Guardrails

  • Dune data is scheduled/cached, never live. All outputs must be labeled as scheduled/cached in the UI.
  • No exploitability claims. Dormancy and signature exposure are migration-readiness heuristics, not statements that any wallet is currently quantum-exploitable.
  • No deanonymization. Entity labels are community/source-backed category labels only.
  • No investment advice. These signals are informational risk indicators.
  • Missing data returns Unknown / insufficient data, not fake precision.