The Graph is a decentralized data indexing and querying protocol, which makes it possible for dapps to query data from the Ethereum (or EVM compatible) blockchain that is difficult to query directly.
The Internet is perhaps the best thing to have blessed our planet over the last century. The global connectivity that the web has provided, creating a whole new ecosystem surrounding this technology has been largely unparalleled. The Internet may even be the most defining invention, shaping the world as we know it today. In the current day and age, the different ways in which people consume, store, and manage information directly on the Internet have a direct impact on not only the individuals involved but the society as a whole. But one major concern is the sheer power that some central entities possess over a significant chunk of data posted on the Internet, creating a pseudo monopoly. The freedom of choice has slowly become a myth, as more and more people are forced to accept increasingly invasive policies.
With the increasing popularity of the Web3 protocol stack, however, things are set to change. While in 2021, we are uncertain of what the Web3 protocol stack will consist of 10, 15 years from now, but one thing is certain, blockchains and smart contracts will play a major role. The community is of the consensus that Ethereum has paved the way to something much bigger, and strongly believe that the future would comprise of some iteration or the other of cryptocurrencies coupled with IPFS and The Graph to create a truly decentralized Internet.
Over the last couple of years, we have witnessed the rise and the rise of Ethereum-based decentralized applications, which has ushered in a new era of decentralized applications, popularly known as dapps within the crypto community. These dapps put users in control of their data and can be built on pluggable datasets, enabling users to freely switch between apps.
Contents
The Catch
In 2017, blockchain developers soon realized that coding smart contracts and creating decentralized applications come with their own share of problems. While the data is indeed decentralized, blockchains were simply not scalable enough to reasonably expect developers to invest resources into developing successful dapps. Solutions like novel consensus algorithms, sharding, layer 2 blockchains, sidechains, and similar solutions have come up to tackle the scalability issue.
Another problem that Yaniv Tal, Brandon Ramirez, Jannis Pohlmann and their colleagues at The Graph realized early in 2017, was the fact that data on blockchains are rarely stored in a convenient manner. dapps tended to be significantly slower, as these apps had to “filter, sort, paginate, group and join data” before it can be displayed to the end-user.
Different teams tried to experiment by building centralized indexing servers, where the data is pulled from Ethereum network, stored in a centralized database, and exposed to the dapps using a centralized API – little did they know, this would only be seen as an intermediate solution. Clearly, centralization is against the spirit of Web3, as the same issue of trust would continue to exist as with Web2 (the current, traditional version of the Internet).
In an effort to solve this very issue, Yaniv, Jannis Pohlmann, and Brandon Ramirez came up with The Graph in 2017. The Graph is a decentralized indexing and query protocol, which enables dapps to get data off blockchains and storage networks. Developers can utilize The Graph to query a P2P network of indexing nodes making use of GraphQL. With this, they no longer have to worry about building workarounds (or settling for a poor user experience), but rather focus on building the products’ core functionality.
What is The Graph?
The Graph is a decentralized data indexing and querying protocol, which makes it possible for dapps to query data from the Ethereum (or EVM compatible) blockchain that is difficult to query directly. Dapps use the native query language, GraphQL to query open APIs (named subgraphs) to retrieve the data that is indexed on the network. This enables developers to build serverless applications, running entirely on public infrastructure. While this sounds complicated, consider this example of CryptoKitties that their team has used to best describe their services.
Typically, without making use of The Graph, a dapp would take hours (or even days) to fetch answers to a simple query like “who are the owners of the CryptoKitties born between January and February 2020”. This is because the application has to process all the birth events in the CryptoKitties decentralized application aka the smart contracts running the game, and consequently process ownerOf method for each and every CryptoKitty that is born.
The Graph solves this issue with the help of a hosted service that indexes the blockchain data, (acts as a decentralized data hub, which makes the data ready to use for the applications, as and when required). The Graph’s decentralized network launched in December 2020 and the product launch allowing for dapps to permissonleslly migrate from the hosted service to the decentralized Network launched in July 2021, in a couple short weeks, over 120 dapps have migrated to Network. is backed by the open-source implementation of The Graph node.
Technical Architecture
The Graph learns what and how to index Ethereum data based on the index descriptions, known as the subgraph manifest. This manifest tells the subgraph what smart contracts are of interest, what events should be closely monitored, and how to store the data in The Graph database. Once developers have written subgraph manifests, they can utilize Graph CLI to tell the service to begin indexing data for that subgraph. Dealing with Ethereum Transactions, here’s how the data flows:
- A dapp adds data to the Ethereum blockchains through smart contracts.
- These smart contracts give out one or more events during the course of the transactions
- The Graph Node scans Ethereum for new blocks and data that is defined in the subgraph manifest and runs the mapping handle provided by the developers.
- The dapp queries the Graph node for the required data using the GraphQL endpoint. The Graph Node translates the GraphQL queries, fetches the data, and transmits the data to the dapp, to display this data. The user makes use of this data to issue new transactions on the Ethereum blockchain, thus creating a cycle.
The Graph Network consists of Indexers, Curators, and Delegators that help run the network, and serve up data to the different dapps.
Live Products on The Graph Network
Since the first prototype in 2017, The Graph has made massive steps forward in terms of adoption. In line with the increasing popularity of DeFi over 2020 and 2021, The Graph hit a massive 4 billion monthly queries by August 2020 and have reached 26 billion queries until June 2021.
Over 300 decentralized applications are making use of The Graph’s capabilities to index data and run on completely public infrastructure including Uniswap, Synthetic, Decentraland, and Aragon.
The Graph is supporting all major EVM compatible test and main-net chains including
1. Ethereum
2. Kovan
3. Rinkeby
4. Ropsten
5. Goerli
6. xDAI
7. POA-Core
8. POA-Sokol
9. Binance Smart Chain
10. Binance Smart Chain Testnet (Chapel)
11. Fantom
12. Fuse
13. Clover
14. Celo
15. Celo’s Testnet: Alfajores
16. Avalanche
17. Avalanche’s testnet: Fuji
18. Polygon (formally Matic)
19. Mumbai (Matic’s testnet)
20. Moonbeam
21. Arbitrum
22. Arbitrum Testnet
The Graph Tokenomics
The Graph network utilizes GRT – an ERC20 token on the Ethereum blockchain to ensure the economic security of the network, and the integrity of the data being queried. The token’s initial supply was about 10 billion, with approximately 3% annual new supply and a portion of the query fees and withdrawal taxes burnt to keep the token deflationary. At any point in time, the supply can be calculated as
10 billion + new issues – Burnt tokens (which is currently at 10.15 billion).
Indexers, Curators, and Delegators can earn income from The Graph network directly proportional to the amount of work they perform, and the amount of GRT tokens staked. Anyone can simply hop on to the explorer and use the data or contribute to the network in various possible ways.
Future Roadmap
The team is currently working on a transition to passing off governance to an on-chain decentralized governance protocol. In the future, they are planning to add the following features:
- Subgraph Composition
- Over 20 EVM compatible chains are supported on The Graph now and will continue to support more.
- Optimistic Rollup/Truebit-style Verification for Proofs Of Indexing
- Verifiable Queries
- Layer 2 for Protocol Economics
- GraphQL Mutations
- GraphQL API V2
- Protocol Modelling and Simulation
- Automated Monetary Policy
Team and Investors
The Graph is founded by Yaniv Tal, Jannis Pohlmann, and Brandon Ramirez. The trio had previously worked together in a crypto startup, when they realized that Ethereum had no real tools to index data in a decentralized manner, creating the idea for The Graph in 2017.
The Graph is backed by popular names in the Crypto venture industry such as Framework, ParaFi Capital, DTC Capital, Multicoin, Coinbase Ventures, Digital Currency Group, CoinFund, Collider, Lemniscap, Reciprocal Compound, and 122 west among others.
What We Think
The Graph is definitely one of the more promising projects in the dapps space. As the crypto economy is radically working towards reimagining the future of the world, and transparency and decentralization become the center of attention, The Graph would have played a major role in helping that vision be a reality.
The Graph is a wonderful tool for innovative developers to build the Internet of the future. You can follow the project using the following links
Disclaimer: Coin Crunch partners with multiple projects for consulting and marketing initiatives. Our editorial however remains uninfluenced by our partners unless specifically mentioned. For more details about our policies, please check out this disclaimer.
Read More: What is Hedera Hashgraph?
Be First to Comment