Subgraph for Tornado Cash Governance
Go to file
2025-07-06 13:57:50 +00:00
abis Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
src Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
.gitignore Initial commit 2024-04-28 05:08:14 +00:00
LICENSE Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
package.json Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
QUERY.md Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
README.md Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
schema.graphql Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
subgraph.yaml Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00
tsconfig.json Initial commit 2024-04-28 05:08:14 +00:00
yarn.lock Add more Governance & Relayer Registry handlers 2025-07-06 13:57:50 +00:00

Tornado Governance Subgraph

Tornado Cash Governance, Relayer Registry & TORN Subgraph

Designed for replacement of tornado-relayer-registry-subgraph

About

This subgraph will index Tornado Cash Governance, Relayer Registry & TORN Contract

This subgraph is intended to index lightweight, without requirement of indexing third party contracts or making historic contract calls and thus has no guarantees of accuracy for using those data to calculate APYs, relayer status because those value would be only accurate by static contract calls ( in short we only mimic contract's flow and credit balances ).

This subgraph would likely break when implementation contract is changed by governance vote or when changes from governance proposals doesn't emit contract events correctly. It would be the obligation of the proposer to maintain this subgraph to match values.

Features

  • Integrated features of tornado-relayer-registry-subgraph with additional properties like staked balance for relayers

  • Using Chainlink to fetch ETH/USD price (because they would less emit than Uniswap V3 ETH/USDC pair and would be more accurate)

  • Using Uniswap V3 TORN/ETH price because they are also used to calculate relayer fees from governance so it must be accurate

  • Historic Proposals & Votes for Tornado Governance

  • Historic Locks & Reward claims for staking TORN

  • Historic Transfers & Rich List for TORN balance / staking balances

  • Historic TORN price in USD & ETH

  • Historic TORN Staking APYs

  • Historic Relayer Burns ( Can not index if relayer cheats because if it does it wouldn't emit burn events, I would recommend coding custom backend to index those rather than making inefficient subgraph )

Price and TORN supply ( including total locked and burned balances ) are snapshotted hourly basis

For relayer TORN burns they are snapshotted daily basis ( and can be used to build UI or TG bots for TORN APY statistics )

Getting Started

Refer ./QUERY.md for an example GraphQL query object