Cryptocurrency

The Graph Protocol: Helping you navigate Ethereum and IPFS

grt image banner main

As the amount of transactions increases, the blockchain continues to expand its network to accommodate new and existing users. While this is good, it poses problems to developers who are searching for specific data they need from the network. Querying takes up a lot of time since one needs to scour each block to get the specific data.

Yaniv Tal, together with his team, experienced this difficulty, which then inspired them to create the Graph.

What is The Graph and how does it work?

The Graph is an open-source indexing and querying protocol that helps you retrieve data from blockchains. This allows you to find specific data characteristics including finality, chain reorganizations and uncle blocks that contribute to a blockchain network’s complexity.

In the Graph, there is what you call a subgraph manifest, which is a collection of subgraph descriptions containing information about smart contracts, blockchain events and the processes of event data mapping. These will all be recorded and stored inside the database of The Graph. 

What is the Graph CLI?

The Graph CLI is a code written in JavaScript that requires NPM (Node Package Manager) or Yarn (Yet Another Resource Negotiator) to use it. This is what you will need to store the subgraph manifest in the InterPlanetary File System (IPFS). Afterwards, this will allow the indexers to start arranging data for that subgraph.

Deployment of subgraph manifest flowchart

image

Retrieved from thegraph.com

Here is what the flow will look like once someone deploys a subgraph manifest and deal with Ethereum transactions:

  • The flow starts when decentralised applications (dApps) supply data to the Ethereum blockchain with smart contracts. 
  • These smart contracts will then release events while they process a transaction.
  • After that, Graph Node consistently searches the Ethereum network for new blocks. This protocol will check if a block contains data related to your subgraph.
  • Aside from that, Graph Node continues to search each block to find Ethereum events related to your subgraph. This system also uses the WASM module, which is a mapping handler that creates or updates any data the Graph Node stores.
  • When a decentralised application (dApp) searches the Graph Node for data, the protocol will use the GraphQL endpoint. This will serve as the link between the blockchain data and the application. Once it is done, the user will find their search results within the dApp they are using.

To sum it all up, users make use of GraphQL to search open application programming interfaces (API) called subgraphs. This is where the system will retrieve data that is stored and indexed in the network. 

What is GraphQL?

To further understand the process, you should know what GraphQL is for and its importance to the protocol. This is a query language for APIs and duration of providing results to all your queries with existing data. In a nutshell, GraphQL allows you to ask whatever you need and it will give you exactly that. 

Understanding the Graph Network

The Graph has a network or ecosystem that allows everything to function. It consists of four roles known as the consumer, indexer, curator and delegator. These contribute to the network and provide data to Web3, which is an important component for delivering decentralized applications. Once data is uploaded to these platforms, that is when consumers see what they are looking for.

Each role has responsibilities it needs to deliver. Know more about them below:

Consumer

Consumers or end-users are the ones who pay Indexers for queries. They do this by using a query engine that allows them to safely request data without personally doing the computing and storying work. This is also a platform of trade where Consumers and Indexers can discuss payments based on the former’s preferences.

Indexers

The Indexers are the node operators of The Graph and they thrive due to financial rewards. These people need to stake GRT (Graph Token) to participate in the market and sell their services. Moreover, the Indexers will receive an incentive that is proportional to the amount of work they have done in the network.

Curator

This role requires a person to deposit Graph Tokens in a curation market. They need to correctly predict which subgraph will be valuable in the network. In return, the Curators will be rewarded for their predictions.

Delegator

In the Graph network, some token holders are allowed to participate in the delegation. This is the process where a Delegator can loan their Graph Tokens to Indexers and receive a share of query fees and rewards in return. 

These roles keep The Graph network thriving, stable and secured as it goes on. 

What are Graph Tokens?

Graph Token (GRT) is the token of The Graph that sustains the network. It works on a proof of stake concept, which allows its holders to stake their tokens and receive more than their wagers. According to CoinMarketCap, 1 GRT is currently equivalent to 0.4927 USD.

Where to get Graph Tokens

If you are interested in owning Graph Tokens, continue reading this section to find out where you can get one.

  1. eToro
    One of the best platforms to get a hold of Graph Tokens is eToro. Investing in Graph Tokens is commission-free, which means that you do not have to shell out more money for extra fees. Additionally, this platform grants you free access to eTory Money crypto wallet where you can safely store your funds.
  2. Coinbase
    Another place where you can start investing in Graph Tokens or any other crypto is Coinbase. It has a beginner-friendly interface, allowing you to navigate the platform easily. Moreover, Coinbase promises you great security and a wide range of crypto to choose from.
  3. Binance
    Binance is the leading crypto exchange platform in the world and it’s the best place to buy Graph Tokens using your credit card. 
Cryptocurrency Market Capitalization
  • bitcoinBitcoin (BTC) $ 17,211.96 2.23%
  • ethereumEthereum (ETH) $ 1,280.02 3.72%
  • tetherTether (USDT) $ 1.00 0.03%
  • bnbBNB (BNB) $ 289.29 1.9%
  • usd-coinUSD Coin (USDC) $ 1.00 0.11%
  • binance-usdBinance USD (BUSD) $ 0.999996 0.11%
  • xrpXRP (XRP) $ 0.391774 1.96%
  • dogecoinDogecoin (DOGE) $ 0.098192 2.17%
  • cardanoCardano (ADA) $ 0.314725 1.89%
  • matic-networkPolygon (MATIC) $ 0.927452 4.38%

Expand your knowledge and invest in the cryptocurrency industry.