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?
Deployment of subgraph manifest flowchart
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:
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.
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.
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.
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.
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.
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.
Binance is the leading crypto exchange platform in the world and it’s the best place to buy Graph Tokens using your credit card.
Bitcoin (BTC) $ 25,578.00 3.45%
Ethereum (ETH) $ 1,754.44 4.62%
Tether (USDT) $ 1.00 0.37%
BNB (BNB) $ 240.07 7.73%
USD Coin (USDC) $ 1.00 0.18%
XRP (XRP) $ 0.483429 8.18%
Lido Staked Ether (STETH) $ 1,753.31 4.6%
Cardano (ADA) $ 0.245101 22.88%
Dogecoin (DOGE) $ 0.060908 10.25%
TRON (TRX) $ 0.065819 15.06%
Expand your knowledge and invest in the cryptocurrency industry.