Web3 Builders
Indexing On-chain Data for Small Projects
How small crypto projects can index on-chain data for dashboards, activity feeds and analytics without heavy infrastructure, from direct queries to hosted indexers.

Almost every crypto app eventually needs to show on-chain data in a friendly way: a user's transaction history, a leaderboard, total deposits, recent sales or a feed of activity. Blockchains store this data, but not in a form that is easy to query. Asking a node for "all deposits by this user in the last month" is slow or impossible without some kind of indexing.
Large protocols run complex data pipelines. Small projects can start much simpler.
What indexing means
Indexing means reading blockchain data, usually events and transactions, and storing it in a database structured for your app's queries. Instead of scanning the chain each time a user loads a page, your app queries the database.
A basic indexer does four things:
- Fetches new blocks or events from an RPC provider
- Decodes events into meaningful fields
- Stores them in a database
- Serves them through an API or directly to the frontend
Option 1: Query the chain directly
For very small needs, you may not need an indexer at all. If your app only needs recent events for one contract, direct eth_getLogs queries with small block ranges can work. Cache results briefly to avoid repeated calls.
This works when:
- Data volume is low
- Queries cover recent blocks only
- Real-time freshness matters more than history
It breaks down when you need long histories or complex filters.
Option 2: Build a small custom indexer
A simple custom indexer can run as a scheduled serverless function with a small SQL database:
| Component | Role |
|---|---|
| Scheduled job | Runs every minute or few minutes |
| Cursor table | Stores the last processed block per contract and network |
| Event fetcher | Queries logs in chunks within provider limits |
| Decoder | Turns topics and data into columns |
| Database tables | Store events with indexes on common query fields |
| API | Serves filtered results to the frontend |
Make processing idempotent by using transaction hash and log index as a unique key. That way, reprocessing a block never creates duplicates.
Handle reorgs and confirmations
Only index blocks that have enough confirmations, or mark recent rows as provisional and confirm them later. If you index the chain head, occasional reorganisations can leave incorrect rows. A safe block margin avoids most problems.

Option 3: Use hosted indexing services
Hosted indexers and subgraph platforms let you define which contracts and events to track, then query results through an API. They handle scaling, reorgs and history backfills.
Consider hosted services when:
- You need full historical data from contract deployment
- You track many contracts or networks
- Your team lacks time to maintain infrastructure
- Query patterns are complex
Check pricing, rate limits and data retention before committing, and keep your schema portable in case you need to switch.
Option 4: Analytics platforms
For internal dashboards and one-off analysis, SQL-based blockchain analytics platforms let you query decoded data without running anything yourself. They are excellent for research and public dashboards, though usually not suited as a live backend for your app.
Designing tables well
Good indexing starts with knowing your queries:
- What will users filter by? Address, time, token or event type?
- What sorting do you need? Usually block number or timestamp.
- What aggregates do you show? Totals, counts or leaderboards?
Add database indexes on filtered columns, store amounts as strings or big integers, and keep raw data alongside decoded fields for debugging.
Keep it maintainable
Small indexers fail quietly. Add basic monitoring:
- Alert when the cursor stops advancing
- Log RPC errors with context
- Compare indexed totals with on-chain totals occasionally
- Document how to backfill after downtime
Start small
Many successful apps began with a single table and a scheduled job. Proud Globe, for example, tracks payment detection progress per order with a simple cursor in one database row, scanning public RPC endpoints in chunks. If you are building your own small data project, a pin on the globe is a quick way to show it to other builders.
Educational content only. Nothing here is financial, legal or tax advice. Crypto assets carry risk, so check the details for your own situation.