The Graph: A Decentralized Data Indexing Protocol

The Graph: A Decentralized Data Indexing Protocol

The Graph is an open-source protocol designed to empower developers with the ability to rapidly and effectively query data from blockchain networks. By providing decentralized indexing and querying services, The Graph enables developers to access and analyze information from a range of blockchain networks. Though built on the Ethereum blockchain, The Graph extends its support to other prominent blockchain networks, such as Polkadot, Solana, and Binance Smart Chain.

In this article, we will delve into the inner workings of The Graph, explore its tokenomics, and discuss the advantages it holds over competing solutions. Additionally, we will examine the potential impact of The Graph’s technology in the burgeoning field of AI-driven decentralized applications.

The Technical

The Graph has introduced an innovative mechanism known as “subgraphs,” enabling developers to craft custom data indices for their decentralized applications (dApps). Subgraphs function as filters, allowing developers to select and arrange data from particular blockchain networks or smart contracts. This streamlines the process of retrieving pertinent data for their dApps, consequently reducing the time and cost associated with building on blockchain networks. This mechanism fosters considerable efficiency and cost savings. According to The Graph’s team, subgraphs have the potential to deliver exceptionally rapid response times in comparison to direct data querying from the blockchain.

Here’s a simplified breakdown of how The Graph functions:

  1. A decentralized application (dApp) adds data to the Ethereum blockchain through a smart contract transaction.
  2. During transaction processing, the smart contract generates events.
  3. The Graph Node scans the Ethereum blockchain for new blocks and data specific to your designated subgraph.
  4. Upon discovering relevant Ethereum events, the Graph Node executes the mapping handlers you provided. These handlers are compact programs that create or update data entities based on the Ethereum events.
  5. The dApp can then query the Graph Node for indexed data from the blockchain via a GraphQL endpoint. The Graph Node converts the GraphQL queries into queries for its underlying data store and returns the requested data to the dApp.
  6. The dApp displays the retrieved data to end-users through a user interface. Users can interact with the data and initiate new transactions on the Ethereum blockchain, setting the entire cycle in motion once again.

The Network Participants

The Graph ecosystem encompasses several participants, each with a distinct role within the network.

  1. Subgraph Developer: This participant creates and deploys subgraphs to the network. Subgraphs are sets of data indexing rules that determine which data from a blockchain is indexed by The Graph. Subgraphs can be deployed using either a command-line interface or a graphical interface provided by The Graph.
  2. Indexer: This participant contributes computing resources to the network by operating indexing nodes. These nodes process and index data from the subgraphs developed by Subgraph Developers. In exchange for supplying computing resources, Indexers receive rewards in the form of the native GRT token.
  3. Delegator: These users hold and delegate their GRT tokens to an Indexer. Delegating involves assigning their GRT tokens to an Indexer to participate in the network’s indexing and receive a portion of the rewards earned by the Indexer.
  4. Curator: This participant plays a vital role in the Graph protocol by assessing APIs to identify high-quality subgraphs. When they discover a potentially valuable subgraph, they curate it by signaling on it, which indicates to Indexers which subgraphs should be indexed. Curators can be community members, data consumers, or developers who deposit GRT tokens into a bonding curve to mint curation shares of a subgraph. In return, Curators are eligible to earn a part of the query fees generated by the subgraph. This incentivizes Curators to curate the best data sources and uphold the protocol’s integrity.

Additionally, The Graph mechanism features an Indexing and Caching marketplace, where Indexers can generate revenue by providing indexing services and serving queries to subgraphs, such as Sushiswap trade data on a Sushiswap analytical dashboard. The pricing of these queries is determined by Indexers and may vary based on factors such as the cost of indexing the subgraph, query demand, the level of curation signal, and the market rate for blockchain queries. As Consumers (i.e., applications/developers) pay for these queries, the overall cost is anticipated to be significantly lower than the expenses associated with running a server and database.

Together, these participants form a decentralized network that enables developers to access blockchain data through a standardized API. The Graph ecosystem is designed to be open and permissionless, allowing anyone to participate in and benefit from the network.

Source: Thegraph.com

The Token

The Graph’s token, GRT, plays an essential role in the protocol’s tokenomics. As a medium of exchange, it enables participants to pay for indexing and querying services. The network’s rewards and incentives aim to foster participation from all stakeholders, including node operators, stakers, and developers. This engagement creates a virtuous cycle in which increased participation leads to enhanced security, greater efficiency, and more value for all parties involved.

The Graph integrates several burning methods. As the network’s activity expands, approximately 1% of the GRT supply is burned each year. Various burning activities contribute to this process, including:

  1. Delegation tax of 0.5% on GRT tokens whenever a Delegator delegates them to an Indexer.
  2. 1% curation tax imposed when Curators signal on a subgraph.
  3. 1% of query fees for blockchain data is burned.

These burning mechanisms help control the inflation rate of GRT tokens, ensuring a balanced and stable economy for the platform.

In addition to regular burning activities, The Graph’s GRT token also employs a slashing mechanism to penalize Indexers for malicious or irresponsible actions. When an Indexer is slashed:

  1. 50% of their indexing rewards for the epoch are burned.
  2. Their self-stake is slashed by 2.5%.
  3. Half of the slashed self-stake is burned.

This approach creates a powerful incentive for Indexers to prioritize the network’s security and stability.

Current Developments

In 2022, The Graph planned to sunset its hosted service to encourage subgraphs to migrate to a decentralized network. Prior to this, developers utilized the hosted service for free. By the end of Q1 2023, developers will use Studio to pay per query, ensuring that dApps only pay for the resources they consume. Consequently, GRT will play an increasingly crucial role in the ecosystem.

In early 2023, The Graph core developer StreamingFast introduced Substream. Previously, Subgraph relied on RPC-based queries, processing blockchain data linearly, which meant events were processed one at a time in a specific order. However, Firehose technology replaced these API calls with a push model stream of data delivered directly to the indexing node, allowing for faster syncing and indexing.

Substreams enhance this process further by enabling parallelized streaming data, allowing for even quicker processing. Substreams can be combined and aggregated to rapidly feed data into subgraphs or end-user applications. With substream parallelization, some subgraphs can sync over 100 times faster.

The Traction

Source: dune.com/abarmat

As illustrated in Figure 3, with The Graph gearing up to permanently discontinue its hosted service, there has been a substantial surge in the number of query fees. Notably, between July 2022 and March 2023, the number of query fees has grown by around seven-fold, escalating from 333,000 to 2.2 million GRT used.

Source: GRTDatahub.com

From the participant’s perspective, the number of subgraphs has been consistently rising as well. Figure 4 suggests that the number of dApps incorporating subgraphs is experiencing growth. It is important to note that subgraphs are not solely deployed by the core developers of the dApps themselves; community members or subgraph providers, such as Messari, can also deploy their subgraphs.

Source: GRTDatahub.com

By the end of 2022, as depicted in Figure 5, the number of indexers experienced a significant increase, nearly doubling in size. This growth can be attributed to the launch of The Graph Foundation’s Multi-Chain Incentivized Program. The Incentivization program for Migration Infrastructure Providers (MIPs) aims to encourage Indexers to broaden their support for new chains on the decentralized network, which enables the migration of multi-chain subgraphs. By participating in the MIPs program, Indexers can bootstrap their operations and enhance their capacity to adapt to emerging chains.

The Graph vs Competitors

Covalent – a blockchain data platform that streamlines the process of accessing data from various blockchain networks. With its unified API, Covalent simplifies the complex and fragmented nature of blockchain data, allowing developers, analysts, and enterprises to access blockchain data easily and efficiently.

Ceramic – Allows developers to create decentralized databases and authenticated data feeds. The platform utilizes an event streaming system that allows nodes to subscribe to particular subsets of streams. As a result, the protocol is an eventually consistent system, which makes it possible to develop web-scale applications that are dependable.

The GraphCovalentCeramic Network
Query MethodGraphQLRestAPIGraphQL
Indexing MethodSubgraphsIndex every eventsComposite
Network User Cost Depends on usageTier based subscriptionFree
Supported NetworkEthereum, Cosmos, Polygon, Polkadot, Solana, Aurora, and 24 othersBitcoin, Ethereum, Cosmos, Polygon, Polkadot, and 54 othersMainnet and Ceramic testnet only
Notable dApps in the ecosystemUniswapOpynSushiswapSynthetixSnapshot0xZerionRainbowAudiusDiscoEPNS
Token SymbolGRTCQT
Token Supply10 Billion1 Billion
Major InvestorsCoinbase Ventures, Framework Ventures, Digital Currency GroupHashed, Binance Labs, Alameda, Mechanism CapitalMulticoin Capital and Union Square Ventures

Competitive Landscape of Data Indexing Protocol

The Data Layer and AI Narrative

As we enter the age of artificial intelligence (AI), the role of the blockchain data layer in enabling more efficient and accurate AI applications is becoming increasingly important. One of the key advantages of blockchain technology is its ability to store data in a decentralized, tamper-proof manner. This makes blockchain an ideal platform for storing and managing the vast amounts of data needed for AI applications.

Query layers like The Graph, Covalent, and Ceramic also play a key role in the integration of blockchain and AI. These layers provide a simple and efficient way for developers to query and analyze data from the blockchain, abstracting away the complexities. This makes it easier for AI applications to access and analyze blockchain data, leading to faster and more accurate results.

AI can be used to analyze data retrieved through query layers, providing valuable insights and predictions that can inform decision-making and improve user experiences. As an example, AI can be used to identify patterns in financial transactions or predict inflow/outflow based on blockchain data. It can also be used to analyze user behavior and preferences, enabling more personalized and effective airdrops for example. 

Conclusion

As the blockchain industry continues to grow, The Graph is well-positioned to become a crucial infrastructure for developers looking to build decentralized applications. Its open-source nature, interoperability, and robust tokenomics make it an attractive option for developers and investors alike. The Graph’s team continues to work on improving the protocol and expanding its capabilities, which bodes well for the network’s future.


Sources

https://thegraph.com/docs/en/about/

https://thegraph.com/docs/en/network/benefits/

https://thegraph.com/docs/en/network/indexing/

https://thegraph.com/docs/en/network/delegating/

https://thegraph.com/docs/en/network/curating/

https://thegraph.com/docs/en/network/developing/

https://thegraph.com/docs/en/tokenomics/

https://dune.com/abarmat/The-Graph-Overview

https://www.GRTDataHub.com

https://www.covalenthq.com/docs/unified-api/

https://blog.ceramic.network/composedb-using-ceramic-as-a-graph-database/


This article has been written and prepared by @cyborg and the GCR Research Team, a group of dedicated professionals with extensive knowledge and expertise in their field. Committed to staying current with industry developments and providing accurate and valuable information, GlobalCoinResearch.com is a trusted source for insightful news, research, and analysis.


Disclaimer: Investing carries with it inherent risks, including but not limited to technical, operational and human errors, as well as platform failures. The content provided is purely for educational purposes and should not be considered as financial advice. The authors of this content are not professional or licensed financial advisors and the views expressed are their own and do not represent the opinions of any organization they may be affiliated with.

*****

Leave a Reply

Your email address will not be published. Required fields are marked *

More from GCR

Insights

Reputation Cookies

This piece was originally published on Decentralised.co. We at GCR will bring to you long forms from Decentralised twice every Month – every alternate Thursday! Decentralised.co ...

Announcement

GCR Community Events Recap – ...

GCR IRL: GCR at ETHDenver 2024 – The panel discussion at ETH Global Pragma Denver, featuring luminaries like Doug Petkanics from Livepeer, alongside founders from ...

Insights

NFT Futures: A New DeFi ...

Summary:  Futures, Futures, Futures For a long time in early crypto history, trading was only driven by spot trading where users exchange fiat, other crypto ...