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
CubeChain GroupLayerPurpose
DEXTradesEVM, SolanaDWDPer-trade DEX swap events
DEXTradeByTokensEVM, SolanaDWDDEX trades indexed by token (buy/sell side)
TransfersEVM, SolanaDWDToken transfer events
BalanceUpdatesEVM, SolanaDWDWallet balance change events
DEXPoolEventsEVM, SolanaDWDLiquidity add/remove events
TokenSupplyUpdatesEVM, SolanaDWDToken mint/burn events
BlocksEVM, SolanaDWDBlock-level data
TransactionsEVM, SolanaDWDTransaction-level data
TransactionBalancesEVM, SolanaDWDPer-transaction balance changes
InstructionsSolanaDWDSolana instruction data
InstructionBalanceUpdatesSolanaDWDInstruction-level balance changes
RewardsSolanaDWDValidator/staking rewards
DEXOrdersSolanaDWDDEX order events (limit orders)
EventsEVMDWDSmart contract event logs
CallsEVMDWDInternal call traces
MinerRewardsEVMDWDMiner/validator rewards
DEXPoolSlippagesEVMDWDPool slippage data
UnclesEVMDWDUncle block data
PairsTradingDWMOHLC candlestick data (cross-chain)
TokensTradingDWMPer-token trade statistics (cross-chain)
DEXPoolsEVM, SolanaDWSPool snapshots with current reserves
TokenHoldersEVM, SolanaDWSToken holder balances
WalletTokenPnLEVM, SolanaDWSPer wallet-token PnL
PredictionTradesEVM (Polygon)DWDPrediction market trades
PredictionManagementsEVM (Polygon)DWDPrediction market management events
PredictionSettlementsEVM (Polygon)DWDPrediction market settlements

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:
DEXTradesRecord {
  Block { Time, Slot, Height }
  Transaction { Hash, FeeInNative }
  Trade {
    Buy { Currency { MintAddress }, Amount, PriceInUSD, Account { Owner } }
    Sell { Currency { MintAddress }, Amount, Account { Owner } }
    Dex { ProgramAddress, ProtocolName }
  }
  Pool { Address }
  IsSuspect
}
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:
DEXTradeByTokensRecord {
  Block { Time, Slot, Height }
  Transaction { Signature, Fee, FeeInUSD }
  Trade {
    Currency { MintAddress, Symbol, Name }
    Amount, AmountInUSD, PriceInUSD, PriceInNative
    Side { Type, Currency { MintAddress }, Amount }
    Account { Owner }
    Dex { ProgramAddress, ProtocolName }
    Market { PoolAddress }
  }
}
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:
TransfersRecord {
  Block { Time, Slot }
  Transaction { Hash, Signer }
  Transfer {
    Currency { MintAddress }
    Sender { Address, TokenAccount }
    Receiver { Address, TokenAccount }
    Amount, AmountInUSD, PriceInUSD
  }
}
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:
BalanceUpdatesRecord {
  Block { Time, Slot }
  Transaction { Hash }
  BalanceUpdate {
    Currency { MintAddress, Decimals }
    Account { Address, Owner }
    PreBalance, PostBalance
    PreBalanceInUSD, PostBalanceInUSD
  }
}
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:
DEXPoolEventsRecord {
  Block { Time }
  Transaction { Signature }
  Pool {
    Market { Address, BaseCurrency { ... }, QuoteCurrency { ... } }
    Dex { ProgramAddress, ProtocolName }
    Base { PostAmount, ChangeAmount, PriceInUSD }
    Quote { PostAmount, ChangeAmount }
    LiquidityInUSD
  }
}
Use cases: Liquidity add/remove monitoring, pool TVL tracking, new pool detection.
Table: {chain}_token_supplies Selectors: tokenAddressKey Fields:
TokenSupplyUpdatesRecord {
  Block { Time }
  TokenSupplyUpdate {
    Currency { MintAddress, Decimals }
    PostBalance, MarketCapInUSD, PriceInUSD, FDVInUSD, TotalSupply
  }
}
Use cases: Mint/burn event tracking, supply change alerts, market cap history.
Table: {chain}_blocks Selectors: date Metrics: count, sum, avg, min, maxKey Fields:
BlocksRecord {
  Block {
    Time, Date, Height, Hash, ParentHash, TxCount
    # Solana-specific
    Slot, ParentSlot, RewardsCount
    # EVM-specific
    Number, Coinbase, GasLimit, GasUsed, BaseFee, Difficulty
  }
}
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:
TransactionsRecord {
  Block { Time, Slot, Height }
  Transaction {
    # Solana: Signature, Fee, FeePayer, Signer, Result { Success }
    # EVM: Hash, From, To, Value, Gas, GasPrice, Nonce, Type
  }
  Fee { ... }     # EVM EIP-1559 fee breakdown
  Receipt { ... } # EVM receipt 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:
TransactionBalancesRecord {
  Block { Time }
  Transaction { Hash, Index }
  TokenBalance {
    Address, TokenAccount
    Currency { SmartContract, Symbol, Name, Decimals }
    PreBalance, PostBalance, Change
    PreBalanceInUSD, PostBalanceInUSD, ChangeInUSD
    UpdateType
  }
}
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:
InstructionsRecord {
  Block { Time, Slot }
  Transaction { Signature }
  Instruction {
    Index, Depth, InternalSeqNumber
    Program { Address, Name, Method }
    Accounts       # Array of account addresses
    Data           # Raw instruction data
    CallPath, Logs
  }
}
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:
InstructionBalanceUpdatesRecord {
  Block { Time, Slot }
  Transaction { Signature }
  Instruction { Index, Program { Address } }
  BalanceUpdate {
    Currency { MintAddress, Decimals }
    Account { Address, Owner }
    Amount, AmountInUSD
    PreBalance, PostBalance
  }
}
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:
RewardsRecord {
  Block { Time, Slot }
  Reward {
    Address          # Validator/staker address
    Amount           # Reward amount in SOL
    AmountInUSD      # Reward value in USD
    PostBalance      # Balance after reward
    RewardType       # Type: voting, staking, etc.
    Commission       # Validator commission
  }
}
Use cases: Staking reward tracking, validator performance, reward history.
Table: sol_dex_orders Selectors: date, marketAddress, orderType, ownerAddress Metrics: count, sum, avg, uniqKey Fields:
DEXOrdersRecord {
  Block { Time, Slot }
  Transaction { Signature }
  OrderEvent {
    Type             # Order type (place, cancel, fill, etc.)
    Market { Address }
    Order { Id, BuySide, LimitPrice, Mint, Owner }
    Dex { ProgramAddress, ProtocolName }
  }
}
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:
EventsRecord {
  Block { Time, Number }
  Transaction { Hash, From, To }
  Log {
    SmartContract    # Contract emitting the event
    Index            # Log index in transaction
    Signature { Name, Signature }
    Topics           # Event topics array
    Data             # ABI-encoded event data
  }
}
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:
CallsRecord {
  Block { Time, Number }
  Transaction { Hash }
  Call {
    Index, Depth
    From, To
    Opcode          # CALL, DELEGATECALL, STATICCALL, CREATE, etc.
    Gas, GasUsed
    Input, Output
    Value           # ETH/BNB transferred
    Signature { Name, Signature }
  }
}
Use cases: Internal transaction tracing, contract interaction analysis, MEV detection.
Table: {chain}_miner_rewards Selectors: date, miner Metrics: count, sum, avg, min, maxKey Fields:
MinerRewardsRecord {
  Block { Time, Number, Hash }
  Reward {
    Miner
    TotalReward, TotalRewardInUSD
    BurntFees, DynamicReward, StaticReward
    TxFees, UncleReward
  }
}
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:
DEXPoolSlippagesRecord {
  Block { Time }
  Price {
    Pool { SmartContract, CurrencyA { ... }, CurrencyB { ... } }
    AtoB, BtoA             # Current prices
    AtoBMin, AtoBMax       # Price range
    SlippageBasisPoints    # Slippage in basis points
    Dex { ProtocolName }
  }
}
Use cases: Slippage monitoring, pool depth analysis, execution quality assessment.
Table: {chain}_uncles Selectors: date, miner Metrics: countKey Fields:
UnclesRecord {
  Block { Time, Number }
  Uncle {
    Index, Hash, ParentHash
    Miner, Difficulty, Number
    GasLimit, GasUsed, Timestamp
  }
}
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:
PairsRecord {
  Token { Address }
  Market { Network }       # Chain identifier (sol, eth, bsc)
  Block { Time }
  Interval { Time }        # Minute-bucket timestamp
  Price {
    Ohlc { Open, High, Low, Close }
  }
  Volume { Usd, Native }
  Stats { TradeCount, BuyCount, SellCount }
}
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:
TokensRecord {
  Token { Address }
  Market { Network }           # Chain identifier
  Block { Time }
  Interval { Time }            # Minute-bucket timestamp
  Volume { Usd, BuyVolumeUSD, SellVolumeUSD, Base }
  Stats {
    TradeCount, BuyCount, SellCount
    UniqueBuyers, UniqueSellers
  }
}
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:
DEXPoolsRecord {
  Pool {
    Address
    TokenAAddress, TokenBAddress
    ProgramAddress
    LiquidityUSD
    PriceAtoB, PriceBtoA
    LastUpdated
  }
}
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:
TokenHoldersRecord {
  Token { Address }
  Holder { Address }
  LatestBalance
  LatestBalanceUSD
  FirstSeen
  LastSeen
}
Use cases: Top holders list, holder distribution, whale tracking.
This Cube does not support dataset switching.
Table: {chain}_wallet_token_pnl Selectors: walletAddressKey Fields:
WalletTokenPnLRecord {
  Wallet { Address }
  Token { Address }
  BuyVolumeUSDState, SellVolumeUSDState
  BuyCountState, SellCountState
  FirstTradeState, LastTradeState
}
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:
PredictionTradesRecord {
  Block { Time }
  Transaction { Hash }
  Trade { Buyer, Seller, Amount, Price, Fee }
  Prediction {
    Condition { Id, Outcomes }
    Question { Id }
    Outcome, OutcomeToken
    Marketplace { ProtocolName }
    CollateralToken { SmartContract }
  }
}
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:
PredictionManagementsRecord {
  Block { Time }
  Transaction { Hash }
  Management {
    EventType, Description, Group
    Prediction { Condition { ... }, Question { ... }, Marketplace { ... } }
  }
}
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:
PredictionSettlementsRecord {
  Block { Time }
  Transaction { Hash }
  Settlement {
    EventType, Holder
    OutcomeTokenIds, Amounts
    Prediction { Condition { ... }, CollateralToken { ... }, Marketplace { ... } }
  }
}
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.
NeedRecommended CubeLayer
Individual trade eventsDEXTradesDWD
Per-token trade queriesDEXTradeByTokensDWD
Token transfer historyTransfersDWD
Candlestick / price chartsPairsDWM
Trade volume over timeTokensDWM
Current top holdersTokenHoldersDWS
Wallet PnL breakdownWalletTokenPnLDWS
Pool current stateDEXPoolsDWS
Liquidity eventsDEXPoolEventsDWD
Smart contract events (EVM)EventsDWD
Internal traces (EVM)CallsDWD
Solana instructionsInstructionsDWD
Prediction market tradesPredictionTradesDWD

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.