What Is a Graph?
A graph is a data structure made of:
- Nodes = Solana accounts
- Edges = relationships between accounts
As an example, let’s examine how token accounts relate to other accounts in Solana using a graph structure:
The Token Program Account (typically SPL Token) is the program that defines how tokens work on Solana.
The Mint Account represents a specific token type (like USDC, BONK, etc.).
Each Token Account holds a balance of that token and is linked to:
- the Mint Account to indicate which token it holds,
- and an Owner Account, which is the user or program that controls the balance.
Each arrow represents a directed edge from one account to another—defining a relationship that bots and validators can use to understand token flows and ownership.
In practice, the graph grows more complex: a single Token Program manages many Mint Accounts (like SOL, USDC, etc.), and each mint can have many Token Accounts—each owned by different users.
This expanded graph shows how multiple tokens (like SOL and USDC) and multiple holders create a network of interconnected accounts.

Why Graphs? Why Now?
Building a profitable trading bot on Solana is hard. Here’s why:
Old Way: Polling Raw Accounts | New Way: Subscribing to the Graph |
---|---|
🌀 You poll thousands of accounts | 📡 You get only relevant updates via the graph |
🔍 You track state, not relationships | 🌐 You understand how accounts relate (ownership, delegation, position) |
🧮 You reconstruct logic from bytes | 🧠 You get edges with semantic meaning and slot info |
💰 High compute + RPC costs | ⚡ Efficient sync with only the accounts you care about |
The fastest path to a trade isn’t scanning the chain —
it’s following edges.
How CatScope Graphs Work
CatScope graphs are built inside the validator using a system of two components:
-
Geyser Plugin — generates and maintains the full account graph.
-
Edge Generator — supplies edges that describe relationships between accounts.
What Is the Edge Generator?
The Edge Generator is a WASM-based module that runs alongside the validator and emits relationship edges for specific Solana programs.
Each Edge Generator implements a GuestFilter
, which:
- Parses account data for a particular program (like Solpipe, Orca, or Raydium),
- Extracts relevant fields (owners, mints, vaults, etc.),
- Emits structured edges describing how accounts relate.
These edges are passed to the validator’s Geyser plugin, which integrates them into a live, slot-by-slot graph.
Each Solana protocol (like Orca, Raydium, Solpipe) needs its own Edge Generator module — also called a filter. These filters know how to:
- Decode the program’s account layout,
- Identify relationships (e.g. which vault belongs to which pool),
- Emit structured
FilterEdge
connections like:let edge = FilterEdge { from: pool_account, to: token_vault, weight: WEIGHT_DIRECT, slot: header.slot, };
Example: Orca Whirlpool Filter
Writing a new filter is straightforward for anyone who:
-
Knows Rust (at a basic level), and
-
Understands how a program’s accounts are related.
For example, here’s the simple visual graph of Orca Whirlpool accounts:

From this diagram, we can say things like:
- “This pool links to these two token vaults”
- “Each vault links to its underlying mint”
Each arrow becomes an edge.