Why developers are in love with data indexing tools like SubQuery and The Graph
Within the blockchain ecosystem, The Graph and Subquery have become the two standard indexing protocols that are used to build fully decentralized applications.
Essentially, indexing is the main concept behind both of these protocols. Indexes are used to reduce search time by providing quick access to relevant rows in a table. In the blockchain, indexing speeds up the process of searching through the connected blocks for a particular transaction. As you can imagine, virtually every blockchain is required to process or query data at some point, so this is very useful.
Prior to these indexing protocols, engineering teams would be required to develop, operate, and maintain proprietary indexing servers. This is a complex task, and it takes a lot of time. More notably, it requires significant engineering resources that could be better utilized elsewhere and requires significant investment into hardware resources. But perhaps the biggest problem of all is that this method breaks the security requirements of decentralization.
To give more context, here’s a quick rundown of some of the key differences between The Graph and SubQuery, and an explanation of their benefits.
What is SubQuery, and how does it work?
SubQuery is a decentralized data aggregation, indexing & querying layer between Layer-1 blockchains and decentralized applications (DApps). Essentially, it does a very similar thing as The Graph – the key difference is that SubQuery does it on Polkadot.
Polkadot is an open-source protocol that was founded by the Web3 Foundation. Over the past year, it has drawn a significant amount of attention. Created by one of the original co-founders of Ethereum and creator of the Solidity programming language, Dr. Gavin Wood, Polkadot has even been described in Forbes as the ‘Ethereum Killer’. Because of how Polkadot’s architecture works, SubQuery will be able to support current and future chains with ease. Currently, SubQuery is working together with popular projects including smart-contract platforms, Moonbeam, and Acala.
As it stands, it can take days to query chain data from Polkadot, and this is a huge bottleneck for developers Subquery aims to solve this problem by reducing the complexity and speeding up query speeds for chain data. As a result of this, developers will be able to focus their efforts on the core use-cases of their project, without pouring all of their time into building a very complex custom backend for data processing. This greatly reduces the barrier to entry for development communities and allows them to focus on other important tasks.
SubQuery was created by the team behind OnFinality, which provides infrastructure and developer tools designed to save developers time. As a result, they are already experts in scaling and managing infrastructure hosting. Compared to The Graph, SubQuery is still in its early stages. However, it has moved very quickly since it started. In early 2021, it raised a Seed round of $1.8 million USD. And just a few months later in mid-2021, it raised a Series A round of $9 million USD. Back in February, it also delivered an open-source SDK following a Web3 foundation grant.
What is The Graph, and how does it work?
The Graph is currently the most well-known protocol, and this is mostly because it was one of the first pieces of indexing and querying software to become available.
Built on Ethereum, it indexes data from the main blockchain for developers who want to utilize the data to build decentralized applications (dApps). After analyzing blockchain data, The Graph stores it in indices known as ‘Subgraphs’. This means that applications will receive an immediate response after sending a query to its protocol.
‘Indexers’ and ‘delegators’ are users of The Graph that provide services to the network, such as helping to process data and passing it on to applications and end-users. ‘Curators’ are subgraph developers who decide which subgraphs are of high enough quality to be indexed by The Graph by attaching tokens, known as GRT, to subgraphs that they want to support. In exchange for their work, all of these users are granted a portion of the network fees.
The Graph is currently being used for a number of large projects, including Uniswap, Synthetix, and Decentraland.
A final overview of blockchain indexing protocols
Given the differences between these protocols, there isn’t necessarily a direct winner here. Both have lots of potential, and will likely continue to grow and flourish over the next few years.
Given that The Graph has been around for 2.5 years while SubQuery has been around for around six months, The Graph definitely has the first-mover advantage. But there is no doubt that SubQuery has achieved a lot throughout its short time on the market. It is already tight in deep working relationships with existing projects such as Acala and Moonbeam, which gives it a moat-advantage on Polkadot. SubQuery also recently started offering EVM capabilities, making it the only indexing protocol to offer services on both Ethereum and Polkadot.
As Polkadot pushes on with its parachain slot auctions, there are likely to be far more use cases of SubQuery in particular in the near future. To stay up to date with their most recent news, you can follow SubQuery on Twitter or subscribe to their