Bitget App
Trade smarter
Buy cryptoMarketsTradeFuturesCopyBotsEarn
The Graph: From Indexing Protocol to AI Infrastructure

The Graph: From Indexing Protocol to AI Infrastructure

BlockBeats2024/07/30 13:09
By:BlockBeats
Original source: Four Pillars


Key Points


· The Graph has proven its sustainability with its steadily improving product maturity and market demand without relying on short-term incentive mechanisms.


· The Graph is a typical example of such a project. As a data indexing/query infrastructure, The Graph has provided data query and indexing services for various applications and blockchains over the past three years. This is an encouraging case because its usage is steadily increasing even without airdrops or point systems.


· The Graph is committed to becoming a core platform for the integration of AI technology and blockchain through its accumulated infrastructure, and has released innovative products such as AgentC, indicating its important role in future development.


Introduction and Background


As I mentioned in my previous article, consistency and sustainability are just as important as new technologies and narratives in this market (at least, that’s my belief). This importance is reflected not only in the history of a project, but also in its future potential. As a researcher, my job is not only to interpret and introduce new narratives and industry trends, but also to focus on projects that consistently reflect their values and concerns in this market, telling their history and future potential. In this regard, the protocol I introduced today deserves attention due to its fascinating history and transformation. Moreover, with the continuous integration of blockchain and data services and AI use cases in various fields, I believe the role of the protocol introduced today will become increasingly important. The protocol I introduced today is The Graph, which is the longest-standing decentralized indexer in the market. In this article, I will focus on why now is the right time to pay attention to The Graph and why its future growth potential is undeniable.


1.1 Purpose of this article: Why The Graph?


I choose to discuss The Graph now because it is in a critical transition period. At the protocol level, it is gradually evolving from a basic indexing protocol to a protocol that provides decentralized data services. This transformation indicates its important position in the future market. It is worth noting that among many blockchain protocols, The Graph can continue to attract demand for its services, which is very valuable. At the same time, many blockchains and applications built on them often find it difficult to attract users naturally, and they often need to rely on incentives such as point systems or airdrops to temporarily increase user engagement. In contrast, The Graph has been able to maintain a stable demand for its protocol even without these external incentives. Its average monthly query volume has reached 1 billion times and is showing a continuous growth trend. This not only proves the intrinsic value of The Graph's service, but also shows its solid position and development potential in the market.


In this regard, those who value blockchain infrastructure will find that The Graph provides an excellent solution. As the blockchain market develops, especially considering the trend of AI and blockchain integration in the future, the role of data indexers like The Graph will become more prominent, and its demand is expected to continue to rise. The purpose of this report is to explore the development history and market dynamics of The Graph in depth, and analyze why now is an important time to pay attention to The Graph. By combing through the historical background of The Graph and analyzing the changes in its market demand, I will explain why The Graph deserves close attention from the industry and investors.


Before I dive into the internal mechanism of The Graph, let’s first outline the two core reasons why I pay attention to this protocol.


1.1.1 In the era of AI and blockchain integration, The Graph can become the core infrastructure


In today’s blockchain industry, people are hotly discussing the potential synergies that can be stimulated by combining AI and blockchain. With some projects working to verify personal identities to distinguish between humans and AI, and others looking at sharing idle computing resources to meet AI’s needs, there are many innovative ideas emerging in the market. However, in my opinion, the most direct and effective way to combine these two technologies is to make blockchain applications more user-friendly by leveraging on-chain data.


To illustrate with an example: Imagine that AI can grasp all the data related to decentralized exchanges (DEX) in the Ethereum ecosystem. It can integrate information scattered across different Ethereum DEXs to promote smarter trading decisions. Going further, if intelligent agents can perform complex operations on behalf of users, such as automatically completing the necessary steps to receive airdrops, the user’s on-chain experience will be significantly enhanced. But the premise of all this is that there must be an efficient on-chain data indexing mechanism.


AI relies on data to operate, especially in scenarios where on-chain data needs to be frequently accessed for calculations, fast and efficient access to data becomes crucial. Imagine how ideal it would be if there was an entity that could not only provide data but also support the computing resources required for AI operations. The Graph is developing rapidly in this direction. It not only accumulates a large amount of on-chain data, but also has nodes that maintain the network and provide computing resources. This dual ability of combining data and computing makes The Graph a key infrastructure to support AI, providing AI with the data and computing resources needed for efficient computing.


Therefore, as more AI services start to leverage on-chain data, data service protocols like The Graph are becoming increasingly important, which is why we should keep a close eye on The Graph.


1.1.2 In the era of points and airdrops, The Graph is a case study of creating real demand


When Blur's Pacman, now the leading NFT marketplace, first introduced a points system, it successfully attracted its first users. However, any strategy will reduce its value if it is overused. After Blur's success, many projects began to imitate it, relying on the points system to artificially create demand, but ignoring the core element of product quality. This reliance on external incentives to generate demand is ultimately unsustainable. Once points can be exchanged for tokens, users may abandon these protocols. Many projects rely on points or airdrops because they have not yet found a product that truly fits the market demand. The market is increasingly fatigued with points and airdrops.


The Graph is an exception, it has insight into the needs of the blockchain market and provides a product that truly solves the problem, thus creating natural and lasting demand. In this blockchain market that is often driven by narratives and short-term hype, those who truly care about the fundamentals and long-term value of the protocol should look to The Graph.


1.2 What is The Graph?


The key role of understanding The Graph is the foundation, but what exactly does it do? Before diving into its details, I dare say that The Graph is probably one of those protocols that we use frequently but few people know about. Whether it is through Farcaster, Lido, Uniswap, ENS, Aave, Compound, GMX, Sushiswap or Curve, you have actually indirectly experienced the power of The Graph. Next, let's take a deep look at The Graph's core role, architectural design, and how it works.


1.2.1 The Graph as a Data Indexing and Querying Infrastructure


The Graph is best known as an indexing and querying tool for blockchain data. So, what exactly is data indexing and querying? Simply put, an index is like a book catalog in a library, which helps us quickly find the information we need without having to browse the entire book page by page. Similarly, in a database, an index makes data retrieval faster and more efficient by marking the location of the data.


Data query is the process of requesting and getting specific information from the database. The Graph’s role in this regard is like providing precise navigation for blockchain data, which simplifies the steps of finding and extracting data on the blockchain. To more clearly illustrate how The Graph performs data queries, we can summarize its workflow into the following steps:


Data Query Lifecycle


The Graph: From Indexing Protocol to AI Infrastructure image 0


· The user initiates a data request through the DApp’s frontend.


· The DApp requests data from The Graph’s SQL Gateway.


· The SQL Gateway finds an indexer that can provide the requested data.


· The selected indexer already stores the requested data, extracts and provides it, and charges a fee for the query.


· The gateway passes the data to the DApp.


· DApp displays or uses data on the front end.


Indexing and querying blockchain data is not as simple as you think


Although it sounds straightforward, indexing and querying blockchain data is actually fraught with complexity. The characteristics of blockchains, such as the finality of transactions, possible chain reorganizations, and the existence of orphaned blocks, all make it challenging to retrieve data efficiently. While it is relatively simple to extract data directly from smart contracts, obtaining data that is not directly exposed from contracts requires more complex processing, making the provision of efficient blockchain data services a daunting task. How does The Graph address this complexity and achieve efficiency in data services?


1.2.2 Several concepts we need to understand


Before we delve into the structure and participants of The Graph, we need to understand GraphQL and subgraphs:


· GraphQL:An API query language developed by Meta (Facebook's parent company), known for its efficiency that exceeds REST API. Although the name contains "Graph", GraphQL is not unique to The Graph and has been widely used since Meta open sourced it.


· Subgraph:The Graph’s unique API for customizing blockchain data. Subgraphs specify how data is collected, organized, and retrieved. The process of creating and using a subgraph includes the following steps:


1. Install GraphCLI:Use the command line interface tool developed by The Graph to easily manage subgraphs.


2. Initialize project structure:Quickly build a project based on a template, including manifest files, data models, and mapping logic.


3. Schema definition:Clarify the structure of the required data and their interrelationships.


4. Write a manifest file:Set indexing rules to specify which data to extract from the blockchain.


5. Write a mapping script:Details how the raw data is converted into the required data schema.


6. Subgraph Deployment:Upload the schema, manifests, and mapping scripts to The Graph to start the data indexing process.


7. Data Querying:Once the data is ready, developers can query it efficiently through GraphQL.


Understanding these concepts is crucial to explaining The Graph. Now let’s explore the structure of The Graph in detail.


1.2.3 The Structure of The Graph


The Graph: From Indexing Protocol to AI Infrastructure image 1


The Graph network consists of four key roles: Indexers, Curators, Delegators, and Developers, who together provide data support for web3 applications. Here are their respective responsibilities:


· Indexer:Plays a role similar to that of a validator or node in the underlying blockchain network. To become an indexer, you need to stake GRT tokens in The Graph network. The core responsibility of an indexer is to provide data indexing and query services, and earn income through transaction fees and inflation rewards. If an indexer behaves improperly, its staked tokens will be slashed, ensuring a close connection between GRT staking and network security. Indexers focus on indexing subgraphs recommended by curators. There are currently more than 140 indexers in The Graph network, which is a sufficient number.


· Delegator:Delegates their GRT tokens to the Indexer, similar to token staking and delegation in the dPoS system. Delegators receive a share of the query fees earned by the Indexer, but be aware that the delegation process includes a 0.5% tax and a 28-day unbonding period.


· Curator:Responsible for recommending subgraphs worth indexing to the Indexer. To encourage high-quality curation work, The Graph introduces the Graph Curation Share (GCS) token, which allows curators to receive a share of the query fees generated by the subgraphs they recommend, thereby aligning the interests of curators with those of the Indexer.


· Developer:Different from the first three as supply-side, developers are the main users of The Graph as demand-side. They create and submit subgraphs to The Graph network to meet the demand for data.


Through this multi-party collaboration model, The Graph network can continue to provide stable and efficient data services for blockchain applications.


1.2.4 The Graph's Efficiency


Now that we have a basic understanding of The Graph's core concepts and participating roles, let's take a deeper look at how The Graph achieves its high efficiency.


The design concept of subgraphs is to provide customized indexing solutions for specific types of data, which greatly optimizes the query process. GraphQL, as the query language used by The Graph, further improves the query response speed with its efficiency. At the same time, the GraphCLI tool developed by The Graph team simplifies the management and deployment process of subgraphs, allowing even complex blockchain data indexing and query tasks to be executed quickly and efficiently.


In addition, The Graph continues to innovate and improve indexing and query technology. These ongoing efforts have led to innovative technologies such as Firehose and Substreams, which will be introduced and discussed in more depth later. Through these innovations, The Graph is continuously improving its performance to meet the high standards of blockchain data services.


1.2.5 Taking Farcaster Frames as an example (how to use The Graph)


The Graph: From Indexing Protocol to AI Infrastructure image 2
Source: limone.eth


To more intuitively demonstrate the functionality of The Graph, let’s take the popular application Farcaster as an example. Farcaster’s star feature is Frame, which allows users to embed applications into social media content to mint NFTs or experience games on social networks. Since Frames usually need to display on-chain applications on the Web, the acquisition of on-chain data becomes crucial. In these application scenarios, developers can use The Graph’s subgraphs to grab the required data.


Take 3070 as an example. The application indexes the data of Ethereum and Base through an NFT subgraph to create an NFT browser. Another example is limone, which uses The Graph to obtain on-chain event data and develops Frames for on-chain proposal voting. These cases illustrate how The Graph facilitates the construction of Frames.


Currently, The Graph is actively participating in Farcaster's BountyCaster bounty program to encourage Farcaster users to explore and apply the various possibilities of The Graph.


The Graph as AI Infrastructure: More Than Just an Indexer


The Graph: From Indexing Protocol to AI Infrastructure image 3
Source: The Graph's White Paper


So far, we have a comprehensive understanding of the functions, operating mechanisms and participants of The Graph protocol. But as mentioned at the beginning of the article, the purpose of this article is not just to explain The Graph itself - although this is equally important - but to explore how The Graph will become the core of future infrastructure, not only as an indexer, but also as a decentralized data service protocol. In this section, we will discuss in depth one of the two core reasons I mentioned earlier: the integration of AI and blockchain, and the key role that The Graph plays in this process.


2.1 What is different about The Graph?


To fully unleash the potential of AI, both data and computing resources are essential. Without data support, no matter how advanced the AI system is, it cannot give accurate responses because they rely on historical data to learn. The Graph's deep accumulation in on-chain data indexing has become an extremely valuable resource. For AI that needs to learn efficiently from on-chain data, the subgraphs of The Graph network are almost an unparalleled data source. At the same time, the huge indexer infrastructure built by The Graph also provides the necessary computing support for the operation of AI.


In short, The Graph aims to become the core of the infrastructure of AI and blockchain technology, providing both the computing resources required for AI to operate and the massive data required for it to learn. Even in the face of challenges from new competitors, The Graph's extensive data resources and indexer network constitute an insurmountable advantage.


Specifically, what substantive contributions can we expect from The Graph in terms of AI services? From my perspective, there are two main categories of services: one is the inference service, and the other is the proxy service. Let's explore the content of each service in more detail.


2.2 Inference Service


The Graph: From Indexing Protocol to AI Infrastructure image 4


The inference service allows the deployment of AI models on The Graph network, integrating ChatGPT-like features into the application front end, greatly improving the user experience. The implementation of this service relies on the powerful computing power of The Graph network indexer. This evolution of The Graph marks its growth from a simple data indexing query platform to a platform capable of hosting AI. The process of deploying an AI model on The Graph is as follows:


1. The user interacts with the front end of the AI dApp.


2. AI dApp requests a specific inference model through The Graph’s AI Gateway.


3. AI Gateway finds an Indexer that can provide the required model.


4. The Indexer uploads and runs the model, sends the inference results back to the Gateway, and is paid for the service.


5. The Gateway passes the results to the AI dApp.


6. AI dApp displays or utilizes this data on the front end.


Developers choose to host AI models on The Graph for good reasons: First, compared to centralized services that may be restricted by policy, The Graph, as a decentralized platform, does not have such restrictions, providing developers with greater freedom. Second, compared to the requirement to maintain expensive dedicated hardware and have a deep understanding of AI models, The Graph provides an open and uncensored market environment that allows developers to easily find and use models that meet their needs, which is not only cost-effective but also more efficient.


2.3 Proxy Services


Proxy services perform a series of complex operations through third parties. They are responsible for not only data processing, but also converting natural language into executable queries, as well as other advanced tasks. AgentC launched by The Graph is a clear example of the convenience of this service.


2.3.1 Take AgentC as an example


The Graph: From Indexing Protocol to AI Infrastructure image 5
Source: AgentC


AgentC is equivalent to a ChatGPT-style tool for decentralized exchange data indexed by The Graph. For researchers, AgentC provides great convenience by simplifying the complex process of on-chain data analysis and directly providing the required information. For example, through a simple query, AgentC can quickly retrieve and report the decentralized exchanges with the highest trading volume in the past week and their trading volume in US dollars. Although AgentC is currently in the demonstration phase and limited to data from a few top DEXs, its potential scope and effectiveness are already apparent. In the future, as AgentC expands to all chains and applications supported by The Graph, it is expected to become a powerful analytical tool for researchers.


The Graph has been continuously indexing and querying multi-chain data, including Ethereum, for the past four years, building a powerful infrastructure to support a variety of tools. AgentC is a prime example of combining The Graph data with AI, showing how AI can simplify and make complex on-chain data easy to access. With the combination of AI and The Graph, a new era of user-friendly on-chain data usage is gradually unfolding.


2.4 The Graph’s Future is Within Reach


AI has quietly integrated into our daily lives and is about to significantly improve the experience of blockchain services by solving many challenges of user interfaces (UI). Faced with the prospect of widespread application of AI on blockchain, the importance of The Graph must be raised to a new level. This importance is not only due to the fact that AI relies on The Graph to obtain and learn from on-chain data, but also because The Graph is gradually transforming into a platform that can carry AI.


At present, services like AgentC are still in the demonstration stage, but it is enough to imagine that they will be able to use data from all subgraphs in The Graph network in the future. For researchers, such tools will become an indispensable assistant in their research work. The advancement of AI technology combined with the massive amount of data indexed by The Graph indicates huge synergy potential, which is worth all of us eagerly looking forward to.


The Graph as a Sustainable Protocol


The Graph’s value in the AI era is clear from its demand. However, it is also important to examine The Graph from the supply side, especially its sustainability. After three years of development, The Graph network continues to show strong vitality and provides a model for similar token-based networks. How did The Graph build this sustainable protocol?


First, The Graph created a stable market demand, providing basic services without relying on artificial demand inflation. Second, in the current challenging time of finding product-market fit (PMF), The Graph has not only successfully found its PMF, but also continued to strengthen it by launching multiple measures to optimize protocol performance and ensure user satisfaction. Below, we will explore these two key aspects in depth.


3.1 No points or airdrops required.


The Graph: From Indexing Protocol to AI Infrastructure image 6


(The chart above shows the number of queries processed by The Graph each month. Queries previously handled by centralized entities were transferred to decentralized networks after the implementation of the Sunrise plan, resulting in a sharp increase in query volume. The Sunrise plan marked the beginning of full decentralization, and the query volume surged with it. The gray part of the figure is the future query volume predicted based on the average daily query volume from July 1 to the present. Since July has not yet ended, the forecast will continue to be updated.)


As mentioned in the introduction, in the cryptocurrency space, airdrops are seen as a key strategy for launching new projects. By issuing tokens and distributing them to users as rewards, the project can quickly build network effects without additional marketing costs, closely tying user interests to network development, and incentivizing users to continue to participate.


The points system is similar to airdrops in terms of functionality. As non-token points, it provides greater flexibility and effectively builds user expectations without a fixed conversion rate.


However, any strategy that relies too much on it may lead to the alienation of its original intention. Airdrops and points systems were originally intended to reward early participants and unify interests, but over time, some users participated only to chase airdrops and points. Once the airdrops ended, the use of the protocol also declined, raising questions about the sustainability of these systems.


While it is crucial to attract early users through airdrops, it is more critical whether the project truly provides an effective solution and clearly solves practical problems. For projects with great products, airdrops and points can serve as effective marketing and network expansion tools.


What is the definition of a good product? It should be able to solve real problems. The Graph is such an example.


The Graph's data query volume increased instead of decreased after the airdrop, proving that the demand for its protocol was not artificially created by the airdrop, but a fair reward for its contribution.


The reason why The Graph can still maintain stable demand after the airdrop is that it provides indispensable data indexing and query services.


While the discussion about airdrops and point systems continues, The Graph's strategy is worth pondering. Airdrops themselves are not negative, but the approach of simply copying existing services and relying on airdrops to attract users should be scrutinized. Airdrops are effective marketing tools, they


3.1.1 Expanding beyond Ethereum


Initially, The Graph started with support for Ethereum, but soon its services expanded to a wider range of L1 blockchains, not just Ethereum. Currently, The Graph is able to index and query data from many top web3 networks such as Arbitrum, Polygon, Avalanche, Solana, Binance Smart Chain, etc., which represent the latest advances in current blockchain technology. In just three years, The Graph has expanded its service coverage to more than 50 different blockchains, an impressive expansion rate. As the number of supported blockchains increases, the query requests received by The Graph are also growing, and the usage rate has increased accordingly. This development trend paints a positive picture for the future of The Graph.


3.2 The Graph’s Business Model: Token Economics and Sunrise


To understand The Graph’s business model, it is important to understand how its token economics work. GRT tokens are the key medium of exchange between participants in the network, such as Indexers, Curators, Developers, and Delegators. In this economic system, Indexers, Curators, and Delegators are rewarded with GRT, while Developers need to pay GRT to use network services. The core of this model is that the more query fees developers pay, the more revenue the network generates. Before Sunrise, fees were relatively low due to centralized hosting, but with Sunrise, the fully decentralized model significantly increased developer fees and increased network revenue.


Sunrise represents a historic shift from centralized hosting services to a fully decentralized network for all subgraphs. As of this writing, over 6,000 subgraphs have been successfully migrated to the decentralized network through Sunrise , marking a solid step forward for The Graph on its path to decentralization.


Profitable Future with Sunrise


With Sunrise, The Graph is expected to become significantly more profitable. Profitability is trending in a positive direction, as data fees have surged 376% year-over-year over the past 30 days. The network previously generated almost no fee revenue under the managed service model. Now, with the network processing over a billion queries per month, the move to a fully decentralized network has significantly increased profitability for The Graph and driven up demand for GRT tokens. As the core currency within The Graph ecosystem, the growth in demand for GRT will have a profound positive impact on the entire ecosystem.


3.3 Initiatives to Enhance The Graph: Firehose and Substreams


The Graph is impressive because of its commitment to simultaneously decentralizing the network and continuously advancing the development of indexing technology to improve decentralization and performance. Two key technologies to improve performance are Firehose and Substreams.


3.3.1 Firehose


The Graph: From Indexing Protocol to AI Infrastructure image 7
Source: The Graph Documentation


Firehose is a technology developed for The Graph Network by StreamingFast, one of The Graph's core developers. This technology enables processing blockchain data with amazing efficiency and speed. Firehose retrieves data directly from specially equipped blockchain nodes, allowing real-time data access and processing while significantly reducing latency.


Firehose is written in the Go programming language and supports parallel computing, which contributes to its high performance. With Firehose, subgraphs can receive data more efficiently, enabling unprecedented data processing speeds. This capability improves The Graph’s overall performance, enabling faster and more efficient data delivery and analysis.


3.3.2 Substreams


The Graph: From Indexing Protocol to AI Infrastructure image 8

Source: The Graph Documentation


While Firehose focuses on performance for data storage and retrieval, Substreams focuses on data processing and emphasizes interoperability across different ecosystems. Substreams allow data to be fetched from multiple blockchains, processed using Rust functions, and then the processed data is sent to any destination.


The Graph actively leverages both technologies to make blockchain data indexing and querying significantly more efficient and faster. This strategy is designed to encourage more applications to use The Graph. Not content to rest on its first-mover advantage, The Graph is enhancing its services to solidify its position as a leading data infrastructure provider.


Looking Ahead: The Rise of The Graph


The blockchain market often prefers to chase projects that seem promising rather than those that provide truly necessary solutions. Many projects have received high valuations and expectations based solely on market hype, regardless of whether the problems they solve are truly urgent or whether their solutions are truly effective.


In contrast, The Graph has always focused on identifying and solving clear and fundamental problems. A useful way to evaluate the importance of a protocol is to consider what would happen if it suddenly disappeared. If The Graph ceased to exist today, the applications that rely on it for hundreds of thousands of queries per day would face major outages, causing great inconvenience to users. Many of us may not realize that we rely deeply on the services provided by The Graph. Therefore, it is important to have a deeper understanding of The Graph and its contributions, and continued attention to protocols like this will help the market focus on those "real problems that need to be solved" rather than just chasing "hype".


The Graph's vision is to evolve from a basic indexing protocol to a comprehensive decentralized data service protocol. As the potential for integration between AI and blockchain becomes increasingly apparent, The Graph is striving to become the key infrastructure that connects these two technologies. At the same time, The Graph is also transforming into a fully decentralized data processing protocol, which is not only critical to enhancing decentralization, but also highlights the growing value of the GRT token in the entire ecosystem.


Although The Graph network has been three years since its launch, this is just the beginning. The past three years have been a stage of preparation to become a preeminent data service. Now, The Graph is moving towards establishing its position as a fully decentralized data service infrastructure, and as the importance of on-chain data continues to grow, The Graph's development prospects are broad and highly anticipated.


「 Original source 」



欢迎加入律动 BlockBeats 官方社群:

Telegram 订阅群: https://t.me/theblockbeats

Telegram 交流群: https://t.me/BlockBeats_App

Twitter 官方账号: https://twitter.com/BlockBeatsAsia

0

Disclaimer: The content of this article solely reflects the author's opinion and does not represent the platform in any capacity. This article is not intended to serve as a reference for making investment decisions.

PoolX: Locked for new tokens.
APR up to 10%. Always on, always get airdrop.
Lock now!