Topics Blockchain

Subsquid Network (SQD): Transforming Blockchain Data Access

Advanced
Blockchain
Explainers
Altcoins
27 de mai de 2024

Since 2018, The Graph (GRT) has been the go-to tool for blockchain analysts and developers to access, index and query historical data on Ethereum (ETH) and several other Ethereum virtual machine (EVM)-compatible chains. It's even been dubbed "the Google of blockchains" to signify its prominent role in on-chain data analytics. However, The Graph has relatively limited coverage outside of EVM-compatible chains. Additionally, most of its key architectural elements, such as the query engine and database, are kept under the same monolithic module, limiting the protocol's applicability to some specific use cases.

Subsquid Network is an emerging alternative to The Graph. It uses a much more flexible modular approach that lets you index on-chain data across various blockchain networks. Subsquid also boasts innovative features like a decentralized data lake, a cloud-based data querying solution and a Typescript-based query development framework — Squid SDK. 

Key Takeaways:

  • Subsquid Network (SQD) is an innovative decentralized data lake and query engine that facilitates the access and retrieval of blockchain data held on more than a hundred Layer 1 and Layer 2 platforms.

  • Subsquid has several advantages over The Graph’s older protocol for on-chain data query, including a wider coverage network and access via the cloud.

  • All data processing and storage capacity on Subsquid is decentralized, using special worker nodes.

2401-T16454_Skinny_Banner_for_Blog_and_Learn_Row_53_728x90.png

What Is Subsquid?

Subsquid Network(SQD) is a decentralized data query engine designed to let users efficiently access, retrieve and analyze on-chain data from over 100 Layer 1 and Layer 2 networks. It allows developers, analysts and other interested users to index data from blockchains within the two largest ecosystems in the industry — EVM-compatible networks and Substrate ecosystem chains. The former includes blockchains that use processing engines interoperable with Ethereum, while the latter is made up of platforms compatible with Polkadot (DOT). 

Subsquid currently runs as a permissionless network in testnet mode on Arbitrum (ARB). In addition, it has a private (though openly accessible) version that acts as a stand-in for the permissionless network, which is still maturing and being prepared for the future mainnet launch. Although this stand-in Subsquid version is run on a private cluster, it operates in an open, free-to-access mode.

Typical blockchain data accessible via Subsquid Network includes raw event logs, transaction data, execution traces for some networks and so-called state diffs — changes or updates to the blockchain's data after a new transaction is processed.

How Does Subsquid Network Work?

Subsquid Network uses a decentralized approach to data querying, storage and provision. All of the platform's modules — including the critical data querying and storage modules — are decentralized and use special worker nodes, who provide their computers' resources to help process and store data in exchange for rewards in the platform's native crypto token, SQD.

Subsquid has several main actors that power the platform's functionality, including Data Providers, Worker Nodes, Log Collectors, Schedulers, Reward Managers and Data Consumers.

Data Providers

Data providers are the actual Layer 1 and Layer 2 chains from which Subsquid sources on-chain data. Currently, the project's focus is with on-chain sources only. However, access to off-chain sources may also be integrated in the future, which could lead to a host of new solutions using on-chain data enriched with additional off-chain sources. 

As of mid-May 2024, Subsquid claims the ability to access and query data on over 100 blockchain platforms. Besides the currently supported EVM and Substrate ecosystems, the project aims to integrate Solana (SOL)- and Cosmos (ATOM)-based chains as well.

Worker Nodes

Workers are peer-to-peer nodes that provide computing and storage resources to power Subsquid’s querying and distributed storage capabilities. Any individual or organization willing to provide their resources in exchange for SQD rewards can apply to join the network as a worker node by staking 100,000 SQD tokens.

Log Collectors

These nodes collect data processing logs from worker nodes and store them in a distributed way on the IPFS. The logs are stored for six months, and can be used by other network participants in case they need access to specific historical data that’s been previously processed by workers.

Scheduler

This network actor is critical to the overall data processing on Subsquid’s platform. The scheduler distributes data sourced from blockchains among worker nodes to ensure the most efficient processing and capacity allocation. The scheduler listens to real-time updates from data providers and worker nodes to determine the optimal scheduling of data allocation.

Reward Manager

The reward manager calculates the crypto rewards to which each worker node is entitled. Calculation criteria include several variables, the most notable of which are the worker node's overall data processing activity and the amount of SQD staked.

Data Consumers

These are the entities who would like to access Subsquid's data querying services. Each data consumer connects to the platform via a special gateway tied to a network address. A critical factor for most data consumers is the bandwidth allocated to their gateway, as it determines the efficiency and amount of blockchain data they can source. The bandwidth for a gateway is determined by the number of SQD tokens locked by the user: the more SQD they lock, the more bandwidth they’re allocated.

Subsquid Key Features

Subsquid Cloud

The Subsquid ecosystem includes a cloud-based version, Subsquid Cloud. It allows developers to deploy their indexers via the multichain indexing cloud, significantly expanding the availability of the platform's services. Thanks to Subsquid Cloud, web-based apps operating outside of the blockchain environment can gain cost-efficient access to on-chain data.

Decentralized Data Lake

Data sourced from blockchains via Subsquid Network is stored in a decentralized data lake — a term the project uses to describe the distributed storage of its data over the many worker nodes on the platform. This data is stored in a decentralized way and served when requested by data queries for use cases such as analytics, historical indexing and blockchain explorers.

The more worker nodes there are on the network, the more efficiently data from the decentralized lake can be retrieved. That's because these nodes provide not only storage capacity, but also computing power, which makes access to the lake more efficient as the network expands.

Squid SDK

The Subsquid platform provides a development tool kit — Squid SDK — to let developers create indexers that extract, transform, load and query blockchain data in real time. Squid SDK represents a set of libraries in Typescript — a programming language that builds on JavaScript by adding static types, making it easier to catch errors and build large applications. Squid SDK's modular framework enables developers to customize their indexing projects with plug-ins and data targets.

The Subsquid querying engine is also capable of multichain access. Developers can deploy indexers that source data from multiple networks and store the results in a repository, where this data can be combined for further use in analytics or within decentralized apps (DApps).

Subsquid vs. The Graph

Subsquid Network is often compared to an older and more established on-chain data querying protocol: The Graph. Since 2018, The Graph has been extremely popular among developers and analysts for its ability to effectively source data from numerous popular blockchains, including Ethereum and other major EVM-compatible chains.

However, Subsquid has several features and technical properties that provide important advantages over The Graph. 

First of all, The Graph keeps all the main components of its protocol within the same monolithic module. In order to leverage it, users have to use the entire stack provided by the platform, which limits flexibility concerning various data applications. In contrast, Subsquid features a modular design in which the main components, such as the database, query engine and client-side data rendering tools, are separate from each other. This provides a much higher degree of flexibility and better customization potential. For example, a DApp can use Subsquid's query engine but customize the client-side data presentation tool.

Secondly, real-time indexing for unfinalized blocks is available in Subsquid but not with The Graph. This is a crucial difference in powering applications that require fast, efficient real-time access to data. 

Thirdly, unlike The Graph, the Subsquid Cloud solution helps users outside the blockchain environment access Subsquid’s platform. With Subsquid Cloud, you can use fiat currency payments to access the platform's services online. In contrast, The Graph requires crypto payments in order to utilize its protocol. This limits platform adoption among users still unfamiliar with the web3 environment, as well as the applicability of The Graph in Web 2.0 applications.

Finally, Subsquid has the advantage over The Graph as measured by the sheer number of blockchain platforms it covers. Subsquid claims coverage across over 100 networks, while The Graph can source data from fewer than 60 chains. 

What Is the Subsquid Crypto Token (SQD)?

SQD is Subsquid's native cryptocurrency. It's an ERC-20 token issued on Ethereum and bridged to the Arbitrum One L2 network. The SQD token's main functions on Subsquid include:

  • Governance:Token holders can participate in on-platform governance processes by voting on change requests and proposals.

  • Rewards to worker nodes:These nodes are rewarded with SQD tokens for contributing their processing and storage capacity to the network.

  • Staking and stake delegation: Users can stake SQD tokens with their preferred worker nodes. 

  • Regulation of data consumption rates:Locking SQD tokens allows data consumers to increase their bandwidth allocations. This serves as a critical factor with regard to the amount and speed of on-chain data these consumers can access.

SQD is a deflationary token, with a total and maximum supply of 1,337,000,000.

Skinny_Banner-1600x400.webp

Where to Buy the Subsquid Crypto Token (SQD)

The Subsquid token is available on Bybit's Spot market as a trading pair (SQD/USDT). You can also take advantage of Bybit's Token Splash campaigns dedicated to SQD for the chance to grab a share of the 1,900,000 SQD prize pool. The campaigns will run through May 31, 2024.

Closing Thoughts

Subsquid Network is a project with the potential to revolutionize blockchain analytics and access to on-chain data. With its modular design, vast coverage network and efficient decentralization of processing and storage capacities, it offers a significant improvement over The Graph’s highly popular protocol. 

Moreover, Subsquid's impact on the industry could extend beyond simple access to on-chain data. Specifically, the platform has the potential to power AI use cases on blockchain. AI algorithms and applications require fast and efficient access to large volumes of data, and thanks to its operational concept and capabilities, Subsquid could meet this demand. With the niche at the intersection of AI and crypto gathering pace fast, Subsquid is well-positioned to take advantage of this explosive growth. 

#LearnWithBybit