Indexes Ethereum, reconstructs what happened, maps relationships, and detects unusual behavior. 392 blocks/sec pipeline (E1: mock RPC, zero latency, PG17 β see Benchmarks). 176 tests passing.
E1 Replay: mock RPC fixtures, zero latency, single committer, PostgreSQL 17. Synthetic blocks (~1 tx/block). Hardware not recorded β see docs/BENCHMARKS.md for methodology and repro steps.
Bottleneck is DB commit path (~2.5ms/block), not fetch workers.
Pure CPU β no I/O, no allocations beyond output vectors.
Bounded channels, single-writer committer, structural backpressure.
Turns raw blockchain data into explainable intelligence.
Decodes ETH transfers, ERC-20/721/1155, DEX swaps (Uniswap V2/V3, 1inch), WETH, Aave, Compound.
Activity stats, ETH/token volumes, behavioral classification, relationship graph.
Deployment info, unique callers, function selectors, interface detection.
Sandwich patterns, arbitrage, priority fee anomalies, repeated protocol interactions.
Intelligence computed incrementally as blocks are indexed. API reads from pre-computed data.
Large transfers, activity spikes, new wallet high-value, coordinated activity.
Bounded BFS traversal mapping address interactions with depth/limit controls.
Real-time updates for block commits, anomalies, MEV detection, and reorgs.
Groups related addresses by interaction patterns. Find contract deployers and token whales.
CSV/JSON export for transactions and anomalies. Historical trend queries over time.
Production-grade Ethereum infrastructure built in Rust.
Transfer events decoded into typed tables. Token transfers indexed for fast queries.
Detects chain reorganizations, identifies common ancestor, rolls back atomically.
20+ metrics: blocks/sec, tx/sec, intelligence ops, RPC latency, DB commit time.
Axum REST API with 20+ endpoints. Block, transaction, address, intelligence, anomalies, export.
API key auth, rate limiting, read-only API, RedactedUrl prevents credential leaks.
Multi-stage Dockerfile, production docker-compose, PostgreSQL + Prometheus + Grafana.
232 tests, 0 clippy warnings.
All 9 implementation phases complete.
Axum-based REST API with keyset pagination.
| Endpoint | Description |
|---|---|
| GET /block/{number_or_hash} | Block by number or hash |
| GET /transaction/{hash} | Transaction by hash |
| GET /address/{address}/transactions | Address history with keyset pagination |
| GET /contract/{address}/events | Contract events filtered by topic |
| GET /health | Health check |
| GET /status | Cursor position, finalized height, lag |
Get running in 3 commands.
# Clone and configure git clone https://github.com/VarunGore36/ChainLens.git cd ChainLens cp .env.example .env # add your RPC endpoint # Start PostgreSQL docker compose up -d # Run the indexer cargo run --bin chainlens # Run the API (separate terminal) cargo run --bin api # http://127.0.0.1:8080