Back to Case Studies
Blockchain Infrastructure|Mandragora Validators

Undexer: Namada Blockchain Indexing Service

Created foundational blockchain indexing infrastructure for Namada, providing efficient data querying and analytics via a comprehensive REST API.

Cover Image for Undexer: Namada Blockchain Indexing Service

The Challenge

Blockchain data is notoriously difficult to query. Raw node APIs return data in formats optimized for consensus, not for applications. For Namada - a new privacy-focused blockchain - this problem was acute:

The Query Gap: Developers building on Namada couldn't efficiently answer basic questions: "What transactions involved this address?" "What's the current validator set performance?" "How did this governance proposal's voting evolve?" Each query required scanning the entire blockchain - impractical for any real application.

No Existing Solutions: Unlike Ethereum with The Graph or established Cosmos chains with mature indexers, Namada had no indexing infrastructure. Every team building on Namada would need to solve the same data access problems independently.

Privacy-Aware Indexing: Standard blockchain indexers assume full transaction transparency. Namada's shielded transactions required an indexer that could surface useful metadata without compromising privacy guarantees.

Infrastructure Dependency: Our own Shielded Live explorer needed a reliable data layer. Rather than build something tightly coupled to the explorer, we saw an opportunity to create standalone infrastructure that the entire ecosystem could use.

"It's truly a great experience to work with such a committed and professional team. Key tools like Undexer and Fadroma have been and are being used by other developers and builders nowadays."

  • Daniel, Mandragora Validators

Our Approach

We designed Undexer as foundational infrastructure - a public good that would accelerate the entire Namada ecosystem.

API-First Design

Rather than building to our own needs, we started with the question: "What queries would any Namada application need?" This led to a comprehensive REST API covering:

  • Block and transaction queries
  • Validator and staking data
  • Governance information
  • Token transfers and balances (for transparent transactions)

Self-Hosted by Default

While we run a public instance, Undexer is designed for self-hosting. Validators, infrastructure providers, and serious applications can run their own instances, reducing centralization risk and ensuring data availability.

Performance at Scale

Blockchain indexers face a common challenge: as chains grow, query performance degrades. We architected Undexer for long-term scalability:

ConsiderationOur Approach
Data VolumePostgreSQL with optimized schemas and indexes
Query PatternsPre-computed aggregations for common queries
Real-time UpdatesEfficient block processing pipeline
Resource UsageMinimal dependencies, containerized deployment

Privacy Boundary Respect

Undexer indexes what's meant to be public and explicitly doesn't attempt to de-anonymize shielded data:

  • Transparent transactions: Full indexing
  • Shielded transactions: Metadata only (timing, transaction type)
  • User balances: Only from transparent pools

The Solution

Undexer provides a complete data access layer for the Namada blockchain via a clean REST API.

API Coverage

Blockchain Data

GET /status          - Network status and sync info
GET /blocks          - Block listing with pagination
GET /blocks/:height  - Specific block details
GET /txs             - Transaction search and listing
GET /txs/:hash       - Transaction details by hash

Validator Information

GET /validators           - Current validator set
GET /validators/:address  - Specific validator details
GET /voting-power         - Voting power distribution
GET /commission           - Commission rates across validators

Governance

GET /proposals            - All governance proposals
GET /proposals/:id        - Proposal details and voting status
GET /votes/:proposal_id   - Votes on a specific proposal

Staking & Epochs

GET /epochs               - Epoch information
GET /staking-params       - Current staking parameters
GET /delegations/:address - Delegations for an address

Token Transfers

GET /transfers            - Transfer history
GET /transfers/by-sender  - Transfers from an address
GET /transfers/by-receiver - Transfers to an address

Technical Architecture

Data Pipeline

  1. Block Listener: Monitors Namada node for new blocks
  2. Parser: Extracts and normalizes transaction data
  3. Indexer: Writes to PostgreSQL with appropriate indexes
  4. API Server: Serves queries against indexed data

Technology Stack

  • Runtime: Node.js with TypeScript
  • Database: PostgreSQL for structured query support
  • Deployment: Docker and Nix for reproducible builds
  • Proxy: Nginx for rate limiting and caching

Integration Points

  • Direct integration with Shielded Live explorer
  • Public API available for third-party applications
  • Designed for easy integration with other Namada tools

Development Timeline

PhaseDurationFocus
API Design1 weekEndpoint specification, data model design
Core Development2 weeksIndexing pipeline, database schema, API implementation
Integration0.5 weeksShielded Live integration, testing
Deployment0.5 weeksInfrastructure setup, monitoring, documentation

Team: 3 developers

Total Duration: 4 weeks

Results

API Capabilities

Endpoint CategoryQueries Supported
BlocksList, search, details
TransactionsList, search by hash/type/address
ValidatorsSet, individual, performance metrics
GovernanceProposals, votes, outcomes
StakingEpochs, parameters, delegations
TransfersBy sender, receiver, with filtering

Performance Characteristics

  • Indexing Latency: New blocks indexed within seconds
  • Query Response: Sub-100ms for most queries
  • Scalability: Handles full chain history efficiently

Ecosystem Adoption

Undexer has become foundational infrastructure for the Namada ecosystem:

  • Shielded Live: Powers the primary block explorer
  • Third-Party Tools: Used by validators and developers
  • Reference Implementation: Demonstrates Namada data patterns

Open Source

Undexer is fully open source, enabling:

  • Community contributions and improvements
  • Self-hosting by infrastructure providers
  • Learning resource for Namada developers

Technologies Used

Node.js TypeScript PostgreSQL Docker Nix Nginx REST API Namada SDK

Ready to ship your blockchain project?

From smart contracts to full-stack dApps, we turn your Web3 vision into reality. Let's talk about what you're building.

hello@hack.bg

By submitting, you agree to our privacy policy.