A subgraph for indexing on-chain activity from the Gold Standard DAO protocol. Built with The Graph to provide fast, queryable data for the frontend and analytics.
- Vault creation, deposits, and withdrawals
- Collateralized debt position (CDP) states and ratios
- Real-time APY calculations across vaults
- Total deposit and TVL tracking
- User position history
- The Graph — subgraph indexing framework
- TypeScript — mapping handlers
- GraphQL — schema and query layer
├── abis/ # Contract ABIs for event decoding
├── src/ # Mapping handlers (event → entity)
├── schema.graphql # GraphQL entity definitions
├── subgraph.yaml # Data source config (contract addresses, events, handlers)
├── package.json
└── truffle.js
git clone https://github.com/bigchiano/gsd-subgraph.git
cd gsd-subgraph
yarn installyarn codegenyarn buildyarn deployBuilt this while working on Gold Standard DAO — a protocol with a gold-pegged token backed by on-chain reserves. The frontend needed real-time data on vault performance and user positions without hammering the RPC, so I built this subgraph to handle the indexing and serve it over GraphQL.
73 commits, used in production.
MIT