Vault Indexer

Generalized Subgraph Template for indexing ERC4626 Vaults with ease

Vault Indexer

Created At

ETHOnline 2025

Project Description

This project is a universal subgraph template (or “indexer”) designed to index any ERC-4626 vault with minimal effort. Instead of writing a new subgraph configuration for every vault, this template abstracts away the boilerplate logic and only requires the replacement of the contract address to start indexing a new vault.

In other words — once you have this template, you can deploy subgraphs for multiple vaults (even across multiple chains) just by providing the vault address and network name, without touching the underlying logic or schema.

How it's Made

The project was built using The Graph protocol to index on-chain data efficiently from ERC-4626 vaults. The core idea was to create a universal subgraph template that could index any compliant vault with minimal effort. The system listens to key vault events such as Deposit, Withdraw, and Transfer, then processes them through AssemblyScript mappings that update a centralized data schema stored in a unified table. Each vault’s data is tagged with its chainId and contractAddress, so vaults across multiple networks can share the same schema without collisions. The backend uses GraphQL to expose the indexed data, making it easy to run cross-chain queries and analytics. To make the setup as reusable as possible, all configurations (like the vault address and network) are parameterized in the subgraph.yaml, so adding a new vault only requires swapping out those values. One clever bit was designing a global ID system by concatenating the vault address and chain ID, ensuring unique, cross-chain-safe records. This approach keeps everything lightweight, scalable, and instantly queryable from a single unified endpoint.

background image mobile

Join the mailing list

Get the latest news and updates