Skip to content

bigchiano/gsd-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GSD Subgraph

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.

What it indexes

  • 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

Stack

  • The Graph — subgraph indexing framework
  • TypeScript — mapping handlers
  • GraphQL — schema and query layer

Project structure

├── 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

Setup

git clone https://github.com/bigchiano/gsd-subgraph.git
cd gsd-subgraph
yarn install

Generate types

yarn codegen

Build

yarn build

Deploy

yarn deploy

Context

Built 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.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors