The Graph

0 24
Avatar for NinjaWingnut
2 years ago

Today’s article is going to explore The Graph, which provides an indexing protocol for blockchains. It provides a way to search data that is stored in the ledger quickly, without having to rely on a centralized solution like Etherscan.

For the usual disclosure, I am not a financial advisor, I don’t even work in finance at all. My day job is as a telecommunications software engineer. Treat everything you read here as some educational resources and not financial advice.

What Is Indexing

Before we can get into exactly what The Graph does, it’s important to first understand the concept of indexing. When you have a large database of information, such as a blockchain’s ledger, it can be time consuming to search through the data in order to find what you are looking for. An index gives you a much easier list to search through, that will provide you a pointer back towards the data that you are actually looking for.

For an example, imaging you are looking for a specific Ethereum (ETH) transaction, but have no idea what block it was actually mined in. Without some kind of index, you would need to go through the entire ledger from the start, and check every block until you found the one you are looking for. With an index that had all the transaction hashes paired up with what block they were mined in, in order of transaction hash, you can easily find yours in that list and then you have the block to go look for.

What Does The Graph Do

The Graph provides indexing services in a decentralized way, unlike the traditional blockchain explorers such as BscScan. The traditional sites, also called ingestion services, as they ingest the data from the ledger to store in the database, are a centralized point. This means you have to trust that the data you are getting from them is good. This has made it difficult to create truly Decentralized Applications (DApps) that rely on being able to get indexed data about blockchain ledgers.

The Graph has created it’s own query language, GraphQL, which allows you to specify what fields you are interested in having indexed, and what search criteria you want applied. This is stored in a sub-graph. A Decentralized Application (DApp) can make use of one, or many of these. Sub-graphs can also be nested inside of each other, to provide a nice consolidated view of whatever data is trying to be retrieved.

For example, the Uniswap sub-graph contains data such as the total trading volume across the entire protocol since it launched, or per trading pair, and data about transactions. This means that by utilizing that sub-graph, your application would have access to all of that data in an easy to use format.

The Graph Network

The Graph network is made up of a number of different parts, which work together to make the system work.

The first is the Indexers. These are the people providing the indexing services, as well as running the nodes. They stake The Graph (GRT) tokens in order to become Indexers. They are responsible for providing the indexing that the sub-graphs are looking to have indexed, and earn rewards for doing so.

The Indexers also earn fees when the sub-graph is used, which they can set themselves. This puts them in competition with the other Indexers to provide good indexes, serve popular sub-graphs, as well as helps control the prices.

The Consumers are the users of the network, be them end users or a Decentralized Application (DApp). They will query the sub-graphs from the Indexers, and pay the fees for the services.

Curators use their The Graph (GRT) tokens to signal which sub-graphs they believe are worth being indexed. These can be either just end users who believe the sub-graph is worth indexing, or developers that want to help ensure theirs is being indexed. The Curators are incentivized to put their support into good sub-graphs, as they earn rewards which are based upon how popular the sub-graph becomes.

Delegators on the network stake their The Graph (GRT) tokens with the Indexers, and they will earn a portion of the rewards and fees collected by them. They get a portion of the benefit of the Indexers, while not having to operate their own node.

The final participants are the Fishermen and Arbitrators, who are responsible to resolve disputes when situations arise such as when an Indexer provides incorrect data.

Putting It Together

So to tie all these pieces together, let’s take a look at how a new Decentralized Application (DApp) might get their data being indexed by The Graph. They would create themselves a new sub-graph and set it up for whatever data they want to make available.

If this was a project that was being watched and a lot of people were expecting it to do well, at this point a Curator might step in and use their tokens to signal that the sub-graph is going to be highly used, because they would stand to make gains if it does. In the case of a small project, the developers may choose to get some The Graph (GRT) tokens themselves to become Curators and signal it themselves.

Once the Indexers have the signal and decide to provide the indexing services, they would begin the process of building out their databases. Once that is complete the sub-graph is ready to be used.

Consumers would then be able to use the Query Engine, which is responsible for choosing the Indexer to use based on reliability, prices, and other factors, and then be able to get access to the data that the sub-graph provides, paying the fee to the Indexer for the service.

Conclusions

While the networks that are currently supported by The Graph are a little limited, they are actually adding more as time goes on, and they provide a very valuable service for those that want to build a truly Decentralized Application (DApp) that does not rely on a centralized indexing solution, while also not having to run their own ingestion service.

I keep seeing The Graph referred to as “The Google Of Blockchains”, and I have to say I find it a pretty fitting title. It’s definitely a technology with a lot of potential, as it filled a gap, and by all accounts does it very well.

Socials And Other Links

Find me on social media on TwitterFacebookInstagramTelegram and noise.cash.

If you enjoyed this content, you can check me out every weekday. My posts start at my website, but you can also find them cross posted at Publish0xLeoFinancialHive, and read.cash.

I also post a weekly price update video every Saturday over on my YouTube channel, where I will be discussing the weekly price action for some of the major cryptos. You can also sign up for my newsletter which I send out every Friday with news and whatnot from the crypto space, delivered right to your inbox!

You can also find links to resources such as research and news sites over at this link.

Want some more content right now? Check out some of my previous posts:

Thorchain
Ethereum 2.0
Impermanent Loss

A few referral links, in case you are interested in the service, and it also helps me out.

Binance – large centralized exchange – referral link saves you 10% on trading fees
Coinbase – basic crypto exchange – referral link gets you bonus crypto on first deposit
Cointiply – very good crypto faucet and earning site – no bonus for you on this referral unfortunately

Originally Posted On My Website: https://ninjawingnut.xyz/2021/07/12/the-graph/

2
$ 1.06
$ 1.06 from @TheRandomRewarder
Avatar for NinjaWingnut
2 years ago

Comments