Skip to main content

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.

The crosschain.agents schema provides analytics for the Machine Payment Protocol (MPP) — an open standard for machine-to-machine payments that enables AI agents to pay for API services with USDC micropayments. Currently live on Tempo (by Stripe & Paradigm), with multi-chain expansion planned.

Available Tables

TableDescription
mpp_chargesIndividual MPP charge payments (pay-per-request)
mpp_serversMPP server label registry — maps memo hashes to service names and categories
mpp_sessionsMPP session lifecycle events (channel opened, settled, closed)

Data Schema

crosschain.agents.mpp_charges
crosschain.agents.mpp_servers
crosschain.agents.mpp_sessions
Chain-specific tables:
tempo.agents.mpp_charges
tempo.agents.mpp_servers
tempo.agents.mpp_sessions

Key Concepts

Payment Types

MPP supports two payment models:
  • Charges (mpp_charges) — Pay-per-request via TransferWithMemo events. One row per individual API call payment. Join to mpp_servers on memo_server_hash for service name and category.
  • Sessions (mpp_sessions) — Pay-as-you-go streaming channels. The payer deposits USDC into a channel contract; the service draws down via signed vouchers; remaining balance is refunded on close. One row per lifecycle event (channel_opened, settled, close_requested, channel_closed).

Server Registry

mpp_servers maps the on-chain memo_server_hash (a 10-byte identifier embedded in each payment memo) to human-readable service metadata — name, URL, category, and endpoint count. Use it to label charges by service:
SELECT s.name, s.category, c.usd_amount
FROM crosschain.agents.mpp_charges c
JOIN crosschain.agents.mpp_servers s USING (memo_server_hash)

Detection Method

MPP charges are detected via the TIP-20 TransferWithMemo event on the USDC.e contract on Tempo. The memo field encodes a 5-byte protocol identifier (ef1ed71201) followed by a 10-byte server hash. This is distinct from plain Transfer events — every MPP payment has a memo, but not every transfer is MPP.

Sample Query

-- Top services by volume, last 30 days
SELECT
    s.name AS service_name,
    s.category,
    COUNT(*) AS charge_count,
    ROUND(SUM(c.usd_amount), 2) AS total_usd,
    COUNT(DISTINCT c.from_address) AS unique_buyers
FROM crosschain.agents.mpp_charges c
LEFT JOIN crosschain.agents.mpp_servers s USING (memo_server_hash)
WHERE c.block_timestamp >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY s.name, s.category
ORDER BY total_usd DESC
LIMIT 20;