Architecture & Design
High-Level Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Blockchain │ │ Subsquid │ │ Absinthe │
│ Networks │───▶│ Processor │───▶│ API │
│ │ │ │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ PostgreSQL │
│ OR
Redis │
└─────────────────┘
Core Design Principles
- Modular Architecture: Each protocol has its own processor and data models
- Type Safety: Full TypeScript implementation with strict type checking
- Configuration-Driven: Protocol support configured via JSON files
- Event-Driven Processing: Real-time event processing with batch optimization
- 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