Skip to main content

What is a Cube?

A Cube is an analytical data model that maps to one or more OLAP database tables. Each Cube defines:
  • Dimensions — queryable fields organized in a nested hierarchy (e.g., Block.Time, Trade.Buy.Currency.MintAddress)
  • Selectors — shortcut filter arguments at the top level (e.g., tokenAddress) that simplify common filter patterns
  • Metrics — aggregation functions (count, sum, etc.) available on the Record type
  • Defaults — default filters and pagination limits applied automatically
When you query a Cube, activecube-rs compiles your GraphQL query into optimized SQL against the Cube’s backing table, which follows the naming pattern {chain}_{table_name} (e.g., sol_dex_trades, eth_transfers).

Cube Overview

25 Cubes are organized into three Chain Groups. Each Cube belongs to a data warehouse layer:
  • DWD (Detail) — raw per-event data, highest granularity
  • DWM (Aggregated) — pre-computed rollups (e.g., per-minute)
  • DWS (Summary) — highly aggregated snapshots
  • DIM (Dimension) — reference/lookup tables

EVM + Solana Shared Cubes

These Cubes are available in both the EVM and Solana Chain Groups.
Table: {chain}_dex_trades Default limit: 25 (max 10,000) Default filter: IsSuspect = false (bot/MEV trades excluded by default) Selectors: tokenAddress, walletAddress, poolAddress, dexProgram, date Metrics: count, sum, avg, min, max, uniqKey Fields:
Use cases: Trade history, wallet trade analysis, DEX volume breakdown, large trade detection.
Table: {chain}_dex_trades_enriched (UNION subquery — one row per trade side) Selectors: tokenAddress, sideType, poolAddress, dexProgram, date Metrics: count, sum, avg, min, max, uniqKey Fields:
Use cases: Per-token trade queries (both buy and sell sides), token volume analytics, efficient single-token filtering.
Table: {chain}_transfers Selectors: tokenAddress, senderAddress, receiverAddress, date Metrics: count, sum, avg, uniqKey Fields:
Use cases: Wallet transfer history, whale monitoring, exchange deposit/withdrawal tracking.
Table: {chain}_balance_updates Selectors: ownerAddress, tokenAddress, date Metrics: count, sum, avg, min, max, uniqKey Fields:
Use cases: Balance change tracking, position monitoring, accumulation/distribution detection.
Table: {chain}_dex_pool_events_enriched Selectors: poolAddress, tokenAddress, date Metrics: count, sum, avg, maxKey Fields:
Use cases: Liquidity add/remove monitoring, pool TVL tracking, new pool detection.
Table: {chain}_token_supplies Selectors: tokenAddressKey Fields:
Use cases: Mint/burn event tracking, supply change alerts, market cap history.
Table: {chain}_blocks Selectors: date Metrics: count, sum, avg, min, maxKey Fields:
Use cases: Block production monitoring, gas analysis (EVM), slot tracking (Solana).
Table: {chain}_transactions Selectors: date, txHash/txSignature, fromAddress, toAddress, feePayer, signer Metrics: count, sum, avg, min, maxKey Fields:
Use cases: Transaction lookup, gas/fee analysis, activity monitoring.
Table: {chain}_transaction_balances Selectors: date, address, currency Metrics: count, sum, avg, min, maxKey Fields:
Use cases: Per-transaction balance impact analysis, token flow tracing.
This Cube does not support dataset switching (no _realtime / _archive table variants).

Solana-Only Cubes

These Cubes are only available in the Solana Chain Group.
Table: sol_instructions_enriched Selectors: date, programId, txSignature Metrics: count, uniqKey Fields:
Use cases: Program interaction analysis, instruction-level debugging, protocol usage tracking.
Table: sol_balance_updates_enriched Selectors: date, tokenAddress, ownerAddress, programId Metrics: count, sum, avg, min, max, uniqKey Fields:
Use cases: Instruction-level balance impact analysis, program fee tracking.
This Cube does not support dataset switching.
Table: sol_rewards Selectors: date, address Metrics: count, sum, avgKey Fields:
Use cases: Staking reward tracking, validator performance, reward history.
Table: sol_dex_orders Selectors: date, marketAddress, orderType, ownerAddress Metrics: count, sum, avg, uniqKey Fields:
Use cases: Order book analysis, limit order tracking, market microstructure research.

EVM-Only Cubes

These Cubes are only available in the EVM Chain Group (eth, bsc, polygon).
Table: {chain}_logs_enriched Selectors: date, contractAddress, txHash, topic0 Metrics: count, uniqKey Fields:
Use cases: Smart contract event monitoring, protocol activity tracking, custom event filtering.
Table: {chain}_traces_enriched Selectors: date, txHash, toAddress Metrics: count, sum, uniqKey Fields:
Use cases: Internal transaction tracing, contract interaction analysis, MEV detection.
Table: {chain}_miner_rewards Selectors: date, miner Metrics: count, sum, avg, min, maxKey Fields:
Use cases: Validator/miner reward analysis, block reward trends, MEV revenue tracking.
Table: {chain}_dex_pool_slippages Selectors: date, poolAddress Metrics: count, avg, min, maxKey Fields:
Use cases: Slippage monitoring, pool depth analysis, execution quality assessment.
Table: {chain}_uncles Selectors: date, miner Metrics: countKey Fields:
Use cases: Uncle block analysis, network health monitoring (primarily Ethereum PoW historical data).

Trading Cubes (Cross-chain)

These Cubes are in the Trading Chain Group. They aggregate data across all supported chains (sol, eth, bsc) and include a chain dimension for filtering.
Table: Materialized views across chains ({chain}_ohlc_mv) Selectors: tokenAddress, chain, date Metrics: count, sum, avg, min, maxKey Fields:
Use cases: Candlestick charts, price history, volume analysis, cross-chain price comparison.
Table: Materialized views across chains ({chain}_token_trade_stats_mv) Selectors: tokenAddress, chain, date Metrics: count, sum, avg, min, maxKey Fields:
Use cases: Buy/sell pressure analysis, unique trader counts, volume trends, cross-chain token comparison.

Summary Cubes (DWS)

Summary Cubes provide highly aggregated, snapshot-style data for quick lookups.
Table: {chain}_dex_pools (DWS layer) Selectors: poolAddress, tokenA, tokenB Metrics: countKey Fields:
Use cases: Pool discovery, current liquidity rankings, pool metadata lookup.
This Cube does not support dataset switching or time-based filtering. It represents the latest snapshot of pool state.
Table: {chain}_token_holders Selectors: tokenAddressKey Fields:
Use cases: Top holders list, holder distribution, whale tracking.
This Cube does not support dataset switching.
Table: {chain}_wallet_token_pnl Selectors: walletAddressKey Fields:
Use cases: Wallet PnL per token, trading performance leaderboards, portfolio analysis.
This Cube does not support dataset switching.

Prediction Market Cubes

These Cubes are available in the EVM Chain Group, primarily used on Polygon for prediction market protocols.
Table: {chain}_prediction_trades Selectors: date, conditionId, questionId, marketplace Metrics: count, sum, avg, min, max, uniqKey Fields:
Use cases: Prediction market trade history, outcome pricing, marketplace volume.
Prediction Market Cubes do not support dataset switching.
Table: {chain}_prediction_managements Selectors: date, eventType, conditionId, questionId Metrics: count, sum, avg, min, max, uniqKey Fields:
Use cases: Market creation/resolution tracking, condition management events.
Table: {chain}_prediction_settlements Selectors: date, eventType, conditionId, holder Metrics: count, sum, avg, min, max, uniqKey Fields:
Use cases: Settlement tracking, payout analysis, position redemption monitoring.

Choosing the Right Cube

Pick the most aggregated Cube that satisfies your query. DWM/DWS Cubes are orders of magnitude faster than DWD Cubes for time-series and summary data.

Dataset Compatibility

Not all Cubes support the dataset parameter (realtime/archive/combined). The following Cubes always query the full table regardless of the dataset value:
  • TokenHolders, WalletTokenPnL, DEXPools (DWS layer — always latest snapshot)
  • TransactionBalances
  • PredictionTrades, PredictionManagements, PredictionSettlements
See Dataset & Aggregates for details.

Next Steps

Chain Groups

Understand the EVM, Solana, and Trading Chain Groups.

Filtering

Learn to filter with where and selector shortcuts.

Metrics & Aggregation

Aggregate data with count, sum, avg, min, max, uniq.