Skip to content

Architecture & Design

High-Level Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Blockchain    │    │   Subsquid      │    │   Absinthe      │
│   Networks      │───▶│   Processor     │───▶│   API           │
│                 │    │                 │    │                 │
└─────────────────┘    └─────────────────┘    └─────────────────┘


                       ┌─────────────────┐
                       │   PostgreSQL    │
                       │       OR
                            Redis        │
                       └─────────────────┘

Core Design Principles

  1. Modular Architecture: Each protocol has its own processor and data models
  2. Type Safety: Full TypeScript implementation with strict type checking
  3. Configuration-Driven: Protocol support configured via JSON files
  4. Event-Driven Processing: Real-time event processing with batch optimization
  5. Fault Tolerance: Robust error handling and retry mechanisms

Technology Stack

  • Framework: Subsquid (blockchain indexing framework)
  • Language: TypeScript
  • Database: PostgreSQL with TypeORM
  • In-Memory-Store: Redis
  • Package Manager: pnpm (monorepo structure)
  • API Integration: RESTful API with rate limiting
  • Price Data: CoinGecko API integration
  • Containerization: Docker support