The Problem

No visibility into x402 payment activity on Aptos. Developers and facilitators need analytics to understand usage patterns, revenue, and ecosystem health. Standard explorers aren't built to differentiate a routine transfer from a specific x402-gated API call. Without a custom indexer, developers cannot see real-time revenue stats, and buyers cannot track their consumption across various AI agents.

What to Build

You will build a specialized indexing service that filters the Aptos transaction stream for x402-compliant metadata. This service will store processed data in a relational database and expose it via a developer-friendly GraphQL API and a real-time dashboard.

Core Features

  1. Real-time Payment Tracking: Monitor the blockchain for fungible asset transfers that match x402 patterns
  2. Revenue Analytics: Track total payment volume, revenue by API, top earners
  3. API for Developers: GraphQL or REST API to query payment history

Here is an example pseudo GraphQL Schema:

<aside>

Note on Code Examples

Some problem statements include pseudocode or illustrative code snippets. These are meant to convey ideas and possible approaches, not production-ready implementations. The code may be incomplete or non-functional by design. Builders are encouraged to adapt, extend, or replace it as part of the hack.

</aside>

query {
  payments(
    limit: 10
    orderBy: timestamp_DESC
    where: { recipient: { _eq: "0x123..." }, asset_type: { _eq: 
"USDC" } }
  ) {
    version 		# Aptos unique transaction version
    hash
    sender
    amount
    asset
    timestamp
    api_id 		# Metadata parsed from the x402 header/memo
  }
  apiStats(apiId: "weather-api") {
    totalRevenue
    paymentCount
    uniquePayers
    avgPaymentAmount
  }
}

Dashboard Views

Additional Developer Resources

To help you move faster, leverage these Aptos-specific tools: