> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Payments Pipeline Overview

> Real-world payment tracking and classification for stablecoin transfers

## What is the Payments Pipeline?

The Payments Pipeline is Allium's comprehensive framework for identifying, classifying, and analyzing **real-world payments** across blockchain networks. It transforms raw stablecoin transfer data into actionable insights about payment behavior, distinguishing genuine economic activity from noise.

## Core Concept: Adjusted Volume

**Adjusted Volume** represents stablecoin transaction volume after filtering out non-organic activity. This provides a more accurate measure of real economic utility by removing:

* **CEX (Centralized Exchange) activity** - Internal exchange operations and market making
* **DeFi Protocol activity** - Smart contract interactions, liquidity provision, and automated trading
* **Infrastructure activity** - Bridge contracts, multisigs, and other operational addresses

### Why Adjusted Volume Matters

Raw blockchain volume includes significant noise that inflates the actual payment activity:

| Metric                      | Raw Volume | Adjusted Volume |
| --------------------------- | ---------- | --------------- |
| **Includes CEX**            | ✅ Yes      | ❌ No            |
| **Includes DeFi**           | ✅ Yes      | ❌ No            |
| **Includes Infrastructure** | ✅ Yes      | ❌ No            |
| **Real-world payments**     | ✅ Yes      | ✅ Yes           |
| **Reflects true utility**   | ❌ No       | ✅ Yes           |

**Example:**

* **Raw volume**: $10B (includes $6B CEX, $2B DeFi, $2B payments)
* **Adjusted volume**: \$2B (only organic payments)

## Pipeline Architecture

```mermaid theme={null}
graph TD
    A[Raw Stablecoin Transfers]
    B[Attribution Filtering]
    C[Wallet Classification]
    D[Transaction Classification]
    E[Payment Categorization]

    A --> B
    B --> C
    C --> D
    D --> E
```

| Step                              | Description                                                                                               |
| --------------------------------- | --------------------------------------------------------------------------------------------------------- |
| **1. Raw Stablecoin Transfers**   | All chains, all stablecoins, all addresses                                                                |
| **2. Attribution Filtering**      | Remove CEX/DeFi/Infrastructure addresses → Organic transfers only                                         |
| **3. Wallet Classification**      | Consumer / Business / Institutional / Unclassified with balance tiers, engagement scores, risk scores     |
| **4. Transaction Classification** | Real-World Payment / Investment / Store of Value with wallet type combinations (C2C, C2B, B2C, B2B, etc.) |
| **5. Payment Categorization**     | Granular purpose: P2P, Retail, Payroll, B2B, etc. (only for real-world payments)                          |

## Tables

The pipeline produces four primary tables in the `crosschain.stablecoin` schema:

| Table Name                                                                                                          | Description                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [`crosschain.stablecoin.filtered_transfers`](/historical-data/payments/tables#1-filtered_transfers)                 | Organic transfers only (CEX/DeFi/Infrastructure excluded).<br />Includes: chain, token\_symbol, from/to\_address, usd\_amount |
| [`crosschain.stablecoin.wallet_classification`](/historical-data/payments/tables#2-wallet_classification)           | Comprehensive wallet profiling.<br />Includes: balance\_tier, behavioral\_segment, engagement\_score, risk\_score             |
| [`crosschain.stablecoin.transaction_classification`](/historical-data/payments/tables#3-transaction_classification) | Transaction type identification.<br />Includes: transaction\_type, wallet\_type\_combination, from/to\_wallet\_type           |
| [`crosschain.stablecoin.payment_categorization`](/historical-data/payments/tables#4-payment_categorization)         | Granular payment purpose (real-world payments only).<br />Includes: core\_payment\_category, payment\_purpose                 |

## Use Cases

### 1. Payment Volume Analytics

Track real-world stablecoin payment adoption across chains:

```sql theme={null}
SELECT
  chain,
  token_symbol,
  DATE_TRUNC('week', block_timestamp) AS week,
  SUM(usd_amount) AS weekly_payment_volume
FROM crosschain.stablecoin.filtered_transfers
GROUP BY 1, 2, 3
ORDER BY 3 DESC;
```

### 2. Payment Type Distribution

Understand how stablecoins are being used:

```sql theme={null}
SELECT
  transaction_type,
  COUNT(*) AS transaction_count,
  SUM(usd_amount) AS total_volume_usd
FROM crosschain.stablecoin.transaction_classification
GROUP BY 1;
```

### 3. Payment Purpose Breakdown

Analyze granular payment categories:

```sql theme={null}
SELECT
  core_payment_category,
  payment_purpose,
  COUNT(*) AS payment_count,
  SUM(usd_amount) AS total_usd
FROM crosschain.stablecoin.payment_categorization
GROUP BY 1, 2
ORDER BY 4 DESC;
```

### 4. Wallet Segmentation

Profile wallet behavior and risk:

```sql theme={null}
SELECT
  balance_tier,
  behavioral_segment,
  engagement_tier,
  COUNT(DISTINCT address) AS wallet_count,
  AVG(engagement_score) AS avg_engagement,
  AVG(risk_score) AS avg_risk
FROM crosschain.stablecoin.wallet_classification
GROUP BY 1, 2, 3;
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Adjusted Volume Methodology" icon="filter" href="/historical-data/payments/adjusted-volume">
    Learn how we calculate adjusted volume and filter non-organic activity
  </Card>

  <Card title="Table Reference" icon="table" href="/historical-data/payments/tables">
    Detailed schema documentation for all pipeline tables
  </Card>
</CardGroup>
