Using the Subgraph

The MORE Vaults subgraph turns on‑chain events into an easy‑to‑query GraphQL API. It listens to the factory, every live vault, and all registry contracts, then stores the resulting data under a handful of clearly named entity types. Anyone can hit the public endpoint to pull positions, prices, or historical metrics without running their own node.

Factories and vaults

A VaultFactory record appears the moment the factory is deployed, while each new vault creates its own Vault entity with links to its creator, core hash, and active facets. Because both entities include block numbers you can query any point in history.

Tokens. Every ERC‑20 a vault touches becomes a Token entity with symbol, decimals, and cumulative volume counters, so front‑ends can list holdings and swap pairs without extra look‑ups.

Flows and balances

Deposits and withdrawals surface as DepositEvent and WithdrawEvent records. User‑level actions roll up under UserVaultTransaction. The running balance for each wallet–vault pair is kept in UserVaultBalance, making it trivial to build portfolio pages or generate tax reports.

Snapshots and pricing

Once per hour the subgraph stores a VaultHourlySnapshot with total assets, share price, and fee accruals. Underlying price feeds are captured in two layers: VaultPriceOracle tracks which oracle a vault relies on, and VaultAssetPrice stores the most recent reading. Together they give analysts enough granularity for performance charts without needing per‑block data.

Because every list field in the schema accepts filters, ordering, and block‑height arguments, the same endpoint powers real‑time dashboards and historical back‑tests. For example, you can fetch the top 100 vaults by TVL, replay a single user’s transactions since genesis, or compare hourly share‑price snapshots across vaults in one request.

Developers integrate by adding a single GraphQL call to their app. As the protocol grows, new entities are added through subgraph upgrades, but existing queries keep working, giving the ecosystem a stable and expressive data layer from day one.

The subgraph and query schema can be accessed at:

https://graph.more.markets/subgraphs/name/more-markets/vaults-subgraph

Last updated