The Graph

The Graph Report by IvanStake

What is The Graph protocol?

The Graph is an indexing protocol that provides on-chain data from a wide spectrum of sources. It removes the need for application developers to build out complicated infrastructure to get on-chain data. Instead, using The Graph, data consumers (e.g., app developers) pay to query APIs of on-chain data — called “subgraphs” — via the GraphQL API.

What actually indexing is ?

Indexing, in essence, allows for reducing the time required to find a particular piece of information. A real-life example is an index in a book. Instead of going through the whole book page by page to find a concept we’re looking for, we can find it much quicker in the index, which is sorted alphabetically and it contains a reference to the actual page in a book.

Similarly, in computer science, database indexes are used to achieve the same goal – cutting the search time. Instead of scanning the whole database table multiple times to provide data to an SQL query – indexes can dramatically speed up queries by providing quick access to relevant rows in a table. When it comes to blockchains such as Ethereum, indexing is super important. To understand why this is the case, let’s see how a typical blockchain is built. A typical blockchain consists of blocks that contain transactions. Blocks are connected to their adjacent blocks and provide a linear immutable history of what happened on the blockchain to date. Because of this design, a native approach for searching for a particular piece of data, such as a transaction, would be to start with Block 1 and search for a transaction across all transactions in that block. If the data is not found we move to Block 2 and continue our search. As you can imagine this process would be highly inefficient. This is also why every popular blockchain explorer, such as Etherscan, built their own service for reading all the data on the blockchain and storing it in a database in a way that allows for quick retrieval of data.

These kinds of services are very often called ingestion services as they basically consume all the data and transform it into a queriable format. Although this approach usually works fine, it requires trusting the company that provides the data – this is not ideal for building fully decentralized and permissionless applications. On top of that, all private crypto companies that don’t want to trust other APIs have to build their own ingestion service which creates a lot of redundant work. This is also why a decentralized query protocol for blockchains was needed and this is where The Graph comes into play.

What is a subgraph?

A subgraph defines the data which The Graph will index from a blockchain, and how it will store it. Once deployed, it will form a part of a global graph of blockchain data which you can retrieve using GraphQL.

The Graph Architecture

To ensure the protocol runs correctly and efficiently, The Graph network incentivizes several key roles within its ecosystem of both technical and non-technical participants:

  • Indexers process and store on-chain data from subgraphs. They usually have advanced technical know-how to operate nodes. In return, Indexers receive query fees and indexing rewards.

  • Curators are economically incentivized to analyze and signal which subgraphs are valuable to index. Curators earn a portion of the query fees generated by a particular subgraph.

  • Delegators may lack technical know-how or resources to index on-chain data; instead, they may delegate The Graph's native token GRT to Indexers. In return, Delegators earn a portion of query fees and indexing rewards without running nodes themselves.

As of October 2022, only Ethereum is supported by The Graph's decentralized protocol; over 30 networks are currently supported by The Graph's hosted service on Ethereum, NEAR, Cosmos, and Arweave.

Roadmap

An integral part of continuing to push decentralization of The Graph is decentralizing the way teams collaborate on core elements of the protocol. To make it easier for teams developing The Graph to collaborate cross-functionally, R&D working groups were created for distinct focus areas. The Graph is a core component of the web3 stack, and the working groups cover key areas of the protocol that web3 developers rely on.

There are 5 distinct working groups that make up the focus areas of the roadmap:

  1. Data & APIs

  2. SNARK Force

  3. Protocol Economics

  4. Protocol & Network Operations

  5. Indexer Experience

These working groups enable teams in The Graph community to contribute to different components of the protocol in parallel and scale coordination more efficiently. There are also many dependencies across working groups, where outcomes unlock efforts for others (illustrated below by the connecting arrows).

What are the Benefits of using The Graph Protocol?

No tradeoff

DApp developers typically have to choose between performance and decentralization, but The Graph eliminates this problem when it comes to data queries. By using relevant subgraphs, dApps are able to easily retrieve the blockchain data they need without having to rely on a centralized data provider.

Flexibility and convenience

Rather than having to build their own query services or be limited to the blockchain data provided by a third party, developers can use subgraphs to supply their dApps with relevant data. A dApp can leverage one of multiple subgraphs depending on its needs. On The Graph’s website, users and dApp developers can already find a significant number of readily available subgraphs. Alternatively, people can create their own subgraphs that are tailored to their specific needs.

Infrastructure for a decentralized web

Most importantly, The Graph protocol has the potential to contribute to the development of a solid foundation for the fledgling Web3 space and improve the utility of decentralized applications considerably. The technology is poised to remove one of the biggest bottlenecks that Web3 developers are currently facing.

The utility of the protocol has already attracted the likes of Uniswap and Synthetix, as well as other major players in the DeFi space.

Investors:

Organizations:

AU21 Capital San Francisco, CA, United States

CoinFund Brooklyn, New York Founded in 2015

Coinbase Ventures United States Founded in 2018

DT Capital Partners China

Digital Currency Group New York, NY, USA Founded in 2015

Fabric Ventures Luxembourg Founded in 2017

Fenbushi Capital Shanghai, China Founded in 2015

Framework Ventures Genblock Capital San Francisco, United States Founded in 2017

Kilowatt Capital United States Founded in 2011

LedgerPrime Miami

Lemniscap Multicoin Capital Dallas, TX, United States Founded in 2017

ParaFi Capital San Francisco, CA, USA

Tally Capital United States Founded in 2013

Important terms used in Graph protocol

Effective Rewards cut - Effective Reward Cut is a fee that Indexer charges Delegators for delegations management.

  • If it's negative, it means that the Indexer is giving away part of their rewards

  • If it's positive, the Indexer is keeping some of the rewards.

Rewards cut is a technical parameter that shows what % of indexer rewards given Indexer keeps when sharing rewards with its delegators. It includes rewards for the Indexer's self-stacked GRTs.

Effective Query fee cut - Effective Query fee cut is a fee that Indexer charges Delegators for delegations management.

Allocated Tokens - Stake that indexer is actively allocating towards its indexed subgraphs.

NOT Allocated Tokens - Not allocated stake

Self Stake - The Indexer's deposited stake, which may be slashed for malicious or incorrect behavior.

Locked Tokens - The current value of indexer's tokens locked in the graph protocol.

Delegation Pool - Stake from Delegators which can be allocated by the Indexer, but cannot be slashed + self stake.

Delegation Remaining- Amount of GRT that can be delegated to Indexer without exceeding Indexer’s max capacity. Max Capacity is the maximum amount of delegated stake the Indexer can productively accept and equal to 16 Indexer’s self stake. Indexers can not allocate delegations that exceed its max capacity. If max capacity is exceeded, Indexer gets Overdelegated status.

Delegators Earned Rewards - Indexing rewards from the chosen Indexer.

Delegators Earned Query Fees - Query fees from the chosen Indexer.

Indexer Earnings - Indexer’s indexer rewards.

Indexer Query Fees Collected - Indexer’s query fee collected.

Indexer Query Fee Rebates - Indexer’s query fee rebates.

POI - POIs are used in the network to verify that an indexer is indexing the subgraphs they have allocated on. A POI for the first block of the current epoch must be submitted when closing an allocation for that allocation to be eligible for indexing rewards. A POI for a block is a digest for all entity store transactions for a specific subgraph deployment up to and including that block.

Estimated daily reward, GRT - Calculated estimated rewards per day based on the amount of your potential delegation.

Calculated for 10,000 GRT by default. Use the Calculator to change it.

Important thing to know about subgraph:

  1. Can I delete my subgraph? It is not possible to delete subgraphs once they are created.

  2. Can I change my subgraph name? No. Once a subgraph is created, the name cannot be changed. Make sure to think of this carefully before you create your subgraph so it is easily searchable and identifiable by other dapps.

  3. Can I change the GitHub account associated with my subgraph? No. Once a subgraph is created, the associated GitHub account cannot be changed. Make sure to think of this carefully before you create your subgraph.

  4. Am I still able to create a subgraph if my smart contracts don't have events? It is highly recommended that you structure your smart contracts to have events associated with data you are interested in querying. Event handlers in the subgraph are triggered by contract events and are by far the fastest way to retrieve useful data.

  5. Is it possible to deploy one subgraph with the same name for multiple networks? You will need separate names for multiple networks. While you can't have different subgraphs under the same name, there are convenient ways of having a single codebase for multiple networks. Find more on this in our documentation: Redeploying a Subgraph

Key Insights

The migration of over 30,000 subgraphs from the hosted service to The Graph’s decentralized network (mainnet) is ongoing. As of Q3'22, 496 mainnet subgraphs were migrated, up 27% QoQ. The Graph's ecosystem of active Indexers (+32%), Delegators (+10%), and Curators (+2%) continued to grow QoQ. In Q3'22, The Graph saw a 42% QoQ increase in GRT revenue from query fees; however, revenue from indexing rewards decreased 3% QoQ in GRT terms.

Performance Analysis

The Graph ecosystem revolves around the relationship between subgraph developers and data consumers (e.g., app developers) that pay to query subgraph data. The performance of The Graph network can be measured by the growth of active subgraphs, the network's revenue in query fees, and the activity of Indexers, Delegators, and Curators.

Network Usage (Subgraphs)

To bootstrap The Graph, a hosted service was initially created. The goal of this service is to host subgraphs as the protocol gradually transitions into its decentralized network (mainnet). The hosted service is free and consists of a large Indexer run by Edge & Node, the initial team behind The Graph. As of Q3'22, the hosted service supports over 30,000 subgraphs.

As of Q3'22, The Graph protocol is a hybrid of its hosted service and mainnet. The first subgraph launched on the mainnet in Q1'21. Since then, the number of subgraphs launched on the mainnet has grown steadily QoQ. Unlike the hosted service, the mainnet requires users to pay a fee per query. As of Sept. 30, 2022, there are 496 active subgraphs on the mainnet, which is a 27% increase QoQ; in addition, 100 subgraphs are in deployment as of end of Q3’22.

Over the next several quarters, the number of deployed subgraphs on The Graph network (mainnet) is expected to continue growing. The Graph community aims to migrate all subgraphs from the hosted service to its mainnet over time, as more chains are integrated with the decentralized network. This increase in mainnet subgraphs should facilitate growth among other key metrics of The Graph, ranging from ecosystem participation to the revenue generated from query fees.

Ecosystem Participation

Subgraphs provide an arena for both technical and non-technical ecosystem participants to interact symbiotically. Indexers operate Graph Nodes to process and store on-chain data. Data consumers can then query this data via GraphQL, an open-source language for The Graph’s APIs. Curators signal to Indexers which subgraphs are valuable to index. Curators may also often act as subgraph developers. Those ecosystem participants who lack the technical know-how or resources to index may choose to delegate GRT to Indexers. Staked GRT is required for indexing subgraphs. As Indexers receive more GRT via delegation, they increase their capacity to collect a larger portion of the indexing rewards.

The number of Indexers (+32%), Delegators (+10%), and Curators (+2%) continues to increase QoQ as more mainnet subgraphs are deployed. In particular, the growth of Indexers is critical to scaling The Graph’s network and reached an all-time high in Q3’22.

Indexers monetize their indexing and query processing services on The Graph's query market by staking GRT. The minimum stake for an Indexer is currently set to 100,000 GRT (roughly $9,900 as of Sep. 30, 2022). On top of this minimum Indexers can also receive delegated stake from other users. Delegators can increase their total stake above an Indexer's personal stake, up to a 16x multiplier of an Indexer’s stake.

While all 340 Indexers allocate or have allocated their own stake towards their subgraphs to earn staking rewards, 219 are actively staking GRT (i.e., are active) as of the end of Q3’22, up 32% QoQ. This growth in active indexers could be explained by Indexers anticipating the migration of more subgraphs to the mainnet, which would lead to more indexing opportunities.

Network Revenue

The GRT token follows theStake-for-Access model, also known as a work token model. Participants in The Graph's ecosystem earn revenue in GRT by performing work in the form of indexing and querying services on the mainnet. Both services require GRT to be staked. Indexers' stake comprises their own GRT tokens (i.e., self-stake) and GRT delegated towards them (i.e., delegated stake).

The two main sources of revenue on The Graph are inflationary indexing rewards and query fees paid by end users. Revenue from both indexing rewards and query fees is funneled through Indexers who then distribute it to Delegators and Curators.

Every Indexer is free to define their own individual cut of query fees and indexing rewards, based on the supply-and-demand dynamics of the open marketplace. According to this individual cut, each Indexer then distributes the revenue as follows: query fees are shared with Curators, whereas both indexing rewards and query fees are shared with Delegators.

As per the above example, if an Indexer set the query fee cut to 15.2%, their Delegators would receive the remaining 84.8% of the fee revenue. While Delegators' stake cannot be slashed, there are several aspects that need to be taken into account by Delegators when staking their GRT with Indexers. These aspects relate to:

  • Indexer choice, i.e., choosing effective Indexers with the most optimal reward payouts

  • Unbonding period, i.e., no GRT transfers or rewards are possible within a 28-day window after undelegation

  • Delegation tax of 0.5%, i.e., calculating how long it takes to earn back the 0.5% tax on delegation.

Indexing Rewards

Indexing rewards come from a 3% annual inflation in the GRT supply. They are distributed to staked Indexers in return for providing indexing and querying services on the open marketplace.

While the GRT distributed as indexing rewards in Q3'22 decreased 6%, it remained flat for Delegators on a QoQ basis. Notably, over the past six quarters, Delegators received more indexing rewards than Indexers themselves. In Q3'22 alone, Delegators were rewarded over 38 million GRT, which is approximately 54% of the total indexing rewards distributed.

Delegators have staked 2 billion GRT as per end of Q3'22, i.e., 63% of the total of 3.2 billion GRT staked on The Graph. Since July 2021, the total GRT staked was relatively constant between 2.7 and 3.2 billion GRT. Relative to the circulating supply, the percentage of GRT staked decreased from 64% in July 2021 to nearly 41% in September 2022. Simultaneously, the number of active Indexers continuously increased over the past four quarters. As more subgraphs are deployed to The Graph mainnet, smaller Indexers can provide indexing and querying services on the open marketplace.

Because the growth of Indexers is so critical to scaling the network, The Graph incentivizes more Indexers to participate in the network by making node operations economically sustainable.

Query Fees (Network Usage Fees)

While the bulk of Indexer earnings come from rewards, the second source of network revenue comes from query fees. Data consumers (e.g., app developers) pay query fees for Indexers to fetch and organize data for them. Query fees are determined by market demand and distributed to Curators, Indexers, and Delegators. That is, not only do Indexers and Delegators benefit from query fees, but so do Curators.

While query fee cuts generally stayed flat for individual Indexers, total revenue from query fees increased 42% in GRT terms QoQ (up 3% in USD terms). With more subgraphs migrating to the mainnet, query fee activity should continue to increase.

Qualitative Analysis

Amid the overall market downturn and the troubling global macroeconomic environment in Q3’22, The Graph community continued to steadily develop its ecosystem through five working groups: data & APIs, SNARK Force, The Graph protocol economics, network operations, and Indexer experience. Q3’22 Core Devs Calls (August 2022 and September 2022) maintained discussions about rolling updates from the five working groups. Q3’22 had several noteworthy events.

Wave 6 Grants: On Jul. 28, 2022, The Graph Foundation announced Wave 6 grants, which allocated $849,000 for protocol improvements. The grants were awarded to the following categories:

  • Protocol R&D: $400,000

  • Tooling: $52,000

  • Dapps & Subgraphs: $77,000

  • Community Building: $320,000.

Migration Infrastructure Providers (MIPs): On Aug. 25, 2022, The Graph Foundation announced the latest incentivization program for Indexers. The MIPs program has allocated 0.75% of the GRT supply (75 million GRT), with 0.5% going to Indexers who contribute to bootstrapping the network and 0.25% allocated to migration grants for subgraph developers using multichain subgraphs. The MIPs program formally begins on Sept. 20, 2022, and will conclude at the end of Q1’23. Gnosis Chain will be the first chain after Ethereum supported on the decentralized network. New chains to be supported on the testnet will be announced throughout the MIPs program. The journey to becoming an Indexer on the mainnet is summarized below.

Substreams Integration into Subgraphs: On Aug. 31, 2022, adding Substream support to Graph Node was discussed. The goal was to improve indexing and syncing speeds for subgraphs by up to 100x. Substreams add composable, high-throughput, parallelized pathways that feed data to subgraphs, and end-user applications.

The Graph Arbitrum Deployment: Deployment of The Graph’s smart contracts to the Arbitrum One Layer 2 blockchain are presented in GIP-0037 and GIP-0034. The reasoning behind these proposals is that gradually moving to an L2 would benefit from gas savings, and Arbitrum represents the best candidate.

Graph Node: V0.28.0 was released on Sept. 27, 2022. This release introduces a new DB table for dynamic data sources. It includes experimental support for GraphQL API versioning. Changes in this release include various minor bug fixes and performance improvements.

A full list of The Graph events can be accessed via Messari Intel.

Sources:

https://finematics.com/the-graph-explained/

https://messari.io/report/state-of-the-graph-q3-2022

Last updated