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: api/holder-wall.js

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: api/holder-wall.js

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:
FieldDescription
addressWallet address
labelEntity label or category
categoryActivity category
tx_count_48hTransaction count in the last 48h
unique_receivers_48hUnique receiver count in the last 48h
usd_volume_48hUSD volume in the last 48h
last_seenLast observed activity timestamp
activity_tierOverall activity tier
activity_dayDate of the activity row
week_numberWeek number in the 12-week window
day_of_weekDay of week (0–6)
tx_count_dayTransaction count for this day
unique_receivers_dayUnique receivers for this day
usd_volume_dayUSD volume for this day
intensity_scoreComputed intensity for heatmap coloring
day_activity_tierActivity tier for this specific day
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 WalletHoldingsStrip component. Two query shapes are supported. The API detects the shape from the columns present:
wallet_address, token_symbol, token_address, balance, balance_usd
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 QuantumExposureCard. Key output fields:
FieldDescription
wallet_addressEVM wallet address (checksummed)
signature_exposure_statussignature_exposure_observed, no_outgoing_signature_observed, contract_wallet, or unknown
dormancy_bucketwarm_dormant_30_180d, cold_dormant_180_730d, or ancient_dormant_730d_plus
days_dormantDays since last observed outgoing transaction
balance_usdUSD-denominated balance at query execution time
entity_labelCommunity/source-backed category label
is_contractTrue if the address is a contract wallet
migration_readiness_hinte.g., safe_wallet_detected, account_abstraction_detected
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:
FieldDescription
is_contractTrue if address has deployed contract code
first_outgoing_tx_atTimestamp of first outgoing transaction; null if none observed
signed_tx_countCount of outgoing transactions
days_dormantDays since last activity; null if no activity observed
signature_schemeecdsa_secp256k1 for EVM EOAs; unknown for contracts
exposure_statusSame four-value enum as above
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:
FieldDescription
native_balance_usdNative asset (ETH) balance in USD
token_balance_usdERC-20 token balance in USD
total_balance_usdSum of native + token balances
top_token_symbolSymbol of the largest single token position
holder_rankHolder rank for this token at query time
supply_shareFraction of token supply held (0.0–1.0)
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 QuantumExposureCard. Key output fields:
FieldDescription
is_contract_walletTrue if the address is any contract-based wallet
contract_wallet_typesafe, gnosis_multisig, erc4337_aa, other_contract, or null
is_safe_walletTrue if wallet is a Gnosis Safe instance
is_account_abstraction_walletTrue if ERC-4337 AA is detected
recent_migration_signalTrue if a token migration or key-rotation event was observed
risky_approval_countCount of active ERC-20 approvals with unlimited or large allowances
Staleness threshold: 7 days — migration-readiness facts change slowly.

Stable Seer queries (drafts)

The docs/dune/queries/stable-seer/ directory contains draft SQL for:
  • stable_peg_metrics.sql — peg stability and deviation across major stablecoins
  • stable_liquidity_flows.sql — 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

QueryCadenceStaleness thresholdStale behaviour
walletwall_dormant_quantum_exposure_v1Weekly30 hoursShow stale badge; do not hide signal
walletwall_wallet_signature_exposure_v1Daily / on-demand30 hoursShow stale badge; keep last known value
walletwall_quantum_value_at_risk_v1Daily30 hoursShow stale badge; USD values are estimates
walletwall_wallet_migration_readiness_v1Weekly7 daysShow stale badge; facts change slowly
All timestamps are surfaced to the UI via queryRunAt and the freshnessStatus / staleMessage mechanism in api/_dune.js.

Integration pattern

Queries are consumed through the readOrCache() pattern in api/_dune.js. 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.