Contents
The Graph (GRT): Data Indexing for Blockchain APIs
The Graph is a decentralized dApp development protocol for indexing and querying data from blockchain networks.
Updated October 5, 2023 • 3 min read
Summary
The Graph Network simplifies blockchain development by allowing users to share, store, and use data, thus allowing for more robust apps and a more connected ecosystem. The Graph employs the use of a governance and utility token called GRT.
Contents
The Graph Crypto Platform’s API Indexing and Querying Tools
In computer science, a query is a search term that a user or program inputs into a computer system to look for specific data. It’s an essential function in the infrastructure of networks like the internet, and increasingly, blockchain as well. The Graph Network is an infrastructural tool for blockchain networks that simplifies the process of indexing servers for data queries. The project has the potential to unlock significant value in the blockchain sector by opening up data from around the ecosystem to apps and developers. The platform is a key example of the developing decentralized-software-as-a-service (dSaaS) business model.
The Graph makes querying blockchain data easier for APIs and decentralized apps (dApps), thus making web3 products simpler to build and operate. In essence, The Graph is a query marketplace that decentralizes the API and query layer of the internet application stack and allows access to datasets from across the decentralized ecosystem. Additionally, The Graph represents one of the first methods for querying data that does not rely on a centralized intermediary.
Prior to the release of The Graph, development teams in the blockchain sector were required to operate proprietary, in-house indexing servers — which require significant engineering and hardware resources. The Graph’s decentralized query market is made up of a network of Indexers — including many notable dApps and blockchain infrastructure providers — all competing to provide the best indexing service at the cheapest price. This process takes into consideration performance, quality and freshness of data, Indexer reputation, and the economic security of the Indexer.
The Graph Network achieves more decentralized indexing via subgraphs, which are specialized application programming interfaces (APIs) built to create a global graph for the world’s important public data — allowing developers to use, index, and serve blockchain data in a cryptographically verifiable manner. The Graph’s services are initially designed to operate on the Ethereum network, but there are plans to expand to other chains in the future.
How Querying via the Graph Crypto Platform Works
Indexing blockchain data is no easy task, and blockchain characteristics such as finality, uncle blocks, and chain reorganizations can make this process both lengthy and arduous. The Graph makes it simpler to query data on the blockchain that is typically difficult to query directly. The network allows data to be properly utilized in a blockchain environment through its hosted service platform that indexes blockchain data. These indexes (called subgraphs, as described above) can be queried by making use of The Graph’s proprietary GraphQL API, or Graph Query Language Application Programming Interface. The Graph project is working towards implementing a parallel, but fully decentralized blockchain protocol with the same capabilities as its hosted iteration — while both will make use of the open-source Graph Node.
The Graph Node is the vehicle through which users are able to deliver searches or queries. The Graph autonomously learns what and how to index Ethereum data based on subgraph descriptions, called subgraph manifests. For the process to work correctly, the subgraph description determines the smart contracts of interest for a subgraph, the events in those contracts that need attention, and how to organize event data in a way that can be used by the system and stored in The Graph’s database.
Once a subgraph manifest has been written, the user makes use of the Graph CLI, or Graph Command Line Interface, to store the data in IPFS, and tells the hosted service to begin indexing data for that subgraph. As its capabilities are enhanced, The Graph will be able to retrieve, make use of, and store encrypted private data.
The Graph Network Participants and GRT Token
The Graph Network's GRT token is key to its function, and incentivizes a rewards-based ecosystem of six main network participants:
Indexers: Indexers are nodes that help maintain the indexing and query processing function of The Graph Network by staking GRT tokens. In this way, Indexers earn query fees and indexing rewards for their services, as well as GRT from a rebate pool that is shared with all network participants in a manner proportional to their overall network contributions. GRT staked inside the protocol must make use of a thawing period and can be slashed if Indexers act in a malicious manner, serve incorrect data, or generate errors.
Curators: Curators are data consumers, subgraph developers, or community members who signal to Indexers which subgraphs (APIs) are valuable to the system and need to be indexed by the platform. Curators must deposit GRT into a bonding curve to earn a share of query fees for the subgraphs they signal on, in turn incentivizing the best quality data sources.
Delegators: Delegators are individuals who delegate stake — by bonding or staking tokens inside the protocol — to Indexers who would like to contribute to securing the network but do not want to run a Graph Node on their own. Through the delegation process, Indexers can earn a proportion of query fees and rewards that are initially earned by the Indexer. Unlike Indexers, Delegators cannot be slashed for bad behavior. However, there is a deposit tax for Delegators to disincentivize malicious behavior that could harm the integrity of the network.
Consumers: Consumers are individuals that make use of The Graph Network to query subgraphs and pay query fees to Indexers, Delegators, and Curators. Indexers and Consumers determine service prices together instead of separately.
Fishermen: Fishermen are responsible for determining the accuracy of The Graph Network’s response to specific queries.
Arbitrators: An Arbitrator’s role is to determine whether an Indexer using the network is legitimate.
The Future of The Graph Crypto Network
As of December 2020, there are over 2,300 subgraphs deployed. Notable examples of network participants include Uniswap, AAVE, Synthetix, Aragon, Balancer, and many others. Apart from Ethereum, The Graph is also currently integrated with Polkadot, Cosmos, Avalanche, Binance Smart Chain (BSC), Celo, Fantom, Solana, and Near Protocol, with more networks to come.
Cryptopedia does not guarantee the reliability of the Site content and shall not be held liable for any errors, omissions, or inaccuracies. The opinions and views expressed in any Cryptopedia article are solely those of the author(s) and do not reflect the opinions of Gemini or its management. The information provided on the Site is for informational purposes only, and it does not constitute an endorsement of any of the products and services discussed or investment, financial, or trading advice. A qualified professional should be consulted prior to making financial decisions. Please visit our Cryptopedia Site Policy to learn more.
Is this article helpful?