Skip to main content
Get started
SQD Network is a decentralized query engine optimized for batch extraction of large volumes of data. It currently serves historical on-chain data ingested from 100+ EVM and Substrate networks, as well as Solana (in beta), Starknet and Fuel. The data is comprehensive: for example, on EVM it includes event logs, transaction receipts, traces and per-transaction state diffs.

This documentation covers the SQD Network itself and the complimentary products developed by SQD:
  • Squid SDK - a Typescript toolkit for high-performance batch indexing sourcing the data from the SQD Network, without accessing an archival RPC.
  • SQD Cloud - a hosted service for custom indexers and GraphQL APIs.
  • SQD Firehose - a lightweight adapter for running subgraphs against SQD Network, without accessing an archival RPC node.
  • ApeWorx SQD plugin - use SQD Network as a fast data source for the ApeWorx framework.
Squid SDK indexing examples

Mine the tx data from millions of wallets

.addTransaction({})
// ...
if (wallets.has(txn.from)) { /* ... */ }
if (wallets.has(txn.to)) { /* ... */ }

Track USDC Transfers in real time

.addLog({
   address: [USDC_CONTRACT_ADDRESS],
   topic0: [usdcAbi.events.Transfer.topic],
})

Real time data is fetched from a chain node RPC; a Database object with unfinalized blocks support is required to store it (see this page for more details).

Extract all Transfers to/from vitalik.eth

.addLog({
   topic0: [erc20abi.events.Transfer.topic],
   topic2: [VITALIK_ETH_TOPIC],
})

All Transfer(address,address,uint256) will be captured, including ERC20 and ERC721 transfers and possibly events with the same signature made with other protocols.

Index the AAVE Pool tx data, decoding the event logs

.addTransaction({
   to: [AAVE_CONTRACT],
   logs: true,
})

Including events emitted by other contracts. Get ETH value involved in each call.

Index all NFT mints

.addLog({
   topic0: [usdcAbi.events.Mint.topic],
   transaction: true,
})

Index all DEX trading pairs and Swap events

.addLog({
   address: FACTORY_ADDRESSES,
   topic0: [PAIR_CREATED_TOPIC],
})
.addLog({ topic0: [SWAP_TOPIC] })

Index internal contract calls and traces

.addTrace({
   type: ['call'],
   callTo: [BAYC_ADDRESS],
})
.addStateDiff({ address: [BAYC_ADDRESS] })

Call traces will expose any internal calls to BAYC by other contracts. Also retrieves all changes to contract storage state.

Mine all NFT contracts ever deployed

.addTrace({
   type: ['create'],
})
.addLog({ topic0: [erc721.events.Transfer.topic] })

All contract creations are scraped; they will be checked for ERC721 compliance in the batch handler. All ERC721 Transfer events are scraped so that they can be filtered and binned by the contract in the batch handler.

FAQ

What is a squid?

A squid is a indexing project developed using the Squid SDK. It normally extracts the historicaln on-chain data from SQD Network, decodes and transforms it, and persists into a target store (such as Postgres or s3 bucket). The transformed data may be optionally served with a GraphQL API.

Why should I use SQD?

Indexing on-chain data is essential for building Web3 applications and analytic dashboards. SQD Network and the products build on top offer extremely fast and cost-efficient way to extract and index the historical data, even from lesser known chains. It reduces the data extraction and indexing costs by up to 90% compared to direct indexing using centralized RPC providers like Alchemy or Infura. Finally, by using the SQD Cloud, developers no longer have to care about indexing infrastructure maintenance costs and hassle.

How does SQD compare to The Graph?

SQD is modular -- the on-chain data is extracted from a decentralized data layer (SQD Network), rather than directly from a blockchain node. It enables up to 100x faster indexing, guaranteed data consistensy and reliable indexing even for small networks. For a detailed feature comparison, see SQD vs The Graph.

How much does SQD cost?

The Squid SDK is open source. Accessing the data from the SQD Network is free until the mainnet launch, and afterwards is projected to be in the range of $1-$5 for a terabyte of extracted data. The SQD Cloud offers a free playgroud space for developing indexers and a hosted service for production-ready indexing pipelines. The pay-as-you-go pricing only accounts for the actual compute and storage resources consumed by the indexer, see for the pricing details.

What is SQD Cloud?

SQD Cloud is a service for hosting indexers, managed by Subsquid Labs.  Squid CLI provides a convenient way to  run, deploy and manage indexing projects (squids) locally and in the Cloud.

More questions? Check out our technical community