logo
Analytics
/
Projects
/The Graph Protocol Overview

The Graph Protocol Overview

Nov 27, 2024
The Graph Protocol Overview

Key Insights

  • By creating subgraphs and employing GraphQL for querying data, The Graph alleviates the complexities involved with extracting and utilizing blockchain information. 
  • The Graph has enhanced blockchain data accessibility by introducing a decentralized indexing protocol that transforms raw transaction data into queryable information, enabling developers to efficiently build dApps without maintaining complex server-side solutions.
  • The Graph crypto protocol operates through a carefully balanced system of participants (Indexers, Curators, Delegators, and Developers) who are incentivized through the GRT token, creating a sustainable and self-maintaining network that serves over 70 blockchain platforms.

Several years ago, decentralized finance was just a concept, and there wasn't even a term to accurately describe it. Today, however, DeFi has become a staple of the Web3 ecosystem, representing a fast-growing sector with tens of billions of dollars in capital.

DeFi has opened up new opportunities for users, allowing them to make financial transactions without the involvement of traditional intermediaries such as banks, made possible by the development of smart contracts and blockchain technologies.

As data volumes have increased and DeFi protocols have become more complex, there has been a need for new, more efficient solutions to process and analyse huge amounts of onchain data.

One such solution is The Graph, which has significantly simplified access to structured information from various blockchains and has become an integral part of the Web3 ecosystem.

Below you can read in detail about the introduction of subgraphs and the adoption of GraphQL that equip developers with enhanced tools for data handling, propelling the expansion of DeFi and other Web3 domains.

What is The Graph

The Graph crypto protocol operates as a decentralized protocol that indexes and queries blockchain information, offering developers an efficient and straightforward way to access blockchain data without relying on centralized servers.

Primary function of The Graph is to streamline the process of retrieving structured data in real time, thereby expediting the development of decentralized applications.

Crucially, The Graph has established benchmarks for subgraphs, specialized methods for indexing blockchain data in the Web3 space. Subgraphs simplify the data retrieval process for developers by eliminating the need to search through the entire blockchain.

Since its inception in 2018, The Graph has provided significant support to the development community by offeringnecessary resources to craft and utilize subgraphs effectively.

Currently, there are approximately 10,000 active subgraphs in use across more than 70 blockchain platforms, including leading networks like Ethereum, Solana, Arbitrum, Optimism, Polygon, Base, Celo, Fantom, among others.Prestigious projects such as Uniswap, Lido, Aave, ENS, and Compound utilize the subgraph feature, illustrating their crucial role and reliability in the Web3 ecosystem.

As a pivotal data resource for the decentralized web, The Graph continues to foster the expansion and evolution of DeFi, enabling both users and developers to access timely data from multiple blockchain sources, thereby facilitating the creation of innovative applications.

The Graph: Problem Solving

In traditional blockchains, accessing data is complicated because it is stored as raw transactions. This creates difficulties in extracting information and using it in dApps. Below is an example of a problem that The Graph can solve.

Imagine you want to retrieve a list of all NFTs belonging to a certain address, filtering them by some criterion such as creation date or rarity.

It is not possible to perform such a query directly interacting with a smart contract, as contracts are not designed for complex filtering and searching (issue that subgraphs ultimately help to resolve).

To retrieve this data manually, one would have to process each transaction, read the NFT metadata via IPFS, and then perform complex data aggregation. This process can be time-consuming and requires significant computational resources.

The traditional solution would be for developers to build their own server that collects and processes data and then provides APIs to access the information. However, this approach requires significant infrastructure and maintenance costs, and creates a centralized point of failure, which goes against the DeFi principles.

Below you can see a solution that The Graph provides.

The Graph eliminates this problem with a decentralized data indexing protocol. Developers independently create subgraphs, modules that define what data to retrieve and how to structure it. These subgraphs can be queried through the GraphQL API, allowing dApps to retrieve the data they need efficiently and quickly.

GraphQL is a query language that allows for efficient extraction of structured data, giving developers the ability to set precise parameters to retrieve only the data they need.

This allows developers to focus on building applications without wasting resources on developing complex server-side solutions to handle blockchain data.

Indexing data through subgraphs solves scalability and performance issues, making it easier and more cost-effectiveto build and maintain decentralized applications.

How The Graph Works

The Graph crypto protocol indexes blockchain data based on instructions called a subgraph manifest. The manifest defines:

  • The smart contract whose data is to be indexed

  • The events to be tracked

  • The database structure to store the processed data

The following diagram shows the data flows after the subgraph manifest is activated in the network:

the-graph-crypto

The Graph: Main Work Phases

  • Subgraph creation

Developers use the Graph CLI to define a manifest and deploy it to the IPFS network. Subsequently, they instruct indexers to commence data processing based on this manifest.

The Graph CLI serves as a command line interface that simplifies the processes of creating, testing, publishing, and managing subgraphs, thereby streamlining developer interaction with The Graph network.

  • Data indexing

The Graph crypto protocol monitors the blockchain for new data aligned with events outlined in a subgraph.

Each detected event undergoes processing through a WASM module and the results are saved in a Graph Node database as per the manifest’s structure.

WASM, short for WebAssembly, is a technology designed to execute code swiftly and efficiently in web environments, enabling complex operations within web browsers.

  • Data queries

The dApp sends requests to the Graph Node using GraphQL.

The Graph Node processes these requests and returns the organized data, which is then incorporated into the dApp’s user interface for display to the end users.

  • Example workflow cycle

A user engages with the dApp, initiating a transaction via a smart contract.

This contract emits events that the Graph node captures and processes.

The node indexes the data and makes it accessible to the dApp.

The dApp then utilizes this data either to display required information to the user or to facilitate the creation of further transactions. The process then repeats itself.

Through these mechanisms, The Graph effectively transforms unstructured blockchain data into organized information that can be readily employed within dApps, significantly easing the development and management of decentralized applications.

Developing a Subgraph on The Graph

the-graph-subgraph

  • Create a subgraph

The process begins with design. Developers use Subgraph Studio to design a subgraph. The main components include:

Schema: Defines the structure of the data (entities) and their relationships.

Manifest: Specifies what data should be indexed, what events are tracked, and how the data is processed.

  • Deploy a subgraph

The developed subgraph is uploaded to the network via the Graph CLI. After deployment, the subgraph is registeredin the decentralized network and made available to indexers for processing.

  • Test a subgraph

During the testing phase, the correctness of the subgraph is verified by querying the API via GraphQL to ensure the accuracy of the received data. This allows to identify errors and improve the performance of the subgraph before publication.

  • Update subgraph metadata

When necessary, developers can update a subgraph by making changes to the metadata (such as adding new events or changing the schema). These updates require a rebuild and re-deploy.

  • Publish a subgraph

After successful testing, the subgraph becomes public via The Graph Explorer, allowing users and dApps to access the data.

  • Signal on a subgraph

Curators interested in growing the network can highlight a subgraph as valuable by signalling with GRT crypto tokens. This step incentivizes indexers to start processing the subgraph and increases its priority in the network.

The Graph: Decentralized Protocol

The key concept behind the decentralization of The Graph crypto protocol lies in the distributed architecture of its network. The protocol provides data processing, management and an economic model without a centralized intermediary. The basic principles of decentralization include:

  • Indexing and data processing are performed by independent indexers that run on distributed the Graph Nodes around the world. This eliminates the single point of failure risks inherent in centralized systems.

  • Open access to The Graph crypto network data allows any developer or user to connect to the protocol and use the data for their dApps.

  • All network performance information, such as subgraphs used, economic activity and rewards, is transparentand available for inspection, which is in line with Web3 principles.

Network Members And Economic Model

The Graph crypto ecosystem is based on the interaction of several groups of participants, each of which fulfils key functions for the maintenance and development of the network. At the centre of its economic model is the GRT crypto token, which ensures the motivation of all parties and the sustainability of the system.

the-graph-indexing

The Graph: Network Members

Developers

  • Create subgraphs, open APIs, that allow applications to query and structure data from blockchains.

  • Provide access to data via easy-to-use GraphQL queries, supporting DApps in DeFi, GameFi, NFT and more.

Indexers

  • Manage the Graph Nodes, performing data processing and indexing.

  • Stack GRT tokens to ensure economic security of the network and protect against sybil attacks.

  • Receive rewards in the form of query fees and incentive payments from token issuance.

Curators

  • Use GRT coin to signal valuable subgraphs, helping indexers focus on prioritized data.

  • Receive a portion of commissions for successful queries on subgraphs they have selected.

Delegators

  • Delegate their GRT tokens to indexers to participate in revenue sharing without running their own nodes.

  • Help to attract capital to the network and decentralize it

The Graph: Economic Model

the-graph-subgraphs

The financial viability of The Graph is maintained through a sophisticated staking and reward system:

  • Economic security

To ensure trust and filter out harmful entities, indexers must stake GRT tokens as a measure of their reliability.

  • Motivational rewards

Indexers are compensated for processing queries, with rewards based on the extent of their staking and the volume of work performed.

Curators gain financial benefits when the subgraphs they endorse become widely used.

Delegators receive a portion of what indexers earn by contributing their investment to strengthen the network.

  • Token distribution

Newly issued GRT tokens are allocated to support the indexing of emerging subgraphs and achieve other strategic developmental objectives within the ecosystem.

This economic framework establishes a balanced environment where all contributors receive financial incentives for their participation in the network. The Graph acts as a conduit connecting blockchain data to its practical application, empowering developers and democratizing data access.

The Graph Tokenomics: GRT Coin

At the time of writing, The Graph (GRT) is the 54th largest token by market capitalisation at $2.2 billion and its Fully Diluted Valuation (FDV) is around $2.38 billion. GRT's tokenomics is carefully designed to foster long-term growthand ecosystem stability.

grt-coin

Highlights of the Graph token allocation are as follows:

  • Early Team & Advisors (23%)

A significant portion of GRT crypto tokens allocated to the team and advisors in the early stages of project development.

  • Foundation (20%)

GRT tokens allocated to investors who supported the project in its early stages.

  • Strategic Round (17%)

GRT crypto tokens allocated to strategic investors who provided capital in the early stages of development.

  • Seed (17%)

GRT allocated to seed investors who invested in the earliest stages of the project.

  • Edge & Node (8%)

GRT tokens allocated to support network participants, such as indexers, who play an important role in maintaining and extending the protocol infrastructure.

  • Public Sale (4%)

GRT crypto tokens sold in a public offering to a wide audience.

  • Curator Programme Grants (3%)

Grants given to Curator Programme participants who help improve the quality of data on the network.

  • Testnet Indexer Rewards (3%)

Rewards for testnet participants who help test and improve the system.

  • Educational Programme (2.2%)

GRT allocated to support educational initiatives aimed at educating developers and users.

  • Community Sale (2%)

GRT crypto tokens sold directly to the community through specially organized sales.

  • Bug Bounty (0.7%)

Rewards for finding and fixing bugs in the system.

The Graph: Investment and Fund Support

The Graph has raised significant funds from leading venture capital players, highlighting its strategic importance to Web3. In late 2018 and early 2019, the project focused on raising seed funding for development, team building, and industry partnerships.

In 2022, The Graph led a major investment round, raising $255 million thanks to participation from leading venture capital funds such as Multicoin Capital, Digital Currency Group, HashKey Capital and others.

These investments emphasize the high level of confidence in the Graph project and its key role in the development of the Web3 ecosystem. Despite the fact that the project was launched in 2018, such a large investment in 2022demonstrates investors' belief in its long-term prospects and significant impact on the development of the decentralized internet.

Since its launch, The Graph has raised a total of $279.7 million. These funds have allowed the project to scale its infrastructure, actively support developers and strengthen its position in the industry.

The process of unlocking GRT tokens for investors is 53% complete and the remainder will enter the market gradually until 2028. This gives confidence that significant volumes of GRT tokens will not enter the market at the same time and will not have a negative impact on the price.

Users can get GRT or any other cryptocurrency for fiat or crypto on SimpleSwap.

Summary

The Graph has emerged as a crucial component within the Web3 ecosystem, significantly advancing the development of decentralized applications by addressing the critical challenge of efficiently, cost-effectively, and decentralized retrieving structured blockchain data.

The economic strategy of The Graph underpins the network's longevity by motivating participants who are rewarded for their engagement.

The backing from prominent investors highlights the project's pivotal significance to the Web3 internet's future.

Marking significant progress in its journey, The Graph continues to solidify its position as a vital resource in the Web3 landscape.

Ongoing developments promise to broaden the scope for decentralized applications. Supported by its economic structure and the integral role of the GRT crypto token, The Graph stands out not only for its technological innovations but also as a potentially lucrative option for long-term investments amid escalating interest in decentralized applications and infrastructure initiatives.

The information in this article is not a piece of financial advice or any other advice of any kind. The reader should be aware of the risks involved in trading cryptocurrencies and make their own informed decisions. SimpleSwap is not responsible for any losses incurred due to such risks. For details, please see our Terms of Service.