This document highlights key code sections that demonstrate the technical strengths and architectural patterns implemented in this on-chain analytics tool.
RATU On-chain Monitor is an on-chain token holder analytics and whale tracking tool using the Ankr API. The system demonstrates prototyping-focused on-chain analytics patterns including three-mode architecture, pagination handling, and known label identification.
File: Main implementation
Lines: Mode selection logic
The system provides three modes: (1) Basic Info for fast token metadata (~5 seconds), (2) Top Holders with known labels (~3 seconds), (3) Full Snapshot with pagination (2-5 minutes).
Why it's notable:
- Balances speed vs completeness
- Users choose based on needs
- Fast basic info for quick analysis
- Full snapshot for complete holder lists
File: Snapshot implementation
Lines: Pagination loop logic
The system implements pagination using Ankr getTokenHolders API with page parameter, continuing until all holders are retrieved.
Why it's notable:
- Handles tokens with millions of holders
- Continues until all holders retrieved
- Handles large holder counts (197K+ holders) in 2-5 minutes
- Enables complete holder analysis for any token size
File: Label database implementation
Lines: Label matching logic
The system maintains a database of known wallet addresses and automatically identifies exchanges (Binance, OKX, Bybit) and special addresses (Burn, Null).
Why it's notable:
- Automatically labels holders in output
- Provides context for holder analysis
- Identifies exchanges and special addresses
- Enables whale tracking with context
File: Snapshot saving logic
Lines: Timestamped JSON generation
The system saves snapshots as timestamped JSON files enabling comparison of holder distributions over time.
Why it's notable:
- Timestamped JSON snapshots
- Enables programmatic comparison
- Tracks holder changes over time
- Supports whale tracking analysis