Circles_subgraph was built with a custom AssemblyScript subgraph that reconstructs full token transfer paths, paired with a React-based frontend that visualizes trust flows using Sankey diagrams and supports natural-language queries via an OpenAI-integrated backend.

Claim

Quotes that support claims

We built a custom subgraph using The Graph Protocol to go beyond just tracking basic transfer events. The smart contracts emit complex events like StreamCompleted, which can represent 100s or 1000s of low-level token movements. To make this actionable, we wrote custom logic in AssemblyScript that reconstructs complete transfer paths: It listens for StreamCompleted events. It gathers all related TransferSingle and TransferBatch events in that transaction. We build a flow network and decompose it into individual paths using a custom findAllPaths function. These paths are stored as entities like TransferPath and TransferHop for later querying.
To add intelligent querying, we introduced an MCP bridge (Node.js/Express backend) that connects the frontend to the subgraph via OpenAI. How it works: Users ask a natural-language question in the chat UI. The backend sends the message to the OpenAI API. The model returns a GraphQL query. The MCP client executes this query against the subgraph. The result is formatted and returned to the frontend. This enables on-the-fly queries about addresses, balances, trust links, and even custom transfer logic—without needing to understand GraphQL.

Referenced by

CCTUP and Circle_subgraph

Crypto news

Data block