https://thegraph.com/explorer/subgraphs/FJ42AgdSR7rg9CTY7eUB7MPZbhmih4xKoXEUfh8oHroc
This subgraph indexes token launches and trading activity from the Virtuals Protocol on Base network. It tracks token launches, swaps, market statistics, and detailed trading analytics from the protocol contract at 0xF66DeA7b3e897cD44A5a231c61B6B4423d613259.
- Full-text search capabilities for tokens and descriptions
- Non-fatal error handling for improved reliability
- IPFS on Ethereum contracts support
- Automatic data pruning
- Comprehensive trading analytics and market statistics
- Global and core-specific agent rankings
- Market impact analysis and graduation effects
- Cross-agent analytics and network effects
- Advanced validator network analysis
- Risk metrics and stability indicators
The subgraph tracks the following data:
- Basic token information (address, creator, timestamp)
- Token metadata (name, ticker, description, image)
- Launch parameters (cores, purchase amount, URLs)
- Swap events with detailed trade information
- Token supply tracking
- Trade snapshots for historical analysis
- Comprehensive daily statistics
- Per-trader analytics
- Global rankings (impact, stake, rewards)
- Core-specific performance metrics
- Historical rank tracking
- Market impact scores
- Network effect measurements
- Price impact correlation
- Graduation event effects
- Liquidity provider behavior
- Market stability metrics
- Token velocity analysis
- Cross-agent validation patterns
- Validator specialization metrics
- Network effect measurements
- Performance correlation data
- Reliability indicators
- Agent stability scores
- Validator reliability indices
- Stake concentration analysis
- Market health indicators
- Liquidity risk metrics
{
tokenLaunches(
first: 5,
orderBy: timestamp,
orderDirection: desc
) {
id
address
tokenCreator
name
ticker
description
imageUrl
cores
purchaseAmount
createdAtBlock
timestamp
}
}{
agents(
first: 10,
orderBy: performanceRank,
orderDirection: asc
) {
id
virtualId
impactRank
stakeRank
rewardRank
validatorRank
priceImpactScore
marketStability
historicalRanks(first: 30) {
timestamp
totalRank
}
coreTypeRanks {
coreType
rank
score
}
}
}{
agents(where: { graduatedToUniswap: true }) {
id
priceImpactScore
marketStability
liquidityProviderCount
postGraduationMetrics {
priceBeforeGraduation
priceAfterGraduation
marketEfficiencyChange
}
}
}{
tokenDayStats(
first: 10,
orderBy: volumeUSD,
orderDirection: desc
) {
token
date
openPrice
closePrice
volumeUSD
txCount
uniqueTraderCount
marketCap
priceVolatility
buyPressure
liquidityScore
}
}{
tokenTraderStats(
where: {
volumeUSD_gt: "1000"
}
) {
trader
token
date
txCount
volumeUSD
realizedPnL
profitabilityRatio
averagePositionSize
winningStreak
}
}{
tokenDayStats(
where: {
token: "0x..." # Replace with token address
}
orderBy: date,
orderDirection: desc
) {
date
marketDepth
liquidityScore
marketEfficiency
buyPressure
volumeWeightedPrice
priceVolatility
}
}- Install dependencies:
yarn install- Generate types:
yarn codegen- Build the subgraph:
yarn build-
First, create a new subgraph on The Graph Studio:
- Go to https://thegraph.com/studio/
- Click "Create a Subgraph"
- Name it "virtuals-tokens"
- Select "Base" as the network
-
Get your deploy key from the Graph Studio dashboard
-
Authenticate with the Graph CLI:
graph auth <your-deploy-key>- Deploy the subgraph:
graph deploy virtuals-tokensWhen prompted for a version label, use semantic versioning (e.g., "1.0.0")
- Modify the schema in
schema.graphql - Update the subgraph manifest in
subgraph.yaml - Update the mappings in
src/mappings/agent.ts - Regenerate types:
yarn codegen- Build:
yarn build- Deploy new version:
graph deploy virtuals-tokens- The subgraph starts indexing from block 21841737
- Features comprehensive trading analytics and market statistics
- Supports fulltext search on token addresses, names, tickers, and descriptions
- Includes detailed market health metrics and trader performance analytics
- Tracks daily statistics and peak trading hours for market analysis
- Provides advanced analytics like price impact, market efficiency, and trader profitability
- Implements global and core-specific agent rankings
- Tracks market impact and graduation effects
- Analyzes validator network patterns and specialization
- Monitors risk metrics and market stability indicators