Concrete — Complete GuideIndependent guide, unofficial

05

Subgraph & events (The Graph)

Level: Advanced · Based on the Earn V2 subgraph docs.

Topology

  • One subgraph deployment per chain (docs list Ethereum mainnet, Arbitrum One and Stable). Data is not aggregated across chains.
  • Root data source: `ConcreteFactory` (exactly one per chain). Each vault is tracked as a `ConcreteVault` template instance created when the factory emits Deployed or VaultRegistered.
  • Vaults deployed elsewhere can be registered into the factory registry; history before registration is not available (deploy a temp subgraph and import if you need it).

Entities

EntityNotes
Factoryid, vaultCount, derived roleMembers.
VaultName, symbol, decimals, isAsync, underlyingAsset, totalSupply, cachedTotalAssets, sharePrice, fee totals, historical deposits/withdrawals, created-at info, derived strategies; async-only: isQueueActive, currentEpoch, latestProcessedEpoch, pastEpochUnclaimedAssets, *EpochRequestedShares, withdrawalQueue, epochs.
WithdrawalQueuePer user per epoch pending requests; created on QueuedWithdrawal, updated on claim/move, deleted on RequestCancelled.
PartialEpochRequestProcessedImmutable record of a request fulfilled from a closed-but-unprocessed epoch (needs WITHDRAWAL_MANAGER).
PriorityWithdrawalClaimedImmutable: shares, grossAssets, unwindCost, netAssets, epochID.
Account / SharesBalanceUser positions. lastActivityTimestamp updates on Deposit/Withdraw only - not on plain Transfer.
Strategyvault (nullable), strategyType, allocatedValue.

Aggregations (daily)

NewUserStats (per vault), NewUserGlobalStats (protocol-wide), VaultStats (last totalSupply, cachedTotalAssets, sharePrice per day), VaultFeesStats (daily + cumulative management/performance fees).

Tracked events (headline set)

Deposit, Withdraw, YieldAccrued, ManagementFeeAccrued, PerformanceFeeAccrued, QueuedWithdrawal, RequestCancelled, RequestClaimed, RequestMovedToNextEpoch, EpochProcessed, PartialEpochRequestProcessed, PriorityWithdrawalClaimed, StrategyYieldAccrued, AllocateFunds, DeallocateFunds, StrategyWithdraw, AdjustTotalAssets.

Query patterns

Ready-to-adapt queries live in `examples/graphql/subgraph-queries.graphql`. Tips:

  • The Graph auto-generates plural lowercase roots (vaults, factories, withdrawalQueues) and singular lowercase aggregation roots (vaultStats).
  • Factory has no derived `vaults` field - query vaults(where: { factory: … }).
  • VaultStats.vault is a Bytes address, not a Vault reference; resolve names with a second query.

Use cases

GoalQuery
Vault dashboard (TVL, share price)vaults + vaultStats
APY estimateΔ sharePrice over time, annualised (net of fees)
Fee analyticsvaultFeesStats
Queue depth / withdrawal trackerwithdrawalQueues, Vault.currentEpochRequestedShares
Strategy exposurestrategies + allocatedValue
Growth metricsNewUserStats, NewUserGlobalStats