SubQuery Example Project — Multi-Chain Indexing of Snapshot

SubQuery Network
3 min readNov 6, 2023

In the dynamic realm of blockchain and Web3 technologies, the Snapshot protocol shines as a source of innovation. This voting platform streamlines and simplifies the voting process for DAOs, DeFi protocols, and NFT communities, all while eliminating the need for gas fees. If you’re eager to explore the vibrant world of Snapshot protocol and want to set up an indexer for it, this guide will help you.

The goal of the guide is to demystify the entire process, making it accessible to users of all skill levels. This guide serves as your gateway to efficiently managing delegation data within the Snapshot protocol ecosystem, allowing users to navigate the delegation of votes.

Snapshot protocol is deployed on various blockchains, and for developers looking to create the next cross-chain decentralised application, the ability to simultaneously index multiple blockchains is a crucial requirement for their projects. SubQuery has stepped in to bridge this gap, offering a groundbreaking solution known as Multi-Chain Indexing.

Example

The Snapshot sample project gathers data related to Delegations. Key resources:

Use-Cases

Upon running the project, you have the option to kickstart the queries. Given that the sole entity being introduced here is “Delegation,” it is also the sole entity through which we can get valuable insights. Let’s examine the following example:

The next query shows the first three delegations with their key information like ID and the person who delegated. Each entity also has a “network” field, which makes it easier to filter and work with the data.

Another query, which is useful for gaining insights, is the following and is accessible for all multi-chain projects:

This query retrieves metadata from all the chains that are involved in indexing. This information can be valuable when you want to get a real-time overview of your indexing status.

Furthermore, when you combine multi-chain capabilities with aggregations, it opens up significant possibilities for cross-chain analysis without a need to exit the GraphQL interface to gain insights into specific subject matters.

About Snapshot

Snapshot serves as a voting platform enabling effortless and gas-free voting for DAOs, DeFi protocols, and NFT communities. This tool offers extensive customisation options for the voting process, catering to the varied requirements of users and organisations. Customisation encompasses factors such as determining user voting power, choosing the voting method, validating proposals and votes, and more. In summary, Snapshot is an off-chain, gas-free multi-governance client, delivering results that are straightforward to verify and challenging to dispute.

About SubQuery

SubQuery is a leading blockchain data indexer that provides developers with fast, flexible, universal, and decentralised APIs for web3 projects. We empower developers from over 110+ ecosystems including Ethereum, Polygon, Polkadot, Cosmos, Algorand, NEAR, and Avalanche with rich indexed data to allow them to build intuitive and immersive decentralised applications. This blockchain developer toolkit enables developers to focus on their core use case and front-end without wasting time building a custom backend for data processing activities. In the near future, the SubQuery Network will replicate this scalable and reliable solution in a completely decentralised manner.

​​Linktree | Website | Discord | Telegram | Twitter | Matrix | LinkedIn | YouTube

--

--

SubQuery Network

SubQuery is here to help you transform and query the world’s data for a web3.0 future. https://subquery.network/