Advanced Web3 applications require fast APIs and complex data models. Each dApp developer reinvents middleware to process gigabytes of historical on-chain data, because a typical blockchain contains gigabytes of unstructured tx data. Applications on the other hand only need a small subset of the data but with very fast read access and query time at high load.
That's where our query node framework, HYDRA, gets you covered. Define your data model and the HYDRA indexer will get it in sync with the chain. On top of that, you get a batteries-included GraphQL server with comprehensive filtering, pagination, and even full-text search capabilities.
The mission of Subsquid is to unlock the complexity and expressiveness of Web 2.0 APIs in a decentralized way, relying on accountability and governance instead of redundancy of the services provided by anonymous network nodes running identical software.
SQD token is the main unit of accounting within Subsquid DAO. It has multiple use-cases can be described as a hybrid payment, governance and work token.
• Payment medium. SQD is used to collect the fees and distribute across the DAO treasury and the various worker roles for the provided services.
• Work token. In order to take up a role one should stake SQD token, the rewards are distributed based on the stake and actual amount of the work done (as calculated by the Cobb-Douglas formula).
• Delegation. SQD token holders can delegate their tokens to any role to get a share of the fees.
• Governance. SQD token holders periodically vote for electing a governing council, responsible for the development of the protocol, the economic parameters and dispute resolutions.
Phase 0: Q3 2020. Hydra: a query-node framework
Hydra is a query node framework bootstrapped at Hackusama hackathon in July 2020, and was awarded the first prize at the infrastructure track. By defining the database schema and data transformation rules one can develop a fully customized GraphQL API for a Substrate chain of choice. After a year of development, Hydra has evolved into a collection of querynode services and tools: Hydra Indexer + Hydra Indexer Gateway: Ingests raw blockchain data, indexes and exposes via expressive GraphQL API Hydra Processor: Extracts the relevant data from Hydra Indexers, transforms and loads into the query node storage Hydra CLI: code generation for the query node server, including the database schema, Apollo-based GraphQL server with extensive filtering support.
Phase 1: Q3 2021. Support of Hydra Indexers by Subsquid
The most resource-intensive part of the Hydra pipeline is the Hydra Indexer, as it keeps a full index of the blockchain data. Subsquid has deployed Hydra Indexers for the following key Substrate chains (and counting): 1. Polkadot 2. Kusama 3. Karura 4. Edgeware 5. Equilibrium 6. Robonomics 9 7. Subsocial 8. Joystream (Sumer Testnet)
Phase 2: Q4 2021. Query-Node-as-a-Service by Subsquid
The current phase extends the support of Hydra services by Subsquid. Apart from using the publicly-available indexers, it will be possible to deploy a productionready Hydra-powered Query Nodes using a simple CLI tool. No need to host the infrastructure, and the transition from a local development environment to a production-ready one is just a matter of running a few CLI commands.
Phase 3: Q1 2022. Community-run Indexers
During the third phase we will be opening Indexer roles to the community. Community-run Hydra Indexers will be used by Subsquid.io. Community-run indexers will be rewarded through grants from the Subsquid DAO treasury.
Phase 4: Q3 2022. Subsquid DAO testnet. Onboarding Query Node operators
During this phase query node operators will be manually selected from the community members to bootstrap the DAO. On-chain API requests are live on testnet. Query Node operators are rewarded through grants from the Subsquid DAO treasury.
Phase 5: Q4 2022. SQD delegation, query node data onchain
• The worker roles will receive organic rewards fulfilling requests from the query node operators
• The delegators receive a fee share
• A percentage of the fees is burned by the Subsquid DAO
• Query node data can be accessed by parachains as an oracle feed (e.g. via integration with Kylin network or other oracle solutions) or via integration with a Subsquid pallet.