# Subgraph

Chamber's subgraphs are The Graph Protocol deployments that index vault state, deposits, withdrawals, trades, and manager activity. They are the primary source for analytics, dashboards, leaderboards, and any UI that needs to list or filter vaults.

**Repo:** `dhedge-v2-subgraphs`

## When to use the subgraph

* **List or search vaults** — by manager, denomination asset, chain, performance.
* **Reconstruct vault history** — deposits, withdrawals, trades, fee events over time.
* **Power a leaderboard or directory** — see [leaderboard & ranking](/concepts/leaderboard-ranking.md).
* **Build portfolio views** — a depositor's positions across multiple vaults.

For live state (current NAV, open positions), call the contracts directly or use the [SDK](/build/sdk.md) — subgraphs lag the chain by a few blocks.

## Chain coverage

Separate subgraph deployments exist per chain:

* Polygon
* Optimism
* Arbitrum
* Base
* Plasma
* Ethereum
* HyperEVM

Each chain has its own GraphQL endpoint. There is no single cross-chain endpoint — aggregate on the client side.

**Endpoints:** Per-chain GraphQL URLs are maintained in the subgraph repo README.

## What gets indexed

Full schema is in the subgraph repo's `schema.graphql`. The schema evolves with contract upgrades — pin your integration to a specific subgraph version if you depend on exact field shapes.

## See also

* [SDK](/build/sdk.md) — for live onchain reads
* [Leaderboard & ranking](/concepts/leaderboard-ranking.md) — how the app uses this data
* [Contract addresses](/build/contract-addresses.md) — the contracts the subgraph indexes


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chamberfi.com/build/subgraph.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
