Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

The Graph Protocol

The Graph Protocol is a decentralized protocol for indexing and querying data from blockchains and storage networks using GraphQL.
Chainscore © 2026
definition
DECENTRALIZED INDEXING

What is The Graph Protocol?

The Graph Protocol is a decentralized indexing and querying protocol for blockchain data, enabling applications to efficiently access and retrieve information from networks like Ethereum.

The Graph Protocol is a decentralized indexing and querying protocol for blockchain data, enabling applications to efficiently access and retrieve information from networks like Ethereum, IPFS, and other Layer 1 and Layer 2 chains. It functions as a decentralized data marketplace where developers can publish and query open APIs called subgraphs, which define how to index and organize data from specific smart contracts or events. This eliminates the need for applications to run their own centralized indexing servers, creating a more reliable and verifiable data layer for Web3.

The protocol's architecture relies on a network of participants: Indexers (node operators who stake GRT tokens to index data and serve queries), Curators (who signal on valuable subgraphs by depositing GRT), Delegators (who delegate GRT to Indexers), and Consumers (end-users who pay for queries). Queries are processed using GraphQL, a powerful query language that allows developers to request exactly the data they need. This system creates a competitive marketplace for data service, where quality and efficiency are incentivized through the protocol's crypto-economic model.

A subgraph is the core data unit, comprising a subgraph manifest (a YAML file defining the data sources and handlers), a GraphQL schema (defining the shape of the queryable data), and mapping functions (written in AssemblyScript) that translate blockchain events into entities in the GraphQL schema. When a developer deploys a subgraph to the decentralized network, Indexers begin scanning the blockchain for the defined events, processing them through the mappings, and storing the resulting structured data in a queryable database. This process transforms raw, sequential blockchain logs into a rich, relational graph of entities.

The Graph's primary use case is powering decentralized applications (dApps) that require efficient, complex data retrieval, such as DeFi dashboards, NFT galleries, and DAO analytics tools. For example, a DeFi application like Uniswap uses subgraphs to query historical trade data, liquidity pool statistics, and user portfolio balances without needing to process every transaction from the chain's genesis block. This provides a performant user experience comparable to Web2 applications while maintaining the security and verifiability of decentralized infrastructure.

The protocol's native utility token, GRT (The Graph Token), secures the network and coordinates all participants. Indexers stake GRT to provide indexing and query services, earning query fees and indexing rewards. Curators stake GRT to signal which subgraphs are valuable, directing Indexer resources and earning a share of query fees. Delegators can participate by delegating their GRT to Indexers, sharing in their rewards without running infrastructure themselves. This token-incentivized ecosystem ensures the network remains robust, responsive, and aligned with the data needs of developers.

how-it-works
ARCHITECTURE

How The Graph Protocol Works

The Graph is a decentralized protocol for indexing and querying blockchain data, enabling applications to efficiently retrieve information from networks like Ethereum and IPFS.

The Graph Protocol operates as a decentralized data layer for Web3, functioning similarly to how APIs serve data in traditional web applications. It allows developers to build and publish open APIs called subgraphs, which define how to ingest, process, and store blockchain data from specific smart contracts. This process transforms raw, sequential blockchain data into a structured, queryable database that applications can efficiently access using GraphQL. By abstracting complex data retrieval logic, The Graph eliminates the need for applications to run their own indexing servers.

The network's core components include Indexers, Curators, and Delegators. Indexers are node operators who stake the native GRT token to provide indexing and query processing services, earning query fees and indexing rewards. Curators signal on high-quality subgraphs by depositing GRT, directing Indexers to prioritize indexing that data. Delegators stake GRT with Indexers to secure the network without running a node themselves, sharing in the rewards. This token-incentivized marketplace ensures data availability and integrity.

A developer's workflow begins by defining a subgraph manifest. This specification outlines the smart contracts to watch, the events to index, and how to map event data into the Graph's data store. Once deployed, the subgraph is indexed by the network. Applications then query this indexed data using precise GraphQL requests, which specify exactly which data fields are needed. This is a significant efficiency gain over directly querying a blockchain node, which would require processing every block to filter for relevant transactions and events.

The protocol's decentralized architecture ensures resilience and censorship resistance. No single entity controls the data pipeline. Query results are cryptographically verified, and a dispute resolution system slashes malicious Indexers' staked GRT. This creates a robust, trust-minimized data backbone for DeFi applications like Uniswap, NFT platforms, and DAO tooling, which rely on real-time, reliable access to on-chain state, historical trends, and aggregated metrics.

key-components
THE GRAPH PROTOCOL

Key Network Participants

The Graph is a decentralized indexing and query protocol for blockchain data. Its ecosystem is powered by distinct roles that secure the network, curate data, and serve API queries.

02

Delegators

Delegators secure the network by delegating their GRT tokens to Indexers they trust, without running a node themselves. They share in the Indexer's rewards and risks (including slashing), providing a way for passive token holders to participate in network security and earn a portion of the protocol's fees.

04

Subgraph Developers

Subgraph Developers define how blockchain data is indexed by creating a subgraph manifest. This specifies the smart contracts of interest, the events to track, and how to map event data into entities that The Graph's GraphQL API can query. They publish subgraphs to the decentralized network.

05

Consumers

Consumers are the end-users of the protocol, typically decentralized application (dApp) developers. They query indexed data via the GraphQL endpoint provided by Indexers. Consumers pay for these queries using GRT, either directly or through a gateway service, funding the entire network's economics.

06

Arbitrators

Arbitrators (or the Arbitration Charter) are a security backstop. They are entities designated by The Graph Council to resolve serious disputes, such as malicious subgraphs serving incorrect data. Their role is to protect the network's data integrity by verifying and slashing an Indexer's stake if a fault is proven.

key-features
THE GRAPH PROTOCOL

Key Features & Technical Advantages

The Graph is a decentralized protocol for indexing and querying blockchain data, enabling efficient access to on-chain information via open APIs called subgraphs.

01

Subgraphs

A subgraph is a self-contained data index that defines which blockchain data to index and how to transform it. It consists of a manifest, a schema, and mappings written in AssemblyScript. Developers publish subgraphs to The Graph Network, making the indexed data queryable via GraphQL. This abstracts away the complexity of processing raw blockchain data directly.

02

Decentralized Network

The protocol operates on a decentralized network of Indexers, Curators, and Delegators. Indexers stake GRT to operate nodes that index subgraphs and serve queries. Curators signal on valuable subgraphs using GRT to guide Indexers. Delegators stake GRT with Indexers to secure the network without running a node. This creates a marketplace for data reliability.

03

GraphQL API

All indexed data is exposed via a GraphQL API, providing a powerful and flexible query language. This allows developers to request exactly the data they need in a single query, avoiding over-fetching. The GraphQL schema is defined in the subgraph, enabling type-safe queries and efficient data retrieval for dApp frontends and backends.

04

Query Fees & Incentives

The network uses a query fee market. Consumers pay for queries in GRT, which are distributed to Indexers and Delegators. Indexers set their own prices and earn fees for serving queries and indexing. This micro-payment system incentivizes high-quality, reliable data service and ensures the network's economic sustainability.

05

Data Integrity & Censorship Resistance

The protocol ensures data integrity through cryptographic proofs and a dispute resolution system. Indexers must provide Proof of Indexing (POI) to prove they are correctly indexing the chain. Disputes can be raised by Fishermen, with Arbitrators ultimately slashing malicious Indexers' stake. This decentralized verification makes the data feed reliable and censorship-resistant.

06

Multi-Chain Support

While initially built for Ethereum, The Graph's architecture is blockchain-agnostic. It supports indexing data from multiple EVM-compatible chains (like Polygon, Arbitrum, Avalanche) and non-EVM chains (like NEAR, Solana via specific gateways). This allows developers to build cross-chain applications using a unified querying interface.

ecosystem-usage
THE GRAPH PROTOCOL

Ecosystem Usage & Supported Networks

The Graph is a decentralized protocol for indexing and querying blockchain data. It enables applications to efficiently access organized data from networks like Ethereum, Polygon, and Arbitrum through open APIs called subgraphs.

06

Key Use Cases & dApp Examples

The Graph is foundational for Web3 applications requiring efficient on-chain data access. Major use cases include:

  • DeFi Dashboards: Uniswap uses subgraphs to query pool stats, trade volumes, and liquidity data.
  • NFT Marketplaces: OpenSea and LooksRare index NFT metadata, ownership, and sale history.
  • DAO Governance: Compound and Aave query proposal and voting data.
  • Analytics Platforms: Services like Dune Analytics and DeFi Llama build atop subgraphs for aggregated insights.
subgraph-explainer
THE GRAPH PROTOCOL

What is a Subgraph?

A technical definition and explanation of a Subgraph, the core data indexing unit in The Graph's decentralized protocol.

A Subgraph is a set of instructions, written in a declarative language called GraphQL, that defines how to index and organize blockchain data from a specific smart contract or protocol. It acts as a data pipeline that listens for events on the blockchain, processes them according to the defined logic, and stores the resulting structured data in a queryable format. Developers deploy subgraphs to The Graph Network, where decentralized Indexers operate them, making the data accessible via performant GraphQL APIs.

The structure of a subgraph is defined by three core components: the subgraph manifest (subgraph.yaml), which maps data sources and their handlers; the GraphQL schema (schema.graphql), which defines the shape of the final queryable data; and the mapping logic (written in AssemblyScript), which contains the code that translates raw blockchain events into the entities in the schema. This separation allows developers to specify what data they want (the schema) and how to derive it from the chain (the mappings).

When a transaction emits an event on-chain, the relevant subgraph's mapping functions are triggered. These handlers—such as handleTransferEvent for an ERC-20 token—extract data from the event, perform any necessary calculations, and create or update corresponding entities in the subgraph's store. For example, a Uniswap subgraph might create Swap, Pool, and Token entities. This process transforms raw, sequential log data into a rich, interconnected graph of entities that can be efficiently queried.

The primary use case for a subgraph is to power the data layer for decentralized applications (dApps). Instead of a dApp frontend making slow, complex direct calls to an Ethereum node, it queries a subgraph's indexed data with a single, efficient GraphQL request. This enables complex queries like "show me all liquidity pools where token X is paired with USDC, sorted by 24-hour volume." Prominent examples include Uniswap's interface, which uses subgraphs to display pool statistics, trade history, and user positions.

In The Graph's decentralized network, subgraphs move through a lifecycle: from development and testing on the hosted service to being published and curated on the mainnet. Curators signal on subgraphs to indicate high-quality data, guiding Indexers to prioritize them. This ecosystem ensures that subgraphs providing valuable data are reliably hosted and maintained in a decentralized manner, forming the backbone of Web3's data infrastructure.

ARCHITECTURE COMPARISON

The Graph vs. Traditional Query Methods

A technical comparison of decentralized subgraph indexing versus centralized and direct node querying for blockchain data.

Feature / MetricThe Graph (Decentralized)Centralized API ServiceDirect Node Query (RPC)

Data Availability

Indexed, historical subgraphs

Selective, curated datasets

Raw, real-time chain state

Query Language

GraphQL

REST / Proprietary

JSON-RPC

Query Latency

< 1 sec (cached index)

50-500 ms

1-30 sec (block time dependent)

Historical Data Access

Decentralization / Censorship Resistance

Infrastructure Cost for Developer

Query fees (GRT)

Monthly subscription / API credits

Node operation / RPC provider fees

Data Freshness (Index Lag)

~1 block to 1 hour

Near real-time

Real-time

Developer Experience

Declarative subgraph manifest

Pre-built endpoints

Low-level, manual data processing

security-considerations
THE GRAPH PROTOCOL

Security & Economic Considerations

The Graph's decentralized network is secured and incentivized through a multi-role cryptoeconomic model, where participants stake, earn, and are slashed based on their performance and honesty.

THE GRAPH PROTOCOL

Frequently Asked Questions (FAQ)

Essential questions and answers about The Graph, the decentralized protocol for indexing and querying blockchain data.

The Graph is a decentralized protocol for indexing and querying data from blockchains like Ethereum and IPFS using GraphQL. It works by organizing data into open APIs called subgraphs that developers can query. The network consists of Indexers (node operators who stake GRT to index data and serve queries), Curators (who signal on valuable subgraphs), and Delegators (who delegate GRT to Indexers). Users pay query fees in GRT for the data they request, creating a marketplace for decentralized data access.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team