Skip to main content

Table Overview

All tables are located in the crosschain.stablecoin schema
TablePurposeRow GrainUpdate Frequency
filtered_transfersOrganic transfers onlyOne row per transferReal-time
wallet_classificationWallet profilingOne row per wallet per dayDaily
transaction_classificationTransaction type taggingOne row per transactionReal-time
payment_categorizationGranular payment purposeOne row per paymentReal-time

1. filtered_transfers

Purpose: Organic stablecoin transfers with CEX/DeFi/Infrastructure addresses removed. Use Case: Calculate adjusted payment volume, track organic adoption.

Schema

Column NameData TypeDescription
chainVARCHARBlockchain network (ethereum, polygon, arbitrum, etc.)
token_symbolVARCHARStablecoin token symbol (USDC, USDT, DAI, etc.)
from_addressVARCHARSender address
to_addressVARCHARRecipient address
usd_amountNUMBERTransfer amount in USD
transaction_hashVARCHARTransaction hash
block_timestampTIMESTAMPBlock timestamp
block_numberNUMBERBlock number
unique_idVARCHARUnique transfer identifier (hash + log_index)

Key Features

  • Attribution filtered: CEX/DeFi/Infrastructure excluded
  • Cross-chain: All supported chains aggregated
  • Real-time updates: New transfers added as they occur
  • No attribution labels exposed: Labels are internal only

Example Queries

Total Adjusted Volume by Chain (30d)

SELECT
  chain,
  SUM(usd_amount) AS adjusted_volume_30d
FROM crosschain.stablecoin.filtered_transfers
WHERE block_timestamp >= CURRENT_DATE - 30
GROUP BY 1
ORDER BY 2 DESC;

Daily Payment Volume Trend

SELECT
  DATE_TRUNC('day', block_timestamp) AS day,
  COUNT(*) AS transfer_count,
  SUM(usd_amount) AS daily_volume
FROM crosschain.stablecoin.filtered_transfers
WHERE block_timestamp >= CURRENT_DATE - 90
GROUP BY 1
ORDER BY 1;

Top Stablecoins by Organic Volume

SELECT
  token_symbol,
  COUNT(*) AS transfer_count,
  SUM(usd_amount) AS total_volume
FROM crosschain.stablecoin.filtered_transfers
WHERE block_timestamp >= CURRENT_DATE - 30
GROUP BY 1
ORDER BY 3 DESC;

2. wallet_classification

Purpose: Comprehensive wallet profiling with behavioral segments, engagement scores, and risk metrics. Use Case: Customer segmentation, risk assessment, wallet analysis.

Schema

Column NameData TypeDescription
chainVARCHARBlockchain network
addressVARCHARWallet address
snapshot_dateDATEDate of the classification snapshot
balance_tierVARCHARBalance tier (whale, large, medium, small, micro, dust)
behavioral_segmentVARCHARActivity segment (new, active, dormant, churned)
combined_segmentVARCHARCombined classification (e.g., “Whale Active”, “Small Dormant”)
engagement_scoreNUMBEROverall engagement score (0-100)
engagement_tierVARCHAREngagement tier (highly_engaged, engaged, moderately_engaged, low_engagement, inactive)
recency_scoreNUMBERRecency component (0-40 points)
frequency_scoreNUMBERFrequency component (0-40 points)
consistency_scoreNUMBERConsistency component (0-20 points)
risk_scoreNUMBEROverall risk score (0-100)
risk_flagVARCHARRisk flag (high, medium, low)
volatility_risk_scoreNUMBERBalance volatility risk (0-50 points)
anomaly_risk_scoreNUMBERBalance anomaly risk (0-50 points)
volume_30d_usdNUMBER30-day transaction volume in USD
current_balance_usdNUMBERCurrent wallet balance in USD
days_since_last_activityNUMBERDays since most recent activity
days_active_30dNUMBERNumber of active days in past 30 days
days_active_lifetimeNUMBERTotal number of active days (lifetime)
lifetime_span_daysNUMBERDays between first and last activity
tokens_used_countNUMBERNumber of unique stablecoin tokens used
chains_used_countNUMBERNumber of chains wallet has been active on

Balance Tiers

TierBalance Range (USD)Description
whale> $1MHigh-value accounts
large100K100K - 1MInstitutional/business accounts
medium10K10K - 100KActive users/small businesses
small1K1K - 10KRegular users
micro100100 - 1KCasual users
dust< $100Minimal activity

Behavioral Segments

SegmentCriteriaDescription
newFirst activity < 30 days agoNew wallet
activeActive in last 7 daysCurrently engaged
dormantActive 7-30 days agoRecently inactive
churnedActive >30 days agoLong-term inactive

Engagement Scoring

Total: 100 points
ComponentPointsCriteria
Recency0-40Days since last activity
Frequency0-40Number of active days (30d)
Consistency0-20Activity pattern regularity
Engagement Tiers:
  • highly_engaged: 80-100
  • engaged: 60-79
  • moderately_engaged: 40-59
  • low_engagement: 20-39
  • inactive: 0-19

Risk Scoring

Total: 100 points
ComponentPointsCriteria
Volatility0-50Balance fluctuation rate
Anomaly0-50Unusual balance patterns
Risk Flags:
  • high: 70-100
  • medium: 40-69
  • low: 0-39

Example Queries

Wallet Segmentation Distribution

SELECT
  balance_tier,
  behavioral_segment,
  COUNT(*) AS wallet_count,
  AVG(engagement_score) AS avg_engagement,
  AVG(risk_score) AS avg_risk
FROM crosschain.stablecoin.wallet_classification
WHERE snapshot_date = CURRENT_DATE
GROUP BY 1, 2
ORDER BY 3 DESC;

High-Value Active Wallets

SELECT
  chain,
  address,
  balance_tier,
  current_balance_usd,
  engagement_score,
  risk_flag
FROM crosschain.stablecoin.wallet_classification
WHERE snapshot_date = CURRENT_DATE
  AND balance_tier IN ('whale', 'large')
  AND behavioral_segment = 'active'
ORDER BY current_balance_usd DESC
LIMIT 100;

Risk Analysis

SELECT
  risk_flag,
  COUNT(*) AS wallet_count,
  AVG(volume_30d_usd) AS avg_volume,
  AVG(volatility_risk_score) AS avg_volatility,
  AVG(anomaly_risk_score) AS avg_anomaly
FROM crosschain.stablecoin.wallet_classification
WHERE snapshot_date = CURRENT_DATE
GROUP BY 1;

3. transaction_classification

Purpose: Classify transactions by type (Real-World Payment, Investment/Trade, Store as Value) and wallet type combinations. Use Case: Payment type analysis, wallet interaction patterns.

Schema

Column NameData TypeDescription
chainVARCHARBlockchain network
token_symbolVARCHARStablecoin token symbol
activity_dateDATEDate of transaction
block_timestampTIMESTAMPBlock timestamp
transaction_hashVARCHARTransaction hash
from_addressVARCHARSender address
to_addressVARCHARRecipient address
usd_amountNUMBERTransfer amount in USD
from_wallet_typeVARCHARSender wallet type (Consumer, Business, Institutional, Unclassified)
to_wallet_typeVARCHARRecipient wallet type
from_balance_tierVARCHARSender balance tier
to_balance_tierVARCHARRecipient balance tier
transaction_typeVARCHARTransaction classification
wallet_type_combinationVARCHARWallet type pair (C2C, C2B, B2C, B2B, etc.)
from_30d_volumeNUMBERSender’s 30-day volume in USD
to_30d_volumeNUMBERRecipient’s 30-day volume in USD
from_avg_txn_sizeNUMBERSender’s avg transaction size (30d)
to_avg_txn_sizeNUMBERRecipient’s avg transaction size (30d)

Transaction Types

TypeDescriptionExamples
Real-World PaymentP2P, retail, payroll, B2B paymentsSalary, purchase, invoice
Investment/TradeSpeculative, trading, yield-seekingSwap prep, arbitrage
Store as ValueLong-term holding, savingsAccumulation, vault
UnclassifiedAmbiguous or insufficient data-

Wallet Types

TypeDescriptionIdentification Criteria
ConsumerIndividual usersLow volume, small balances, P2P patterns
BusinessMerchants, service providersMedium-high volume, regular receipts
InstitutionalLarge entities, fundsVery high volume, large balances
UnclassifiedInsufficient dataNew wallets, low activity

Wallet Type Combinations

CombinationDescriptionExamples
C2CConsumer to ConsumerP2P payments, personal transfers
C2BConsumer to BusinessRetail purchases, service payments
B2CBusiness to ConsumerSalaries, refunds, payouts
B2BBusiness to BusinessSupplier payments, invoices
I2CInstitutional to ConsumerAirdrops, grants
I2BInstitutional to BusinessInvestments, funding
I2IInstitutional to InstitutionalLarge settlements
C2IConsumer to InstitutionalInvestments
B2IBusiness to Institutional-
U2UUnclassified to Unclassified-
U2XUnclassified to any-
OtherMixed or edge cases-

Example Queries

Transaction Type Distribution

SELECT
  transaction_type,
  COUNT(*) AS tx_count,
  SUM(usd_amount) AS total_volume
FROM crosschain.stablecoin.transaction_classification
WHERE activity_date >= CURRENT_DATE - 30
GROUP BY 1
ORDER BY 3 DESC;

Wallet Combination Analysis

SELECT
  wallet_type_combination,
  COUNT(*) AS tx_count,
  AVG(usd_amount) AS avg_amount,
  SUM(usd_amount) AS total_volume
FROM crosschain.stablecoin.transaction_classification
WHERE activity_date >= CURRENT_DATE - 30
  AND transaction_type = 'Real-World Payment'
GROUP BY 1
ORDER BY 4 DESC;
SELECT
  DATE_TRUNC('week', activity_date) AS week,
  COUNT(*) AS payment_count,
  SUM(usd_amount) AS weekly_volume
FROM crosschain.stablecoin.transaction_classification
WHERE wallet_type_combination = 'C2B'
  AND transaction_type = 'Real-World Payment'
  AND activity_date >= CURRENT_DATE - 90
GROUP BY 1
ORDER BY 1;

4. payment_categorization

Purpose: Granular payment purpose classification for real-world payments only. Use Case: Payment category analytics, merchant insights, payroll tracking.

Schema

Includes all columns from transaction_classification plus:
Column NameData TypeDescription
core_payment_categoryVARCHARHigh-level payment category
payment_purposeVARCHARGranular payment purpose

Core Payment Categories

CategoryDescription
C2C PaymentConsumer-to-Consumer transfers
C2B PaymentConsumer-to-Business purchases/services
B2C PaymentBusiness-to-Consumer payouts/refunds
B2B PaymentBusiness-to-Business settlements
I2C PaymentInstitutional-to-Consumer grants/airdrops
I2B PaymentInstitutional-to-Business funding
Institutional PaymentInstitutional-to-Institutional
OtherMixed or unclassified

Payment Purposes

C2C (Consumer to Consumer)

PurposeAmount RangeDescription
P2P Micro Payment< $100Small personal transfers
P2P Remittance100100 - 10KCross-border remittances
P2P Large Transfer> $10KLarge personal transfers

C2B (Consumer to Business)

PurposeAmount RangeDescription
Retail Purchase< $500Small retail transactions
Service Payment500500 - 5KProfessional services
Large Purchase> $5KHigh-value goods/services

B2C (Business to Consumer)

PurposeAmount RangeDescription
Micro Payout< $100Small rewards, cashback
Gig/Creator Payout100100 - 2KFreelance, content creator
Salary/Payroll2K2K - 20KEmployee salaries
Large Disbursement> $20KBonuses, large payouts

B2B (Business to Business)

PurposeAmount RangeDescription
Service Fee< $5KSubscription, small invoices
Supplier Payment5K5K - 50KVendor payments
Large B2B Settlement> $50KMajor contracts

Example Queries

Payment Purpose Breakdown

SELECT
  core_payment_category,
  payment_purpose,
  COUNT(*) AS payment_count,
  SUM(usd_amount) AS total_usd,
  AVG(usd_amount) AS avg_payment_size
FROM crosschain.stablecoin.payment_categorization
WHERE activity_date >= CURRENT_DATE - 30
GROUP BY 1, 2
ORDER BY 4 DESC;

Payroll Volume Tracking

SELECT
  DATE_TRUNC('month', activity_date) AS month,
  COUNT(*) AS payroll_count,
  SUM(usd_amount) AS total_payroll_usd
FROM crosschain.stablecoin.payment_categorization
WHERE payment_purpose = 'Salary/Payroll'
  AND activity_date >= CURRENT_DATE - 180
GROUP BY 1
ORDER BY 1;

Retail vs Service Payments

SELECT
  payment_purpose,
  COUNT(*) AS payment_count,
  SUM(usd_amount) AS volume
FROM crosschain.stablecoin.payment_categorization
WHERE payment_purpose IN ('Retail Purchase', 'Service Payment')
  AND activity_date >= CURRENT_DATE - 30
GROUP BY 1;

Table Relationships

Common Joins

Filtered Transfers + Wallet Classification

SELECT
  ft.transaction_hash,
  ft.usd_amount,
  wc_from.balance_tier AS from_balance_tier,
  wc_from.engagement_score AS from_engagement,
  wc_to.balance_tier AS to_balance_tier,
  wc_to.engagement_score AS to_engagement
FROM crosschain.stablecoin.filtered_transfers ft
LEFT JOIN crosschain.stablecoin.wallet_classification wc_from
  ON ft.from_address = wc_from.address
  AND DATE(ft.block_timestamp) = wc_from.snapshot_date
LEFT JOIN crosschain.stablecoin.wallet_classification wc_to
  ON ft.to_address = wc_to.address
  AND DATE(ft.block_timestamp) = wc_to.snapshot_date
WHERE ft.block_timestamp >= CURRENT_DATE - 7;

Transaction Classification + Payment Categorization

SELECT
  tc.transaction_type,
  pc.payment_purpose,
  COUNT(*) AS tx_count
FROM crosschain.stablecoin.transaction_classification tc
LEFT JOIN crosschain.stablecoin.payment_categorization pc
  ON tc.transaction_hash = pc.transaction_hash
WHERE tc.activity_date >= CURRENT_DATE - 30
GROUP BY 1, 2;

Next Steps