Ten named governance frameworks — from quadratic and conviction voting to futarchy — with the tradeoffs of each and how DAOs combine them without deadlocking.
A Blockchain Indexer is a service that reads blockchain data, processes it, and stores it in an optimized database for fast querying. Instead of scanning every block to find data, indexers pre-process data for instant retrieval.
Think of it as a search engine for blockchains - indexing all data so you can query it instantly.
Why Indexers Are Needed
The Problem
Direct Blockchain Query:
// To find all transfers from an address
// Must scan every block (millions)
// Extremely slow (hours/days)
for (let i = 0; i < 17000000; i++) {
const block = await provider.getBlock(i)
// Check every transaction...
}
Copy link
With Indexer:
// Pre-indexed data
// Instant result (milliseconds)
const transfers = await indexer.getTransfers(address)
Copy link
How Indexers Work
Indexing Process
1. Listen to Blockchain
- New blocks
- New transactions
- Contract events
2. Extract Data
- Parse transactions
- Decode events
- Identify patterns
3. Transform Data
- Normalize format
- Calculate aggregations
- Create relationships
4. Store in Database
- Optimized for queries
- Indexed fields
- Fast retrieval
5. Serve Queries
- API endpoints
- GraphQL
- SQL
Copy link
Types of Indexers
1. General-Purpose Indexers
Index all blockchain data:
Examples:
Dune Analytics: SQL queries
Flipside Crypto: Analytics
Covalent: API access
2. Protocol-Specific Indexers
Index specific protocol data:
Examples:
Uniswap: Token prices, liquidity
Aave: Lending positions
NFT platforms: Ownership, trades
3. Custom Indexers
Build your own with:
The Graph: Decentralized indexing
Ponder: TypeScript indexer
0xsequence: Indexing toolkit
Indexer Services
Major Providers
Service
Type
Query Language
Best For
The Graph
Decentralized
GraphQL
dApps
Dune
Centralized
SQL
Analytics
Covalent
Centralized
API
Any app
Alchemy
Centralized
API
Production apps
The Graph (Most Popular)
Decentralized Indexing Protocol
How It Works:
1. Developers define subgraph (schema)
2. Indexers run nodes, index data
3. Curators signal quality subgraphs
4. Delegators stake on indexers
5. Query with GraphQL
Copy link
Use Cases
1. dApp Data Display
Query: "Show all NFTs owned by user"
Without indexer: Scan all NFT contracts (slow)
With indexer: Pre-indexed ownership (instant)
Copy link
2. Analytics Dashboards
Query: "Total volume on Uniswap last 24h"
Indexer: Aggregated, ready to query
Copy link
3. Historical Data
Query: "All transactions for wallet since 2020"
Indexer: Pre-indexed by address
Copy link
4. Price Feeds
Query: "Current ETH price"
Indexer: Calculated from DEX trades
Copy link
Example: Using The Graph
Define Subgraph
# schema.graphql
type Transfer @entity {
id: ID!
from: Bytes!
to: Bytes!
value: BigInt!
timestamp: BigInt!
}
Copy link
Map Events
// mapping.ts
export function handleTransfer(event: TransferEvent): void {
let transfer = new Transfer(event.transaction.hash.toHex())
transfer.from = event.params.from
transfer.to = event.params.to
transfer.value = event.params.value
transfer.save()
}
Copy link
Query
{
transfers(where: { from: "0x..." }, orderBy: timestamp) {
id
to
value
timestamp
}
}