What type of data should be indexed on The Graph
The Graph is an algorithm for indexing data in decentralized networks that helps to identify unique events, patterns and provide quick feedback to users. Today, gathering information in decentralized networks takes too long time, and The Graph will help users find answers in real-time.
The algorithm is based on the Ethereum blockchain. Current solutions (dApps) for Ethereum consist of a Front-end and an Ethereum node. Actions in the Ethereum system generate events that are tracked by the Front-End part to provide regular updates in the user interface. The problem is the limited number of queries to the system that show only certain data.
Basic information about events is not enough for the full-fledged functioning of a decentralized network. The Graph aims to provide access to the full amount of data on the web for each user in real-time. This is an important issue for decentralized networks and developers are looking for solutions. Most of the current solutions contain centralized storage systems, but this is not our way. The world is dreaming of a decentralized Web 3.0, and this fact must be taken into account when developing solutions.
The Graph develops its own protocol. Graph Nodes process events on the network and store them as indexable data. Then the user can request data and receive it quickly using dApps. Public data is requested through a service that acts as a public utility. The role of centralized structures is declining.
Index sets will be collected centrally in the first phase, but in the long term, the project will move to a fully decentralized concept.
It works like this:
- The user creates a subgraph and the service starts data indexing for it;
- dApp adds data to the network through a smart contract transaction;
- Smart contract generates events;
- Graph Node reveals new blocks and data for the user’s subgraph;
- Graph Node finds events in blocks for the user’s subgraph and launches the required mappings, transfers data to the storage as requests;
- dApp takes the indexed data from the blockchain and displays it in the user interface.
As a result, the user receives not only the data that can be requested directly. This is data about specific transactions, events, and so on. The Graph provides access to complex arrays and samples of data to profile user activity, identify specific sequences of actions, perform analytics, and so on.