Three minutes to understand SubQuery: Polkadot Ecological Decentralized Data Indexing Tool

Three minutes to understand SubQuery: Polkadot Ecological Decentralized Data Indexing Tool

Loading

SubQuery is a tool for transforming and querying Web 3.0 world data. It aims to help developers and users find and use data faster and more reliably, making decentralized data more “easy to use”.

Written by: Groot

Whether it is the traditional Internet that has experienced decades of precipitation and accumulation, or the blockchain that has grown rapidly in the past decade, the importance of data is self-evident. In the face of massive amounts of data, how to efficiently and accurately locate targets and obtain useful information has become a “secret” that developers and even almost everyone is exploring today.

This problem is particularly tricky in the blockchain industry that believes in decentralization. Because data is stored in decentralized nodes, and developers often need to download a complete ledger corresponding to the blockchain network, starting from the first one of the entire chain Blocks are searched sequentially, which is a long and inefficient search process. This has created a “big trouble” for blockchain developers, and it has also made the user experience of DApps unsatisfactory.

And what the Web3.0 infrastructure SubQuery that this article will introduce is to make decentralized data indexing more efficient and make data easier to use.

Three minutes to understand SubQuery: Polkadot Ecological Decentralized Data Indexing Tool

What is SubQuery?

SubQuery is a tool for transforming and querying Web3.0 world data. The initial purpose of the project was to help Polkadot and Substrate projects to find and use data faster and more reliably, and to make decentralized data more “easy to use” “.

A healthy decentralized network requires the cooperation of multiple decentralized data providers to improve flexibility, speed, and stable network performance. SubQuery will provide an open source SDK, and will provide instructions on how to allow any indexer to explore and collect data on the blockchain, and how to display these data to users. The SubQuery network emphasizes simplicity and high adaptability, and will make it possible for all developers who are willing to participate in network construction to easily participate in the network.

Simply put, SubQuery will transform and organize data from Polkadot and Substrate ecological projects, and then provide these data to developers for developers to use in wallets, block explorers, and various types of DApps.

The operating mechanism of SubQuery

Participants in the SubQuery network are divided into three categories, namely “consumers”, “indexers” and “principals”. These three types of participants drive the operation of the entire network.

Among them, consumers will issue instructions to SubQuery and query specific data through the network. This query action requires payment of a certain amount of SQT tokens. These fees will become a source of incentives for indexers and principals. Indexers will add SubQuery projects to their own infrastructure, run nodes and query services to index data and answer GraphQL requirements. The principals need to be motivated by supporting their favorite indexers.

In general, the indexer is the foundation of the entire SubQuery network, and needs to complete a series of actions to ensure the normal operation of the network, such as managing hardware, operating infrastructure, monitoring resources, and performing data query tasks.

These actions require time and money costs, but once the indexer has built the infrastructure, consumers can request specific data from the SubQuery network and pay a predetermined amount of SubQuery tokens SQT. The payments made by consumers will be distributed by introducing the Cobb-Douglas production function to encourage indexers to work stably for a long time. This money enters a project income pool. At the end of the pledge period (28 days), the algorithm will split the project income pool and distribute it to indexers.

The delegator can choose to delegate the SQT to the indexer, so that a part of the query fee obtained by the corresponding indexer can be obtained as a reward, and this share ratio is set by each indexer. The query fee income sharing rate issued by the indexer is locked in every 28-day pledge period. If you want to reduce the sharing rate, it must take effect after the entire 28-day pledge period ends. The principal can cancel the commissioned amount at any time, but again, the reward can only be obtained after the entire pledge period is over.

For indexers who maintain the normal operation of the network, the number of requests answered and the amount of the pledge will affect the final income level, which will also trigger healthy competition between indexers. A rational indexer will maintain a high level of SQT pledge to obtain more income. Therefore, even if the network does not require a pledge amount, the indexer will still actively self-manage in order to maximize profit.

Three minutes to understand SubQuery: Polkadot Ecological Decentralized Data Indexing Tool

In order to encourage indexers to index and support the new SubQuery project, the network also provides consumers with a market mechanism called “Orders” to signal to the indexers of the new SubQuery project to ensure revenue. Consumers can broadcast the contract on the chain at the set price and requested quantity, and the indexer can view this content and choose to execute the contract. Orders can also be placed on existing SubQuery projects to attract more indexers to improve competition and lower prices.

At the end of June, SubQuery also officially launched SubQuery’s dictionary indexing function, which can increase the indexing performance of SubQuery items by 10 times in some scenarios. The SubQuery project pre-indexes the position of all events in the chain to achieve direct skipping of the block where the non-target event is located, which can effectively reduce the time previously spent on sequentially searching for each block.

Team and funding partners

SubQuery was created by the team behind Polkadot’s infrastructure service OnFinality, with Ruitao Su, co-founder of Acala serving as the consultant for the project.

It has received multiple rounds of funding including Polkadot & Kusama Treasuries, Web3 Foundation Grant, Substrate Builder Program, Berkeley Blockchain Xcelerator and Web3.0 Bootcamp (Shanghai). More than 40 projects have started to use SubQuery for management.

Development roadmap

As of May 2021, SubQuery has realized the open source of the SubQuery CLI indexer/query service on GitHub, and has supported GitHub account registration and full automation and hosting services for the SubQuery project.

In the second half of this year, SubQuery will gradually distribute services to the SubQuery network and complete the casting and distribution of the governance token SQT. In the future, the community will also participate in the future roadmap, and the ecosystem and tokens will be extended to other Substrate chains.

Disclaimer: As a blockchain information platform, the articles published on this site only represent the author’s personal views, and have nothing to do with the position of ChainNews. The information, opinions, etc. in the article are for reference only, and are not intended as or regarded as actual investment advice.

Adblock test (Why?)