Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dune.com/llms.txt

Use this file to discover all available pages before exploring further.

Not every stablecoin transfer is a payment. payments.commerce_flows is a transfer-level dataset that identifies the ones that are — every transfer that is a legitimate commerce transaction, tagged with its flow type (party_pair, purpose), a confidence level, and the protocol where one is known. The table is intentionally conservative: transfers that don’t match a rule are excluded, not bucketed as “unclear”. It is not a universal stablecoin classifier and does not try to label everything. Commerce Flows feeds back into the stablecoins dataset — payments are a sub-category of stablecoin activity. Matched transfers have their category updated from unidentified to payment in stablecoins_evm.activity_enriched.

Why this dataset matters

Most stablecoin volume is not payments — it is trading, bridging, and treasury movement. Commerce Flows isolates the slice that is genuine commercial settlement, attaching an explicit rule and a confidence level to every row. It makes it possible to:
  • Measure onchain commerce volume by flow type (B2B, C2B, B2C) and protocol.
  • Separate protocol-verified settlement (Tier A) from behavioural inference (Tier B).
  • Label stablecoin transfers as payment-related for downstream analytics.

Coverage

Chains: EVM chains only. Protocol-verified sources (Tier A):
  • Crypto cards — sourced from payments.card_transactions.
  • Agentic payments (x402 / MPP) — sourced from payments.agentic_payments.
  • Stripe, Shopify Commerce Payments Protocol, Coinbase Commerce, Request Network, and stablecoin payment processors (e.g. BVNK).
Behavioural flows (Tier B): B2C payroll-style distributions, C2B merchant aggregation, and recurring B2B commerce.

Output taxonomy

Party pairPurposeMeaning
B2BCommerceBusiness pays business for goods or services.
C2BCommerceConsumer pays a merchant or service (checkout, subscriptions where detectable).
B2CPayrollRecurring business-to-many-individuals payouts.

Methodology

The pipeline runs in ordered stages: a strict exclusion layer removes non-commerce and non-final activity, then Tier A captures protocol-explicit matches (confidence = high), and finally Tier B applies a small set of high-signal behavioural heuristics to the residual (confidence = medium). Each transfer maps to one output row, and Tier A always takes precedence over Tier B.

1. Exclusion layer

Fires before any classification. A transfer matching any rule is dropped from the eligible universe.
  • Via upstream stablecoin labels: issuer mechanics (mint / burn), bridge and wrap infrastructure, CEX legs, DEX / AMM / routing, and DeFi vaults / lending / yield.
  • Via behavioural shape: same-entity / self-transfers, round-trip and reverse transfers (treasury reshuffling, wash patterns), A→B→C pass-through routing (avoids double-counting intermediary legs), high-frequency bot wallets, and large one-off treasury repositioning.

2. Wallet classification

Each address is typed from its full transaction history, with a wallet_balance_tier derived from its rolling 30-day average USD balance.
Wallet typeBalance tiersProfile
Consumerdust (under 100),micro(100), micro (100–1K),small(1K), small (1K–$10K)Retail-sized transfers, low counterparty diversity
Businessmedium (10K10K–100K)Recurring inflows from many senders, or outflows to many receivers
Institutionallarge (100K100K–1M), whale (over $1M)High-value counterparties, treasury / corporate flow shapes
UnclassifiedanyAverage balance under $10 or sparse history — excluded from classified output

3. B2B commerce

TierDetectorWhat it captures
A (labels)Agentic paymentsAgent-to-agent settlement (x402 / MPP), from payments.agentic_payments.
A (labels)Processor depositsStablecoin payment-processor settlement legs (e.g. BVNK).
B (behavioural)Recurring B2BBusiness / institutional sender → receiver, ticket ≥ $2K, directional, low recurrence.

4. B2C payroll

TierDetectorWhat it captures
A (labels)Request NetworkProtocol-mediated payouts through Request payment proxies.
B (behavioural)Payroll batchBusiness-tier sender distributing to ≥5 recipients on a regular cadence, mid-size tickets, no return flow.

5. C2B commerce

TierDetectorWhat it captures
A (labels)Crypto cardsCard purchase settlements, from payments.card_transactions.
A (labels)StripeStablecoin checkout settlement into the Stripe MerchantFactory contract.
A (labels)Shopify CPPFinal settlement legs of the Shopify Commerce Payments Protocol (captures / charges only).
A (labels)Coinbase CommerceFinal settlement into the merchant / operator.
B (behavioural)Merchant aggregationMerchant-like receiver aggregating many payers, then settling out to 1–2 wallets.

Table schema

Each row is one classified stablecoin transfer. Non-applicable fields are NULL. Every row carries tx_hash + transfer_evt_index + transfer_unique_key to join back to the upstream stablecoin transfer.
ColumnTypeDescription
blockchainvarcharChain name
block_monthdateBlock month (partition key)
block_datedateBlock date
block_timetimestampBlock timestamp
tx_hashvarbinaryTransaction hash of the classified transfer
activity_evt_indexbigintEvent index of the protocol anchor event for Tier A matches; NULL for Tier B
transfer_evt_indexbigintEvent index of the underlying token transfer
transfer_unique_keyvarcharUnique transfer identifier; merge key and join key back to upstream
token_addressvarbinaryToken contract address
token_symbolvarcharToken symbol, e.g. USDC, USDT
amount_rawuint256Raw token amount
amountdoubleNormalized token amount
amount_usddoubleUSD value at block time
sendervarbinaryRaw transfer sender
receivervarbinaryRaw transfer receiver
payment_uuidvarcharIdentifier grouping the legs of a single payment; populated only where a multi-leg payment can be reconstructed, NULL otherwise
sender_wallet_typevarcharconsumer, business, institutional, or unclassified
sender_wallet_balance_tiervarchardust (under 100),micro(100), `micro` (100–1K),small(1K), `small` (1K–10K),medium(10K), `medium` (10K–100K),large(100K), `large` (100K–1M),whale(over1M), `whale` (over 1M)
receiver_wallet_typevarcharSame vocabulary as sender_wallet_type
receiver_wallet_balance_tiervarcharSame vocabulary as sender_wallet_balance_tier
party_pairvarcharb2b, c2b, or b2c
purposevarcharcommerce or payroll
heuristic_typevarcharlabels_based (Tier A) or activity_based (Tier B)
heuristic_idvarcharSpecific rule that matched, e.g. crypto_card, stripe, shopify_cpp, coinbase_commerce, request_network, agentic_payments, b2b_processor_deposits, c2b_commerce_h3_aggregation, b2c_payroll_h1_batch, b2b_commerce_h_recurring
confidencevarcharhigh (Tier A) or medium (Tier B)
protocolvarcharProtocol or provider for Tier A matches (e.g. x402, stripe, shopify_base_cpp, coinbase_commerce, request_network, or the card brand for crypto cards); NULL for Tier B
dataset_versionvarcharMethodology version; bumped when classification logic changes
_updated_attimestampPipeline load time (when the row was last written)

Sample queries

Commerce flow volume by party pair and purpose

SELECT
    party_pair,
    purpose,
    heuristic_type,
    SUM(amount_usd)        AS volume_usd,
    COUNT(*)               AS tx_count,
    COUNT(DISTINCT sender) AS unique_senders
FROM payments.commerce_flows
WHERE block_date >= NOW() - INTERVAL '30' DAY
GROUP BY 1, 2, 3
ORDER BY 4 DESC

Protocol-verified flows only

SELECT
    protocol,
    blockchain,
    SUM(amount_usd) AS volume_usd,
    COUNT(*)        AS tx_count
FROM payments.commerce_flows
WHERE confidence = 'high'
  AND block_date >= NOW() - INTERVAL '30' DAY
GROUP BY 1, 2
ORDER BY 3 DESC