
Real-time payment protocol analytics for Coinbase x402 on Solana
Track every x402 payment settlement on Solana. This Substreams detects when facilitators sponsor SPL Token TransferChecked settlements for HTTP 402 payments, extracting payer, recipient, mint, amount, facilitator, and memo from each transaction.
Companion to x402-base-pulse — same model, Solana native.
The x402 protocol enables internet-native payments using the HTTP 402 status code. The Solana settlement path is defined by the SVM exact scheme:
TransferChecked to the resource server's ATA, signs it, and returns the partially-signed txfeePayer signature, and submits it to SolanaTransferChecked + SPL Memo instructionSolana has no on-chain FacilitatorRegistry. Instead, x402 settlements are identified by three signals observed together in a transaction:
TransferChecked instructionfee_payer is distinct from the TransferChecked authority — i.e. the facilitator sponsors, the payer signs| Module | Kind | Description |
|---|---|---|
map_x402_settlements |
Map | Detects x402 settlements in each Solana block and extracts payer / recipient / mint / amount / facilitator / memo |
store_payer_volume |
Store | Accumulates total amount spent per payer pubkey |
store_payer_count |
Store | Counts payments per payer |
store_recipient_volume |
Store | Accumulates total received per resource server (ATA owner) |
store_recipient_count |
Store | Counts payments per recipient |
store_facilitator_volume |
Store | Accumulates volume settled per facilitator |
store_facilitator_count |
Store | Counts settlements per facilitator |
store_facilitator_fees |
Store | Accumulates tx fees (lamports) paid per facilitator |
store_first_seen |
Store | Records first-seen block timestamp per payer / recipient / facilitator |
map_payer_stats |
Map | Computes payer leaderboards and averages |
map_recipient_stats |
Map | Computes resource server revenue stats |
map_facilitator_stats |
Map | Computes facilitator economics (volume, fees, counts) |
db_out |
Map | Outputs DatabaseChanges for the PostgreSQL sink |
| Program | Pubkey |
|---|---|
| SPL Token | TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA |
| SPL Token-2022 | TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb |
| SPL Memo v2 | MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr |
| SPL Memo v1 | Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo |
# Stream settlements
substreams run x402-solana-pulse map_x402_settlements \
-e mainnet.sol.streamingfast.io:443 \
-s 280000000 -t +1000
# GUI mode
substreams gui x402-solana-pulse map_x402_settlements \
-e mainnet.sol.streamingfast.io:443 \
-s 280000000
# Sink to PostgreSQL
substreams-sink-sql run "psql://localhost/x402" \
x402-solana-pulse-v1.0.0.spkg \
-e mainnet.sol.streamingfast.io:443
| Table | Key | Description |
|---|---|---|
settlements |
signature-instruction_index |
Every settlement with payer, recipient, mint, amount, facilitator, fee, memo |
payers |
payer_address |
Aggregated spend and payment count per payer pubkey |
recipients |
recipient_address |
Revenue and payment count per resource server |
facilitators |
facilitator_address |
Volume settled, settlement count, lamport fees per facilitator |
| View | Description |
|---|---|
daily_stats |
Daily protocol-wide volume, unique participants, fees |
top_payers |
Ranked by total spend |
top_recipients |
Ranked by total revenue |
facilitator_economics |
Volume settled vs fee cost per facilitator |
whale_payments |
Payments ≥ 100 USDC (atomic units) |
recent_settlements |
Latest 100 settlements |
cargo build --target wasm32-unknown-unknown --release
substreams pack substreams.yaml
mainnet.sol.streamingfast.io:443Extracts x402 payment settlements on Solana by detecting the SVM exact
scheme settlement shape: a transaction that contains an SPL Token (or
Token-2022) TransferChecked instruction paired with an SPL Memo
instruction, where the transaction fee payer is distinct from the
TransferChecked authority (the facilitator sponsors, the payer signs).
Per the x402 SVM exact scheme:
https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md
substreams gui x402-solana-pulse@v1.1.0 map_x402_settlementssubstreams gui x402-solana-pulse@v1.1.0 map_payer_statssubstreams gui x402-solana-pulse@v1.1.0 map_recipient_statssubstreams gui x402-solana-pulse@v1.1.0 map_facilitator_statssubstreams gui x402-solana-pulse@v1.1.0 db_outAccumulates total payment volume per payer. Key: {payer_pubkey}
substreams gui x402-solana-pulse@v1.1.0 store_payer_volumeCounts total payments per payer. Key: {payer_pubkey}
substreams gui x402-solana-pulse@v1.1.0 store_payer_countAccumulates total revenue per recipient. Key: {recipient_pubkey}
substreams gui x402-solana-pulse@v1.1.0 store_recipient_volumeCounts total payments per recipient. Key: {recipient_pubkey}
substreams gui x402-solana-pulse@v1.1.0 store_recipient_countAccumulates total volume settled per facilitator. Key: {facilitator_pubkey}
substreams gui x402-solana-pulse@v1.1.0 store_facilitator_volumeCounts total settlements per facilitator. Key: {facilitator_pubkey}
substreams gui x402-solana-pulse@v1.1.0 store_facilitator_countAccumulates total tx fees (lamports) spent per facilitator. Key: {facilitator_pubkey}
substreams gui x402-solana-pulse@v1.1.0 store_facilitator_feesRecords first-seen block timestamp per entity. Key: payer:{p}, recipient:{r}, facilitator:{f}
substreams gui x402-solana-pulse@v1.1.0 store_first_seen