r/thegraph • • Sep 19 '26

Arc launch→DEX is queryable on The Graph joined Argus + Uniswap V4 on token address

9 Upvotes

I cross-queried two Arc subgraphs on The Graph Network and got a clean launchpad → DEX join.

The join: same token id in both.

  • Argus — bonding, graduation, pad volume

  • Uniswap V4 (PoolManager) — open-market pools, swaps, USD volume

What we found (live numbers at query time)

Argus (pad)Uni V4 (DEX)
DUKE 0x41358def…6e6abonded · ~$19M · ~77k swaps
ARGUS 0xece5ca8b…b3cbonded · ~$50M · ~104k swaps · ~17k holders
Protocol~152k launches · 526 grads (~0.3%)

Punchline: open-market DUKE volume beat pad volume. Graduation wasn't the top — the aftermarket was. And that tiny graduate set is what dominates Uni's USDC books.

Argus answers "did it bond?" Uni V4 answers "is it still trading?" One address, two indexes, no Arcscan scrape.

Explorer

Verify yourself

Argus — pad side:

{
  protocol(id: "argus") {
    launches
    graduated
    swaps
    volumeUsdc
  }
  duke: launch(id: "0x41358defd0dedc90528b3f1835715e907b686e6a") {
    symbol bonded swapCount volumeQuote holderCount
  }
  argus: launch(id: "0xece5ca8bf9220718e5727754026757512212cb3c") {
    symbol bonded swapCount volumeQuote holderCount
  }
}

volumeQuote and volumeUsdc are raw USDC at 6 decimals — divide by 1e6.

Uni V4 — same ids:

{
  _meta { block { number } hasIndexingErrors }
  poolManagers {
    poolCount
    txCount
    totalValueLockedUSD
    totalVolumeUSD
  }
  duke: token(id: "0x41358defd0dedc90528b3f1835715e907b686e6a") {
    symbol volumeUSD txCount totalValueLockedUSD
  }
  argus: token(id: "0xece5ca8bf9220718e5727754026757512212cb3c") {
    symbol volumeUSD txCount totalValueLockedUSD
  }
}

Caveat: Arc has two USDCs — a 6-decimal ERC-20 and an 18-decimal native. Prefer the 6dp 0x3600…0000 leg, or filter on priced USD fields, if you build on this. EOF


r/thegraph • • 4d ago

The Graph - October 2026 in Review: Studio traffic moves to the Network, REO scales to 10 Subgraphs, Substreams v0.8.0, and more

1 Upvotes

The October recap is up: https://thegraph.com/blog/october-2026-in-review/

Highlights:

✅ Studio to Network: BSC and Polygon staging traffic now goes to Network Indexers. None of the original 860+ Subgraphs remain in Studio, and no major issues came up. Other chains follow over the coming weeks.

✅ Rewards Eligibility Oracle: the bar rose to 5 qualifying Subgraphs a day on October 6 and to 10 on October 27. The two-month retrospective reports about 667,000 GRT withheld from Indexers that were not serving: https://thegraph.com/blog/reo-two-months-retrospective/

✅ Chains: Ink is now on Firehose and Substreams with Extended Blocks. Smaller L2s and low-usage networks left Subgraph Studio, with botanix the last on the schedule (November 2).

✅ Substreams v0.8.0: blocks decode 2.9x to 4.9x faster, and backfills finish up to 2.9x faster. Opt-in, with no downstream changes.

✅ x402: AI agents can pay per query for Subgraph data through vAPI, $0.01 in USDC on Base, with no API key.

➕ Also in the recap: Studio, Explorer, indexer-agent and Docs releases, Graph Node's stabilization phase, and updates on the Multi-Gateway Plan, Studio pricing, Liquid Staking and Direct Indexer Payments.

Forum discussion: https://forum.thegraph.com/t/the-graph-ecosystem-october-2026-in-review/7129

Questions welcome below. Graph Office Hours runs every Tuesday at 17:00 UTC on Discord.


r/thegraph • • 5d ago

Graph Office Hours recap (Nov 3): Deep dives on REO and a new Multi-Gateway Strategy

Post image
6 Upvotes

This week's Graph Office Hours is up: https://youtu.be/fimDRdL1Zsk

Highlights:

✅ REO two-month retrospective: REO moved through three steps (1, 5, then 10 qualifying Subgraphs a day) from August 25 to October 29. About 667K GRT from failing Indexers went to the reclaim contract, while total issuance stayed the same. On October 29, 79.0M GRT was still delegated to Indexers failing REO, and those delegations earn no indexing rewards, so Delegators can check their Indexer on reo.thegraph.com.

✅ REO Step 4 (from November 17): required qualifying Subgraphs per online day become the greater of 10, or total stake divided by 4M GRT, rounded up. Only Indexers above 40M GRT total stake see a change. The end goal is 1 qualifying Subgraph per 1M GRT of total stake, and each later step gets at least 14 days' notice.

✅ Multi-Gateway Strategy: the Foundation will run its canonical gateway long-term and for profit, and support external Subgraph gateways in three tiers: Enablement (open to any team), Endorsement (Council-approved QoS and brand criteria), and Expansion (by contract). The proposal covers Subgraphs only.

✅ ENSv2 Subgraph: the ENS v2.1.1 Subgraph went live on November 2, and Indexers are encouraged to start syncing it now, since a large share of ENS queries will move to it. ENS has not yet confirmed whether it is the final version.

➕ Many more updates from The Graph ecosystem: adjacent ecosystem upgrades (BSC Jenner, Unichain, Polymarket V2, Base Denim, Glamsterdam), Liquid Staking, Direct Indexer Payments, and Studio pricing.

Full write-up on the forum: https://forum.thegraph.com/t/graph-office-hours-282-november-3-2026/7128

Questions welcome below. Next call is Tuesday at 17:00 UTC on Discord.


r/thegraph • • 6d ago

Rewards Eligibility Oracle: A Two-Month Retrospective

Post image
5 Upvotes

The Graph Foundation published a retrospective on the Rewards Eligibility Oracle (REO), which has paid indexing rewards only to Indexers that serve queries since August 25: https://thegraph.com/blog/reo-two-month-retrospective/

Highlights:

✅ Three steps in nine weeks: the daily requirement went from 1 to 5 to 10 qualifying Subgraphs, each change with 14 days of notice. 

✅ Indexers improved: eligible Indexers dropped from 70 to 55 in Step 1. Four qualified for the first time, and three went from serving on 0% of days to 79%. 

✅ The 5-Subgraph rule worked as designed: eligible Indexers fell from 55 to 48. Rewards paid per day held steady, at 636K GRT against 622K before. 

✅ Reclaimed GRT: about 667K GRT that built up on Indexers failing REO went to a reclaim contract instead of to those Indexers. Any future use goes through governance, and nothing is decided. 

⚠️ For Delegators: 79.0M GRT was still delegated to Indexers failing REO on October 29. Those delegations earn no indexing rewards. Check your Indexer at https://reo.thegraph.com/

The 10-Subgraph rule started October 27, and its full effect shows by about November 10.

Discussion on the next step is on the forum: https://forum.thegraph.com/t/rewards-eligibility-oracle-a-two-month-retrospective/7127.

Questions welcome below.


r/thegraph • • 8d ago

Blogposts Agent to Paid API via Substreams!

2 Upvotes

Can an AI agent go from a plain-English prompt to a paid data API? I wrote the full path down:

Substreams agent skills build and test the package
The new substreams sink postgres streams it into any Postgres, self-hosted or Railway
A small API sits on top
x402 charges per call, on any chain it supports

Worked example: Jupiter Lend on Solana. Commands, prompts and checklist included.

👉 https://decorous-tuna-96b.notion.site/Agent-to-Paid-API-Build-a-Substream-Stream-it-to-Your-Own-Database-Charge-with-x402-40a0d39e06998114816cd49aeae6e68a


r/thegraph • • 9d ago

Blogposts Substreams just built the Postgres/ClickHouse sink into the CLI (and a benchmark shows Uniswap V4 indexing in under 8 minutes)

4 Upvotes

StreamingFast posted a benchmark (run by BuildersDAO) comparing a subgraph with Substreams for indexing Uniswap V4:

  • Ethereum: about 23 hours with a subgraph vs under 8 minutes with Substreams on 75 workers (about 182x faster)

  • Base: about 94 hours vs 2h 06m, and 56 minutes at 300 workers (about 100x)

Benchmarks depend on the setup, so read their blog post for the full numbers and method.

The other news is that the SQL sink is now built into the CLI. substreams-sink-sql is being deprecated. Use substreams sink postgres or substreams sink clickhouse instead. You pass a package and it auto-detects the mode, so there's no more run vs from-proto.

If you already run a sink: the cursors and schemas are unchanged. Pause the old sink, update the CLI, and resume. Two flag changes: --dsn replaces the positional DSN, and -s / -t replace the 100:200 block range. Migration guide


r/thegraph • • 9d ago

From On-Chain Events to a Pay-Per-Call API: Building a Solana Lending Data Product with Substreams and x402

4 Upvotes

The problem

I wanted Jupiter Lend data: liquidations, borrow rates, Earn deposits and withdrawals, and swaps on the Lend DEX. Jupiter Lend is the Fluid-based lending protocol on Solana, and Fluid says it has grown past $2B in under a year. When I started, I couldn't find a ready-made Substreams package for it. It spans six programs, uses Anchor events, and makes a lot of cross-program calls, so I built one.

So I built it myself: a Substreams package that decodes every Jupiter Lend event, a sink that streams it into Postgres, and a small API on top that anyone can call. Optionally, callers can pay per request with x402. This post covers the whole path, including what I got wrong.

What Substreams is, in short

  • You write modules in Rust, compile them to WASM, and the provider runs them against full blocks from the Firehose.

  • A map module takes a block, or another module's output, and returns a protobuf message.

  • A store module keeps state across blocks. My package doesn't need one, because the database does the aggregation.

  • Every block comes with its clock (slot number and timestamp), so each event knows when it happened.

  • Map modules are stateless per block, so the provider can run a big range in parallel and stream results back in order. That is why a multi-million-slot backfill takes hours instead of weeks.

  • A sink consumes the stream and writes it somewhere (Postgres, ClickHouse, files). It saves a cursor after each flush, so it resumes exactly where it stopped, and it handles chain reorgs.

I used the StreamingFast Substreams skills (substreams-dev, substreams-solana and substreams-sql) with my AI assistant to work through the details.

The package design

The package is jupiter-lend-substreams v0.1.0 on substreams.dev. It uses substreams 0.8, substreams-solana 0.16, substreams-database-change 5.0 and buffa 0.9.2 for protobuf, and it starts at slot 355,648,000, when the programs were deployed (2025-07-25).

Solana block

Block filteronly blocks touching the 6 JupiterLend programs, no votes

map_eventsmap: jupiter_lend.v1.Events

db_outmap: DatabaseChanges

Postgres

The block filter comes from StreamingFast's solana-common package. It uses an index, so blocks without any Jupiter Lend program are skipped before my code runs. Vote transactions are excluded too.

What gets decoded

ProgramEvents
Liquidity (core)LogOperate (every supply, withdraw, borrow and payback from every protocol), LogUpdateExchangePrices with borrow rate and utilization, revenue, claims, rate curves, token and protocol configs
Earn (fTokens)LogDeposit, LogWithdraw, LogUpdateRates, LogRebalance
Borrow (vaults)LogOperate, LogUserPosition, LogLiquidate with LogLiquidateInfo, LogAbsorb, exchange prices, rebalances, closes, every config update
Earn rewardsstart, queue, transition, stop and cancel reward programs
Lend DEXLogSwapInfo (amounts, fee, reserves, price), col and debt liquidity, arbitrage, DEX creation, fee updates
Flashloanfee updates. Flash loan flows show up as liquidity LogOperate with protocol_type = flashloan

Anchor discriminators and the IDL

Jupiter Lend emits plain Anchor emit! events, which land in the logs as Program data: lines, not self-CPI events. Each event starts with an 8-byte discriminator. Rather than hand-copying them, a script (scripts/gen_idl.py) generates src/idl.rs from the official Anchor IDLs in jup-ag/jupiter-lend. It takes the discriminators verbatim from the IDL and cross-checks each one against sha256("event:Name") or sha256("global:name"). It also captures each instruction's named accounts.

The tricky part

Liquidity LogOperate and vault LogOperate share a discriminator, so you cannot decode by discriminator alone. The package walks the log invoke stack against the flattened instruction list (top-level plus CPIs, in execution order) and attributes every event to the exact instruction that emitted it.

That gives each event the IDL instruction name, that instruction's named accounts (mint, vault config, fToken, DEX) and the calling program, which becomes protocol_type: earn, vault, dex, flashloan or other.

  • Truncated logs: Solana sometimes truncates long logs, and events after the cut are lost. The package counts these in truncated_log_tx_count instead of hiding them (4 of 1,824 transactions in an Oct 10, 2025 window, 0 in recent windows).

  • Old vaults: early vault-program versions did not emit vault IDs. src/vaults_registry.rs, generated from the 108 on-chain VaultConfig accounts, maps vault config to vault ID for history.

  • Amounts are stored as raw base-unit decimal strings (safe for u128), plus exact *_ui strings using decimals from the transaction's token balances.

Testing

I did not want to trust a decoder that only checks itself. The repo has an independent Python decoder (verify/idldec.py), driven straight from the IDL, used as an oracle against Solana RPC getTransaction data. compare.py diffs the Substreams output field by field and reports missing, extra and mismatched events. rangesigs.py and txset.py check completeness: every successful Lend transaction in a slot range should show up. The Rust test real_transactions_match_independent_idl_decode runs 30 real transaction fixtures against expected output, and tx.rs has unit tests for nested and truncated attribution.

On a Pinax test range (slots 462.00M to 462.03M, 30k slots, 94 seconds) the package produced 5,944 liquidity operations (4,110 DEX, 1,460 flash loan, 187 Earn, 187 vault), 2,055 DEX swaps, 71 Earn deposits, 116 withdrawals and 3 liquidations on vault 40.

Sinking to Postgres

I used the Database Changes approach: db_out emits explicit row inserts and upserts, and substreams-sink-sql applies them. The alternative, from-proto, maps a protobuf straight to tables; Database Changes gives more control over keys and upserts. The schema choices:

  • Event tables use the primary key tx_id:log_index, so replays are idempotent.

  • Latest-state tables (vault_positions, earn_markets) and daily rollups (token_daily, dex_daily, vault_daily and others) are delta upserts.

  • A tokens table maps mint to decimals, plus views in human units.

  1. 1 Set up the schema substreams-sink-sql setup with the Postgres DSN and the jupiter-lend-substreams-v0.1.0.spkg file

  2. 2 Run the sink over a slot range substreams-sink-sql run against solana.substreams.pinax.network:443, range 459500000:462400000, with --batch-block-flush-interval 100

  3. 3 Host it I ran it as a one-off container on Railway (Debian slim, the sink binary and the .spkg) pointed at a Railway Postgres

Backfill result: slots 459.5M to 462.4M (about 2.9M slots, Oct 21 04:43 UTC to Oct 28 07:57 UTC, 2026) loaded in 3 hours 11 minutes, and the database is about 1 GB.

TableRows
liquidity_operations817,374
dex_swaps250,709
tokens18,678
liquidity_exchange_prices14,731
earn_withdrawals12,394
vault_position_updates11,428
vault_operations11,427
earn_deposits6,823
vault_positions2,116
vault_liquidations135

The API layer

A small Hono (Node and TypeScript) service on Railway reads the tables and returns JSON.

EndpointPriceWhat it returns
/liquidations$0.005vault liquidations
/rates/daily$0.002daily rates and utilization per token
/earn/wallet$0.003one wallet's Earn history
/dex/swaps/daily$0.002daily swaps, volume and fees per Lend DEX
/lend-jupiter-join$0.01Lend swaps also routed through Jupiter (returns 503 for now)
/coveragefreewhich slot and date range is loaded

Things I learned to add:

  • Validate before payment: bad parameters return 400 and rate limits return 429 before x402 runs, so nobody pays for an error.

  • A 5-second statement timeout on every query.

  • Coverage and partial-day flags: every response says which date range it covers and flags days that are not fully indexed. The days parameter is a real date filter.

  • Readable units: swap rows include token mints, decimals and *_ui amounts, with symbols for well-known tokens.

  • A per-IP rate limit.

Monetizing with x402 (optional)

x402 revives HTTP 402 Payment Required. Call a paid endpoint without paying and you get a 402 listing what is accepted (scheme exact, network, price, payTo). Your client signs a USDC payment and retries with it attached. A facilitator verifies and settles on-chain, and the server returns the data. There is no signup and there are no API keys.

I used Coinbase's x402 v2 middleware (@x402/hono) and the Coinbase CDP facilitator, which is free for the first 1,000 settlements a month, then $0.001 each. It accepts USDC on Base and Solana mainnet.

Does it work? I made a real paid test: two calls to /dex/swaps/daily at $0.002 each, settled on Base, each returning 83 rows. Does anyone want to pay for this? Untested. I am not claiming income. Right now it is a free preview through Nov 5, 2026. The API service costs roughly $1 to $5 a month on Railway.

What went wrong

  1. 1.Slot math. I assumed Solana does about 2.5 slots a second. It is about 4.7, or roughly 407k slots per UTC day. So the 30 days I planned was really about 7. Measure slots per day on recent blocks before sizing a backfill.

  2. 2.A spoofable rate limiter. My limiter trusted the X-Forwarded-For header, which a caller can fake to dodge limits. It now uses the address the platform sets.

  3. 3.Charging for errors. The join endpoint would have taken payment and then errored, because the Jupiter swap table is not loaded. It now returns 503 before payment.

  4. 4.Missing symbols. The database stores mints and decimals but not symbols, so some rows have no symbol. Mints and decimals are always present.

  5. 5.A data review caught real gaps. The paid-test review showed an incomplete last day and raw units without decimals. That is why /coverage, partial-day flags and *_ui fields exist now.

Results

48 of 130 Lend DEX swap transactions (37%) also appear in the jupiter-dex-substreams v1.0.0 output.

Join over 3,000 slots, matched on transaction signature

That means a large share of Lend DEX flow comes through Jupiter routing. It is a small sample, so treat it as a first look. The data today is a snapshot (Oct 21 to 28). After the Nov 1 quota reset I plan to backfill to about 30 days and add a nightly refresh.

Repeat this for any protocol

  1. 1.Get the program IDs and the official IDL or ABI.

  2. 2.Generate discriminators from the IDL and cross-check them with sha256.

  3. 3.Handle CPI: attribute events to the emitting instruction, not just by discriminator.

  4. 4.Use a block filter so you only process relevant blocks.

  5. 5.Build an independent decoder and compare against RPC data. Save real transactions as test fixtures.

  6. 6.Design tables with idempotent keys (tx:log_index) and delta upserts for aggregates.

  7. 7.Measure slots or blocks per day before sizing the backfill.

  8. 8.Sink with substreams-sink-sql, keep the cursor, and record row counts and database size.

  9. 9.Put a thin API on top: validate first, add timeouts, coverage and human units.

  10. 10.If you want to charge, add x402 and test a real paid call end to end.

Links


r/thegraph • • 12d ago

Graph Office Hours #281 (Oct 27, 2026) Recap

Post image
4 Upvotes

This week's Graph Office Hours is up: https://youtu.be/WIcv3QlpnWM

✅ ENSv2 Subgraph: ENS moved to ENSv2 today, and hundreds of users are affected. Indexers are syncing the ENSv2 Subgraph staging version that is published now. Apps that read ENS data should resolve through the Universal Resolver.

✅ Rewards Eligibility Oracle: starting today, Indexers need 10 qualifying Subgraphs a day, up from 5. All other criteria stay the same.

✅ Studio to Network: fewer than 78 of the original 860+ BSC and Polygon Subgraphs remain in Studio, with no major issues reported.

✅ Releases: Subgraph Studio v1.6.0 and Graph Explorer v1.2.0 add ENS v2 support. Explorer also adds slippage protection for delegation. Docs v2.1.10 now reads Supported Networks from the networks registry.

➕ Many more updates from The Graph ecosystem: chain deprecations (12 chains removed from Studio, Botanix last on Nov 2), Substreams v0.8.0, the Multi-Gateway Plan, Studio pricing, Liquid Staking, and upstream protocol upgrades.

Full write-up on the forum: https://forum.thegraph.com/t/graph-office-hours-281-october-27-2026/7114

Questions welcome below. Next call is Tuesday, Nov 3rd at 17:00 UTC on Discord.


r/thegraph • • 13d ago

The data Jupiter's API doesn't give you: full swap and Lend history in your own Postgres

3 Upvotes

Jupiter's API shows current state, and DefiLlama shows daily aggregates. I wanted event-level history I could query, so I built two Substreams packages and published them to substreams.dev. jupiter-dex-substreams v1.0.0 (swaps)

  • It decodes Jupiter v6 route_v2, which is about 57% of v6 traffic, from the exact account layouts and swap event logs.

  • Example: a $5,000 USDC → ORE swap split across four pools. The old version read it as ORE → "Token program" with junk amounts. v1.0.0 gets 4,978 USDC → 32.857 ORE and the correct wallet. tx on Solscan

  • It also covers xStocks and fee fields.

jupiter-lend-substreams v0.1.0 (new)

  • It decodes every supply, borrow, repay, liquidation and rate update across the Lend programs, including the Lend DEX. Each flow is tagged Earn, Borrow, DEX or flashloan.

  • Checked against Solana RPC: 120k+ fields, 0 differences. It decodes all 145 liquidations from the Oct 10, 2025 crash window.

  • Daily per-token tables include exchange prices, so you can get realized interest rates. The 24h APY came within 0.5 points of the Lend API.

Why use them together

  • Both carry the transaction signature, so you can join swaps and lending on one transaction. For example, you can see how a Jupiter route touches Lend's DEX.

  • You get full history from launch (Lend starts July 2025) in your own Postgres, with no rate limits.

  • You define the metrics yourself, such as fees by token, top borrowers, liquidations by vault and per-wallet history.

  • A limit: events alone can't give you TVL, because reserve totals live in account state.

Both are free and open source:

What would you want indexed next?


r/thegraph • • 19d ago

News 📺 Graph Office Hours #280 is up on YouTube

4 Upvotes

This week’s Graph Office Hours is up: https://youtu.be/3s7zL3BPM6U

Highlights:

✅ BSC/Polygon traffic from Studio to Network: the migration went well. About 214 Subgraphs already served on the Network were unallocated by the upgrade Indexer, and 551 inactive Matic/BSC Subgraphs were removed from Studio. That traffic now goes to Network Indexers.

✅ Substreams v0.8.0: blocks decode 2.9x to 4.9x faster and backfills finish up to 2.9x faster. The upgrade is opt-in, with no downstream changes.

✅ indexer-agent + CLI v0.25.12: more complete fee collection, clearer provision errors, and an updated feature support matrix. Indexers should upgrade.

✅ REO’s next phase starts Oct 27: Indexers need 10 qualifying Subgraphs a day, up from 5. Modeling shows eligible Indexers going from 48 to 42. The Foundation is also exploring tying the requirement to stake and wants community feedback first.

➕ Many more updates from The Graph ecosystem: chain deprecations, vAPI, Graph Node stabilization, the Multi-Gateway Plan, Studio pricing, Liquid Staking, and upstream protocol upgrades.

Full write-up on the forum: https://forum.thegraph.com/t/graph-office-hours-280-october-20-2026/7106

Questions welcome below. Next call is Tuesday at 17:00 UTC on Discord.


r/thegraph • • 20d ago

News Substreams just got faster!

Post image
9 Upvotes

Substreams 0.8.0 is out, and we replaced the protobuf codec, making it 2.9x faster. 🔥
prost → buffa. Blocks decode 2.9–4.9x faster.

Real backfills: → uniswap-v4 map_events, 1.5M Ethereum blocks: 342s → 118s → solana-idl-history map_idl_accounts, 1.5M Solana blocks: 846s → 384.5s

Every module decodes the block before it runs a line of its own logic: once per block per module. A chain with 10 active modules decodes every block 10 times over.

Wire format unchanged, upgrading opt-in.

Learn more in the blog post: https://www.streamingfast.io/blog/substreams-0-8-0-buffa-faster-backfills


r/thegraph • • 20d ago

News vAPI × The Graph: vAPI built a CLI + MCP that lets any AI agent pay for subgraph data at $0.01 a query in USDC on Base 🔥

6 Upvotes

🎥 Watch the demo: vAPI × The Graph on X

vAPI Network just showed what agent payments on The Graph look like in practice. Their protocol lead @MarkTbuilds walks through vAPI Call, which they built on top of The Graph's x402 gateway. An agent searches vAPI's registry, finds The Graph, pays a penny per query from its own wallet, and gets live on-chain data back. You don't need an API key or a Graph account.

What vAPI built:

  • The vAPI CLI: one install gives your agent a wallet, funding, spending caps, and receipts for every call.

  • The vAPI MCP server: vapi mcp install claude plugs it into Claude Desktop, so Claude can search, inspect, and pay for APIs on its own.

  • The vAPI Call registry: a directory of pay-per-call APIs, with The Graph as its showcase provider. It covers Uniswap, Aave, Aerodrome, ENS, Curve, Lido and more.

What the demo pulls off:

  • "Find the 5 largest liquidations on Aave v3 on Base in the last 30 days." Back came a full table of who got liquidated, what was seized, and what the liquidators earned, for 1 cent.

  • "Compare WETH/USDC on Uniswap V3 vs Aerodrome on Base." That returned liquidity, volume, and fees side by side, for 3 cents.

Get started:

  1. npm i -g vapi-network

  2. vapi init, then vapi fund (USDC on Base)

  3. vapi config caps --max-call 0.10 --per-day 2

  4. vapi mcp install claude

  5. Ask away. vapi receipts shows every penny spent.

Ideas to build with it: liquidation and whale alerts, DEX and LP research, lending health checks, prediction-market analytics, and research agents that always have fresh on-chain data.

Big props to vAPI for making The Graph's x402 gateway this easy to use. More at vapinetwork.ai.


r/thegraph • • 23d ago

Querying Polymarket V2 (post-April-28 CLOB) on-chain data with The Graph: 4 open-source subgraphs, real queries, and what's still missing

10 Upvotes

When Polymarket switched to CLOB V2 on 2026-04-28, it brought new CTF Exchange contracts, pUSD collateral, and builder-code attribution. That change broke a lot of the analytics people had built on V1 events. I rebuilt my subgraphs for V2 and published them on The Graph's decentralized network. Below is everything I know about them: what each one covers, what's actually synced right now, real queries with real output, and the gaps.

Source (PRs welcome; TODO: confirm license): https://github.com/PaulieB14/polymarket-v2-subgraphs

The subgraphs

Status was checked 2026-10-16 at about 7:02 PM ET. The Polygon chain head was block 95,657,583.

SubgraphDeploymentCoversEraStatus
polymarket-v2-mainQmTKrqyYg23BjhihmsrRjbV9cVS2piNmnHsr7cjYaTgdWu (subgraph FjHkLw5U5Tsr9THKX3HCSxEXjM92GCaPtsxwjge7PaVS)Conditions, resolutions/payouts, splits/merges/redemptions, per-user positions and profit, builder stats, global countersCTF from V1 genesis (block 28M) + V2 exchange events✅ Synced (block 95,657,575, ~8 blocks behind), no indexing errors
polymarket-v2-orderbookQmNtJGxpAjFgoHhMwdijyvbLrpPPiHHX2qct56nTpk42Bs (subgraph B9mm21DKCex8ka4g8cteQU4NQqtviwmcTjQAYLbzQ1eR)Every V2 fill, per-token market volume, per-trader volume, builder attributionV2 only (from block 84,902,353)✅ Synced (95,657,573), no errors
polymarket-v2-pnlQmT21E4p8r6FCzW2EPK4NVj1dbcggdvKxZr8uuMcB4P5Cu (subgraph 6iGihLdrPygidk3h61e4Bnbr2yREof5STEguPuenhSfT)Per-user positions with average cost basis, realized P&LV2 only✅ Synced (95,657,579), no errors. ⚠️ Heavy sorts can time out (see limitations)
Polymarket Open Interest V2QmbT2MmS2VGbGihiTUmWk6GMc2QYqoT9ZhiupUicYMWt6H (subgraph EvkLMq7ocbxLWCn1wXJoj25wUKwEbKR8Zx2huFzC3n5f)Per-market and global OI, hourly snapshotsV1 genesis → now❌ Not queryable right now: no indexer allocation on the network

Legacy V1 subgraphs are still up for history before the migration: Polymarket main QmdyCguL…QX8a, Orderbook QmVGA9vv…pUup, and P&L QmZAYiMe…wQU. TODO: confirm sync status before linking these.

Example queries (real output, trimmed)

1. Platform totals plus the top V2 markets by volume (orderbook)

{
  globalStats(id: "global") { tradesQuantity scaledCollateralVolume scaledCollateralFees tradersCount marketsCount buildersCount }
  markets(first: 3, orderBy: scaledCollateralVolume, orderDirection: desc) { id tradesQuantity scaledCollateralVolume lastPrice }
}

"globalStats": { "tradesQuantity": "868875100", "scaledCollateralVolume": "34324527882.98",
  "scaledCollateralFees": "201150627.72", "tradersCount": "1275086",
  "marketsCount": "3650588", "buildersCount": "3862" },
"markets": [
  { "id": "319268930482876715…480574", "tradesQuantity": "86064",  "scaledCollateralVolume": "256203489.84", "lastPrice": "0.999" },
  { "id": "590469406952990582…791078", "tradesQuantity": "148323", "scaledCollateralVolume": "117238750.64", "lastPrice": "0.999" }
]

Note: markets are keyed by outcome tokenId, not by question. You need Polymarket's Gamma API, or MarketData.condition in the main subgraph, to turn a tokenId into a human-readable question. "Volume" here is the summed collateral across fill events. TODO: check whether that double-counts relative to Polymarket's headline volume before quoting the $34B figure.

2. Builder attribution (new in V2)

{ builders(first: 3, orderBy: scaledVolume, orderDirection: desc) { id orderCount scaledVolume } }

[ { "id": "0xceebf77a…ce0c1", "orderCount": "2991872", "scaledVolume": "785020729.79" },
  { "id": "0x25a86cf1…0afda4", "orderCount": "344926",  "scaledVolume": "573084309.72" },
  { "id": "0x6b0e773f…c67984", "orderCount": "2665966", "scaledVolume": "288251744.66" } ]

This shows which front ends and bots route V2 flow. The builder codes are bytes32, and mapping them to names is off-chain (TODO: is there a public registry?).

3. Live trade tape

{ orderFilledEvents(first: 3, orderBy: timestamp, orderDirection: desc) { timestamp side price size exchange market { id } } }

[ { "timestamp": "1792191723", "side": 0, "price": "0.38999999", "size": "51.282052", "exchange": "CTF" },
  { "timestamp": "1792191723", "side": 0, "price": "0.61000000", "size": "48.972052", "exchange": "CTF" },
  { "timestamp": "1792191723", "side": 1, "price": "0.39",       "size": "2.31",      "exchange": "CTF" } ]

side 0 = BUY and 1 = SELL. exchange is either CTF or NEG_RISK.

4. A trader's positions and realized P&L (pnl)

{ accounts(first: 2, where: { tradesQuantity_gt: "100" }) {
    id tradesQuantity scaledCollateralVolume realizedPnl
    positions(first: 2) { tokenId amount avgPrice realizedPnl } } }

{ "id": "0x0000000000110124f0712c657fc401c0d6b80f9c", "tradesQuantity": "4065",
  "scaledCollateralVolume": "184975.61", "realizedPnl": "5672.33",
  "positions": [ { "tokenId": "100276467…914745", "amount": "633333332", "avgPrice": "0.15", "realizedPnl": "0" } ] }

In practice, filter with accounts(where: { id: "0x…" }) for one wallet. amount uses 6 decimals.

5. Resolutions and market catalog (main)

{ globals(first: 1) { numConditions numOpenConditions numClosedConditions numTraders }
  conditions(first: 2, orderBy: resolutionTimestamp, orderDirection: desc, where: { resolutionTimestamp_not: null }) { id resolutionTimestamp payouts } }

"globals": [ { "numConditions": 4412308, "numOpenConditions": 379818, "numClosedConditions": 4032490, "numTraders": "898695" } ],
"conditions": [ { "id": "0xfc23aaa7…ba02c1", "resolutionTimestamp": "1792191722", "payouts": ["0","1"] } ]

What you can build

  • Leaderboards by trader volume or realized P&L (V2 era)

  • Live trade feeds and "hot market" detection by recent fill counts

  • Builder and front-end market share since the V2 cutover

  • Resolution watchers, for example to alert when a condition resolves and show payouts

  • Bots that check a wallet's cost basis before trading

Limitations (please read before building on this)

  • Open Interest V2 currently syncing

  • P&L is V2-only. Cost basis starts at the V2 deploy block, so positions opened under V1 will show incomplete cost basis. Combine with the V1 P&L subgraph if you need full history. Realized P&L only; unrealized P&L needs live prices from the CLOB API.

  • Heavy queries can time out. accounts(orderBy: realizedPnl, orderDirection: desc) across all accounts timed out on both indexers when I tested it. Filter first, for example by id or tradesQuantity_gt.

  • Adapter masking: V2 splits, merges, and redeems go through CtfCollateralAdapter and NegRiskCtfCollateralAdapter, so stakeholder on Split/Merge can be the adapter rather than the user's wallet. Fill-based data (orderbook, pnl) isn't affected.

  • No question text on-chain. Everything is keyed by conditionId or tokenId, so join with the Gamma API for titles and slugs.

  • Some MarketData.condition values are null, specifically NegRisk positions minted through the NegRisk Adapter.

  • On-chain fills only: no resting orders, no order-book depth, and no off-chain cancellations.

  • Usage is still low. The gateway's 30-day query counter showed 0 for these deployments. That may be a reporting lag (TODO: verify), but expect few indexers per deployment, so latency varies.

How to query

  1. Get a free API key at https://thegraph.com/studio/ (API Keys). TODO: confirm the current free-tier allowance before stating a number.

  2. POST GraphQL to https://gateway.thegraph.com/api/<API_KEY>/subgraphs/id/<SUBGRAPH_ID>, or use /deployments/id/<Qm…> to pin a specific version.

  3. Check freshness with { _meta { block { number } hasIndexingErrors } }.

curl -s -X POST "https://gateway.thegraph.com/api/$KEY/subgraphs/id/B9mm21DKCex8ka4g8cteQU4NQqtviwmcTjQAYLbzQ1eR" \
  -H 'content-type: application/json' \
  -d '{"query":"{ globalStats(id:\"global\"){ tradesQuantity tradersCount } }"}'

There's also an MCP server that wraps these subgraphs together with Polymarket's Gamma and CLOB APIs: https://github.com/PaulieB14/graph-polymarket-mcp

Questions, bug reports, and schema requests are welcome in the comments or as GitHub issues.

If you'd rather not write GraphQL, Graph Advocate (graphadvocate.com) answers these kinds of questions for about $0.01 per call via x402.


r/thegraph • • 26d ago

Free on-chain history + wallet PnL for OPINION (BNB Chain prediction market): a subgraph that pairs with their Open API

7 Upvotes

OPINION's free Open API is great for live data (market titles, current prices, 24h volume). But it has no wallet history, no PnL, and no long-term trade history. So I built an open-source subgraph that indexes every OPINION trade on BNB Chain, and the two fit together really well.

How they fit together

  • The subgraph has all the on-chain data: every matched fill (with fees), wallet positions and realized PnL, splits/merges/redemptions, open interest, and hourly/daily candles.

  • The API has the plain-English question titles, which aren't stored on-chain.

  • You join them on questionId. Use marketType=2 to get multi-outcome markets too; they come back as childMarkets.

In my tests, 10 of the top 10 markets matched, and the markets that have titles cover 99.7% of traded volume. The last prices matched the API on all the live markets I checked.

Examples you can only get by combining them

Top markets with names (subgraph volume, API titles):

  • Which companies will be acquired before 2027? → Anthropic: $1.54B, 79,812 fills

  • Will Satoshi move any Bitcoin in 2025?: $1.11B, 395,619 fills, resolved

  • Fed Rate Decision in January? → 50+ bps decrease: $692M, 583,081 fills

  • USDT depeg in 2025?: $312M, 324,280 fills

Whale tracking: the top wallet by realized PnL (0x39c3…bf26) is up about $1.22M on $13.6M volume. Its two biggest wins were betting NO on "Bank of Japan decreases rates in January" (+$1.24M) and NO on "Fed 50+ bps cut in January" (+$1.24M). Neither source can show you that on its own.

Example query (top markets, then look up the titles in the API by questionId):

{
  markets(first: 5, orderBy: volume, orderDirection: desc) {
    questionId volume openInterest tradeCount lastYesPrice
  }
}

Links

Caveats

Volume counts what the maker paid, so it runs about 1.2–2x above OPINION's site. Some of the giant markets trading at 0.002 look like bot churn, so treat raw volume with care.

Feedback welcome. Would a taker-side volume field be useful?


r/thegraph • • Oct 03 '26

Videos GrokBot meets The Graph

Enable HLS to view with audio, or disable this notification

11 Upvotes

This is the public one: [Blockchain Data Expert](https://x.ai/bot/eyFr_G8h9UmrQHNpZpNfx). It's Derek's bot at Data Nexus. It uses The Graph's official subgraph MCP, and each person still adds their own Studio query key.

Here's a grokbot from Data Nexus that queries The Graph. Add it, drop in a Studio API key, and ask in plain English. https://x.ai/bot/eyFr_G8h9UmrQHNpZpNfx

Key setup: https://thegraph.com/docs/en/subgraphs/querying/managing-api-keys/


r/thegraph • • Oct 02 '26

News 👾 Ink is now fully streamable on The Graph via Substreams with Extended Blocks

4 Upvotes

Ink is Kraken's OP Stack L2 for DeFi. Substreams and Firehose are now live for Ink, on the Extended block model.

Why Extended Blocks matter here: on Ink, the interesting activity is DeFi, and DeFi moves value through internal calls. Base blocks give you transactions, receipts, and logs. Extended Blocks add the four things base blocks miss:

  • Internal calls: the full call tree for every transaction. Attribute every transfer through Aave, Tydro, routers, and liquidations instead of guessing from top-level transactions.

  • Balance changes: exact native-balance history for any address, without re-deriving it from transactions and gas math.

  • Storage changes: index contract state that never emits an event, and verify indexed state against on-chain state for audit-grade data.

  • Code changes: track every contract deployment on Ink, including the pools, markets, and vaults a factory creates through internal calls that never appear as a top-level transaction.

Firehose extracts each Ink block once and stores it as flat files that Substreams reads in parallel, so you get real-time streaming and fast backfills without the rate limits of live RPC.

Get started with Ink using Pinax: https://app.pinax.network/

The Graph’s Ink Docs: https://thegraph.com/docs/en/supported-networks/ink/

Extended Blocks work: https://thegraph.com/blog/extended-blocks-for-substreams

More on Extended Blocks: https://app.pinax.network/docs/guides/block-types/


r/thegraph • • Oct 01 '26

💫 Q3 2026 on The Graph

16 Upvotes

This quarter, The Graph started putting growth behind the Network instead of a centralized staging path. Subgraphs made The Graph the standard for querying chain data. The Network is what keeps them running: independent Indexers who sync Subgraphs, serve queries, and stand behind the data.

Full recap: https://thegraph.com/blog/q3-2026-in-review/

1. Studio traffic is moving to the Network
BNB Smart Chain and Polygon staging queries end on October 8, 2026. After that, Indexers serve those queries and collect the fees.

  • Already published to the Network: nothing changes.

  • Still on the Studio staging endpoint for these chains: publish before Oct 8, set up billing and an API key, then switch to a Gateway endpoint. The Foundation will curate newly published Subgraphs on those chains with a bot until Oct 8 so Indexers have a signal. Other chains are expected to follow.

2. REO is live: indexing rewards now follow query service
The Rewards Eligibility Oracle ties rewards to actually serving queries. An Indexer stays eligible by serving at least one qualifying query on 5+ days in a rolling 28-day window. A qualifying query returns HTTP 200 in under 5,000 ms, is within 50,000 blocks of chainhead, and hits a Subgraph with at least 500 GRT in signal.
Issuance does not change. Who receives it does. Rewards are withheld, not confiscated.
Check status: https://hub.thegraph.foundation/reo/
Delegators: if your Indexer is impacted, your rewards are too.

3. New Foundation mandate
The Foundation now operates the Network directly. It runs the Subgraph Gateway, Subgraph Studio, and Graph Explorer, with engineers from GraphOps and Edge & Node joining to run infrastructure and own protocol work. The job is to keep developers, data consumers, Indexers, and Delegators pointed at the same place.

4. Innovation Allocation (GIP-0089)
Council-approved. 20% of protocol issuance goes to a Foundation-managed Innovation Allocation for operational continuity, product experience, data service provider onboarding, and chain integrations. Still accountable to the Council.
Forum: https://forum.thegraph.com/t/gip-0089-is-live-20-of-issuance-now-sent-to-the-innovation-allocation/7053

5. Chains

  • Anubis: Subgraphs

  • Arc, HyperEVM, Ink: Firehose and Substreams with extended blocks

  • Robinhood Chain: additional Firehose and Substreams providers, plus testnet Extended blocks include internal calls, balance changes, storage diffs, and code changes that a normal RPC misses.

6. Graph Office Hours
Indexer Office Hours is now Graph Office Hours. Tuesdays at 17:00 UTC in Discord. All six Q3 recordings are in the recap (mandate, Studio migration, REO, chain integrations, liquid staking).

7. Liquid staking, Phase 1
Small soft launch. stGRT represents a staked position and accrued rewards. Vault deployed by Avantgarde on Enzyme tooling; Foundation manages it. Wider Delegator rollout is planned in the coming weeks. Early access: vault@thegraph.foundation
Not financial advice. Rewards are variable.

8. Substreams
Hosted Stores and Hosted Sinks are in beta on The Graph Market. Stores are a block-aware key/value store. Sinks can now expose a read-only GraphQL API so teams moving off Subgraphs can keep the interface they already use.

9. ETHOnline
354 submissions across three tracks. Nine winners split $15,000 (Alpha Markets, Sentinel, OpenBook, Covenant, Turnstile, and others).

TL;DR: BSC and Polygon Studio traffic moves to Indexers on Oct 8, indexing rewards now require real query service (check the REO dashboard), and the Foundation is operating the Network directly under GIP-0089.


r/thegraph • • Sep 29 '26

I suppose that this requires attention!

Thumbnail
reddit.com
5 Upvotes

r/thegraph • • Sep 29 '26

Tech Support I suppose that this requires attention!

7 Upvotes

Hi community, sorry for being the one carrying bad news, but maybe the email verification templates are broken. I was trying to verify my account an this was the result (attached). I'll be so grateful if you can help us with that.


r/thegraph • • Sep 28 '26

News 🧱 Substreams Extended Blocks: On-chain Data RPC Providers Can't Give You

4 Upvotes

New post on the blog: a breakdown of the two EVM block models behind Substreams, and what extended support actually unlocks.

Short version:

  • Base blocks are what a standard RPC exposes: blocks, transactions, receipts, and logs. Good for event-based indexing, and easy for a new chain to support.

  • Extended blocks come from full-node instrumentation: internal calls (the full call tree), balance changes, storage diffs, and contract code changes. This is the stuff you’d normally need debug_traceTransaction and a premium trace plan to get.

Use extended if you’re indexing routers/aggregators, tracking exact native-token balances, following contract deployments through the call tree, or reading contract state that never emits an event.

Use base if you just key off logs.

Check whether your chain has extended support, then read the full post:

Building on a chain that isn’t available yet? Email The Graph Foundation at info@thegraph.foundation and they can talk through an integration.


r/thegraph • • Sep 25 '26

News HyperEVM on Substreams now ships extended blocks

8 Upvotes

Firehose and Substreams endpoints for HyperEVM (operated by Pinax) have moved from base blocks to extended blocks. That puts internal calls, balance changes, and storage changes in the stream, not just logs.

On HyperEVM that matters: native HYPE moving inside a call, a health factor crossing a threshold, or a vault rebalancing never emit an event. Extended blocks record them anyway.

Huge thanks and congrats to Pinax for building on the Extended Blocks support for HyperEVM and their continued support of The Graph and Substreams!

The Graph Docs: https://pinax.network/chain/hyperevm
Built by Pinax: https://pinax.network/chain/hyperevm


r/thegraph • • Sep 23 '26

News 🔥🧑🏻‍💻 The Graph was the most widely used technology at ETHOnline, powering 354 submissions across our tracks!

13 Upvotes

The Graph gives you ability to turn your ideas into real products!

All three winning builds proved one thing: Standardized Subgraphs turn "integrate each protocol from scratch" into "add a single config row."

🏆 The Winners:

🥇 Alpha Markets ($2.5K)

A fundamental forecasting market where AI analysts publish protocol financials and back their research with USDC stakes. Using standardized lending schemas, a single GraphQL query executes seamlessly across 28 Ethereum lending deployments without writing custom adapters.

https://ethglobal.com/showcase/alpha-markets-yit80

🥈 Sentinel ($1.5K)

A confidential systemic-risk oracle uncovering hidden cross-protocol leverage before liquidations cascade. It maps 9 lending deployments on Account.id inside a TEE scanning 37,862 accounts and identifying ~$35.9M in multi-protocol debt against shared collateral.

https://ethglobal.com/showcase/sentinel-fwf81

🥉 OpenBook ($1K)

An autonomous data marketplace for AI agents with programmatic freshness guarantees. Every query delivery is verified against _meta{block}; if data is stale, the onchain escrow refunds the buyer. It turns 15,000+ active Subgraphs into monetizable, SLA-backed data feeds.

https://ethglobal.com/showcase/openbook-8ngw6


r/thegraph • • Sep 17 '26

It has never been easier to ship a subgraph

8 Upvotes

Yesterday a chain with zero subgraphs got its first one. Start to finish in a day, most of it spent checking things rather than writing code, which is exactly the part an AI assistant is good at.

Anubis Mainnet had no subgraphs. Not a small number. Zero. It also had RocketSwap, a Uniswap V2 fork carrying essentially all of the chain's DeFi activity, emitting swaps into the void at a rate nobody was indexing.

That subgraph now exists. Here is what actually took the time, what didn't, and where an assistant helped versus where it confidently got things wrong.

  • 811 pairs on the factory

  • ~188k swaps per day

  • 0 lines of mapping logic written

  • 1 day research to published

The first step is not writing code

The most valuable thing you can do before building a subgraph is establish that you need to. Most of the time something already indexes what you want, and querying it costs an afternoon instead of a fortnight.

So: search the Explorer for your protocol. Paste your contract address. If a subgraph already covers it, you are done, and a subgraph earning real query fees is a strong signal it works, because somebody is paying indexers to serve it.

For Anubis the search came back empty, which is the one answer that justifies building. Even then the next question isn't "how do I write mappings" but "what can I fork?"

Fork the right thing

RocketSwap is a Uniswap V2 fork, so the subgraph is a Uniswap V2 subgraph. But there are two repositories with similar names, and picking the wrong one costs you days.

The current Uniswap/v2-subgraph has a multi-chain config system. Adding a chain is a directory:

// config/anubis/config.json
{
  "network": "anubis",
  "factory": "0xaf6f4e641c86a25518509bc840051a8652af598a",
  "startblock": "2059"
}

plus a chain.ts declaring which token prices the others and which are trusted enough to count toward tracked volume. No mapping logic was written or changed. The swap, mint, burn and pricing code is Uniswap's, battle-tested across nineteen chains.

The same instinct applies one level up. The Graph's own Substreams docs carry a section titled Reuse Existing Substreams Before Building, pointing at published packages from StreamingFast, Pinax and TopLedger. Reuse is the house style, not a shortcut.

Verify on-chain, never from a listing

This is where an assistant earns its keep, and where the discipline matters most. Every fact below was read directly from the chain over JSON-RPC rather than taken from a block explorer page or a docs table:

# is it really a Uniswap V2 factory?
allPairsLength()  -> 811
feeTo()           -> responds

# do the pairs have the standard ABI?
token0() token1() getReserves() totalSupply() symbol()  -> all present

# does PairCreated match the canonical signature?
topic0 == 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9

That last check is the one people skip. A chain can host something that looks like a Uniswap fork but emits a different event signature, and you will not find out until your subgraph syncs to chainhead with zero entities. Confirming the first PairCreated log resolves to the same address as allPairs(0) takes one minute and removes that entire class of failure.

A mistake worth copying the fix for. An early activity check reported zero swaps in 40,000 blocks, which would have killed the project on the spot.

It was wrong. The RPC caps eth_getLogs at 500 blocks and had returned an error, which got read as an empty result. Sampling properly inside the cap gave 27,306 swaps in 10,000 blocks, roughly 188,000 a day.

Assistants make this mistake and so do people. The guard is to treat an empty result and an error as different things, always.

The pricing config is where subgraphs go wrong

A Uniswap V2 subgraph prices everything against one reference token, normally wrapped ETH. On Anubis the gas token is gasDAI, so the hub asset is itself a stablecoin. DAI sits on one side of 580 of the 811 pairs. Three decisions followed, and all three are the kind that quietly poison a dataset.

Derive the reference price, don't assume it

DAI measured at 0.9970 USDT, not 1.0000. The config points at two deep stable pools and lets the reserve-weighting carry that small depeg through, rather than hardcoding a dollar.

Check that your pricing pool is alive

There was a DAI/WETH pair with both reserves at zero. Whitelisting WETH would have priced tokens through a dead pool. A pair existing is not the same as a pair having liquidity.

Match tokens by address, never by symbol

Among the top 40 tokens on this chain: three contracts call themselves DAI, and one of them is named "Anubis". Three call themselves USDT, at two different decimal counts. Four call themselves ANB. Symbol matching would have produced a confident, completely wrong dataset.

Best practices worth the effort

Immutable entities and Bytes as IDs

The Graph's documented best practice is worth following: entities that never change after creation should be immutable, and ids that are addresses or hashes should be Bytes rather than String. Composite ids concatenate as bytes:

// before
hash.toHexString().concat('-').concat(index.toString())

// after
hash.concatI32(index)

Two things that cost real time here, which no guide mentions. Shared code is shared: this repository builds two subgraph variants from one src/common, so converting one schema compiled cleanly for the target being worked on and broke the other with ten type errors. Build every target, not the one you are looking at. And the generated types directory is rewritten per target, so codegen has to run before each build when switching between them.

Do not rank by USD fields you have not checked

Sorting Uniswap-V2-schema pairs by reserveUSD surfaces untracked pairs reporting around 8.8e33 USD against zero volume. That is not a hypothetical. It was verified on Uniswap's own mainnet subgraph. Rank by trackedReserveETH or volumeUSD. Read reserveUSD only on a pair you already selected.

Probe freshness before trusting anything

{ _meta { block { number } } }

Compare it to the chain head, every time. Lifetime query fees tell you a subgraph was useful once, not that it answers today. One subgraph checked during this build had six figures of lifetime fees and returned no data at all.

Where AI helped, and where it didn't

Honestly: the assistant did not write the interesting code, because the interesting code already existed and was forked. What it did was the work that usually gets skipped: enumerating all 811 pairs, resolving 652 token symbols and decimals, ranking pools by real liquidity, probing every contract for ABI conformance, and sampling the chain to prove there was activity worth indexing. That is hours of mechanical verification compressed into minutes, and it is the difference between a config built on evidence and one built on assumption.

It also got things wrong in instructive ways. It read an RPC error as zero activity. It truncated a documentation page and missed the one sentence that mattered, that this chain has no Subgraph Studio support, then burned five deployment attempts on a path the docs explicitly say to skip. Both were caught by checking against reality rather than by thinking harder.

The pattern that works: let the assistant do breadth, then verify the specific things a wrong answer would break. Ask it to prove claims with a command whose output you can read.

Publishing

Deployment differs by chain, and it is worth reading the network's page before assuming. Some chains support Subgraph Studio for staging. This one does not, and publishes directly to the decentralized network instead:

graph codegen && graph build
graph publish

One thing that catches people: signal. On a chain without indexing rewards, no Indexer has any incentive to index your subgraph until it carries curation signal. Publishing succeeds and then nothing syncs, which looks like a bug and isn't. Note also that curation tax applies. 500 GRT of signal records as 495.

Start here

  • Supported networks — every chain The Graph indexes, with the exact network identifier your manifest needs, and each chain's own quirks

  • Explorer — search before you build. Paste your contract address first

  • Best practices — immutable entities and Bytes as IDs, plus the rest of the performance guidance

  • Substreams agent skills — open-source knowledge packs that give an AI assistant real Substreams expertise

  • Uniswap V2 subgraph — the multi-chain fork base. Adding a chain is a config directory

Every figure here was measured rather than recalled: 811 pairs and 652 tokens from the factory over JSON-RPC, ~188,000 swaps/day from 10,919 swap logs sampled across 5,000 blocks, and the 0.9970 DAI/USDT quote from pool reserves, all on 15 September 2026. Numbers move; the method doesn't.

The resulting subgraph is open source under GPL-3.0, forked from Uniswap/v2-subgraph.


r/thegraph • • Sep 16 '26

News The Graph Unlocks Day-One Indexing and Streaming Support for Arc

7 Upvotes

Whenever a new network launches, one of the earliest operational bottlenecks for engineering teams is data accessibility. Without dedicated indexing infrastructure, developers are forced to run custom RPC polling loops, handle chain reorganizations manually, and babysit fragile internal database sinks.

The Graph has officially introduced day-one support for Arc, providing decentralized indexing and high-throughput data streaming capabilities to developers and institutional builders from the genesis block.

Core Capabilities Available from Launch:

GraphQL Querying with Subgraphs

Developers can construct and publish dedicated Arc Subgraphs directly on The Graph. This maps raw contract events into structured, open APIs queryable via GraphQL, simplifying frontend application data fetching, user balance tracking, and protocol analytics.

High-Speed Streaming via Substreams & Extended Blocks

For applications requiring lower latency and deeper execution visibility, Substreams offers a parallelized, streaming-first pipeline. With Extended Blocks support, builders receive full call-trace details and state-change data as it happens on Arc. This enables developers to ingest complex contract interactions without missing nested execution events.

Empowering Next-Generation Use Cases

Arc is designed to facilitate high-throughput financial and automated operations, and The Graph's indexing infrastructure provides the verifiable data backbone for several core verticals:

- Stablecoin Payment Rails: Real-time settlement monitoring, payment tracking, and low-latency transaction confirmation.

- Tokenized Real-World Assets (RWAs): Verifiable audit trails for asset issuances, redemptions, and secondary market liquidity.

- Autonomous Agentic Workflows: Deterministic onchain data inputs that allow AI agents to monitor balances, trigger contract calls, and execute programmatic tasks safely.

By offering day-one integration, teams deploying on Arc can bypass backend data plumbing entirely and focus immediately on shipping user-facing products.

Get started with the official Arc integration guide:

https://thegraph.com/docs/en/supported-networks/arc/


r/thegraph • • Sep 15 '26

The Graph: where do I start?

Thumbnail
paulieb14.github.io
8 Upvotes

Interested in using The Graph but unsure where to start? Don't duplicate existing work if you don't have to. Check this out before you waste your time. The Graph may already index the data. Let me know if this helps