The Graph review: indexing blockchain data
Applications need fast queries over blockchain data. The Graph organises that work as an open network of indexers.
Blockchains are good at recording transactions but slow at answering questions like "show all trades of this token in the last week". The Graph is a protocol for indexing blockchain data so that applications can query it quickly. Its main network launched in December 2020.
Subgraphs
Developers describe the data they need in a subgraph: which contracts and events to watch and how to store the results. Applications then query the subgraph with GraphQL, a common query language.
Network participants
- Indexers run servers that process subgraphs and answer queries. They stake GRT and earn query fees and rewards.
- Curators signal which subgraphs are worth indexing.
- Delegators assign GRT to indexers and share their rewards without running servers.
Staking makes misbehaviour costly: indexers can lose part of their stake for serving incorrect data.
Why it matters
Many decentralised applications show balances, histories and statistics. Without an indexing layer they would depend on a single company's servers. The Graph aims to make this layer open and shared.
An example
A decentralised exchange wants to show a chart of all swaps in a pool. Reading every block from the chain on each page view would be slow. A subgraph instead watches the exchange's contracts, stores each swap as it happens and answers the question "swaps in this pool during the last day" with one query.
Risks
Competition from centralised data providers, the complexity of its economic model, and dependence on the networks it indexes.
The market is on the GRT coin page.
This review describes the project's design and is not investment advice. Cryptocurrency prices can be highly volatile.
Blog posts are for education and information only and are not investment, legal or tax advice.
