Graph Protocol: The Google of decentralized internet?

Graph Protocol: The Google of decentralized internet?

A sneak peek...

Have you ever wondered how google scans the internet and shows you the relevant results in just a fraction of a second, just like this? 👇

image.png

The fact that a search engine dives deep into the deep ocean of internet and brings out results for you so fast despite of the tremendous amount of data available has been made possible due to the indexing of information available on the web. But how? Let’s see!

What is exactly Indexing? 📝

Remember when we used to go through those thick books📚 to read about a specific topic or content? What would be the first thing you do in that case? Finding something relevant to it in the index🗒️ of the book, right? This not only narrowed our area of search from that number of chapters to one or two of them, but it also reduced the search time to a greater extent. Yes, that’s what most search engines do to achieve lightening fast speed for querying databases and producing results.

image.png

This becomes much easier in a centralized web eco-system due to data being stored on the central databases but this isn’t that easy for blockchains. Since blockchains keep the record of data stored in blocks as well as decentralized storage such as IPFS, it becomes a tremendously hard task to query a decentralized network and get the desired result. This is the reason why most decentralized applications and blockchain explorers have to rely on their own indexing database to quickly provide the information. However, this compromises the principle of decentralization.

The Graph

Graph aims to become one of the core infrastructure projects⚒️ necessary for building decentralized applications. It actually aims to decentralize the query and API layer of the decentralized web. It allows us to query different networks like Ethereum and IPFS by using a query language called GraphQL. The queriable data is organized into a sub-graph and indexed by various nodes supporting the Graph eco-system (we’ll talk about that in a bit). A decentralized application can make use of one or many sub-graphs, Also, a subgraph can itself contain multiple other sub-graphs so as to make the querying on blockchain much more efficient and decentralized in a true sense.

image.png

Architecture of Graph

Graph ecosystem has majorly four components attached to it supporting indexing on the decentralized web. They are namely:

  1. INDEXERS
  2. CURATORS
  3. DELEGATORS
  4. FISHERMAN & ARBITRATORS

1. Indexers

Indexers are the node operators of Graph protocol. One can join it by staking GRT tokens and running a Graph node. They earn rewards by indexing sub-graphs and fees for serving queries on those sub-graphs. Indexers can also set prices for the queries they make and to keep prices in check, each indexer competes with other indexers, thus creating a healthy competition for better service at a reasonable fee. The consumers of the Graph can be either the end users, other web services who wish to integrate Graph, or any middleware which queries the Graph sub-indexes for any particular reason.

2. Curators

Curators play a major role in keeping the Graph functioning. They use their GRT tokens to indicate or signal which sub-graphs are worth indexing. Curators can be either developers who want to make sure that their sub-graph is indexed or end users who find a particular sub-graph valuable, useful and worth indexing. The curators are incentivized financially by rewards which are proportional to how useful others find that sub-graph to be or simple, based on its popularity.

3. Delegators

Delegators stake their GRT Tokens on behalf of the indexers. They do it to earn a portion of their fees and reward. Delegators can choose which indexers they wanna delegate to based on their own judgments and calculations based on various parameters. For each delegation, a 0.5% of delegation tax is charged.

4. Fisherman and Arbitrators

Fishermen are responsible for the verification of responses of the nodes indexing sub-graphs while Arbitrators keep a check on malicious activities that can happen on the network. Arbitrators can even remove an indexer if they are found to be malicious.

Conclusion

Here is a quick review of what we have discussed so far 🤩

The Graph is a core infrastructure project which aims to solve the problem of decentralized indexing in the modern web ecosystem. To achieve this, they aim to decentralize the querying and API layer of the web. The queriable data on the Graph is stored in the form of sub-graphs which can be used by an application. It is notable that one application can use a single sub-graph or many of them and a single sub-graph can consist of multiple sub-graphs. The sub-graphs are indexed by indexers who do that by staking their GRT tokens which is the native token of the Graph eco-system. The Curators are responsible for signaling which sub-graphs are worth indexing and are incentivized for the same. The Delegators stake their money on behalf of the indexers to earn a portion of their rewards and fees. Fisherman and Arbitrator nodes are useful in the verification of the query results as well as in keeping malicious activities in check.

P.S.: The images used above are taken from google images and don't belong to me