A Rust-based event streaming pipeline that listens for Uniswap V3 events on Arbitrum and persists them to PostgreSQL via NATS JetStream.
┌─────────────────────┐ ┌──────────────┐ ┌─────────────────────┐ ┌────────────┐
│ uniswap-listener │────▶│ NATS │────▶│ uniswap-injestor │────▶│ PostgreSQL │
│ (blockchain events)│ │ JetStream │ │ (durable consumer) │ │ │
└─────────────────────┘ └──────────────┘ └─────────────────────┘ └────────────┘
| Crate | Description |
|---|---|
uniswap-listener |
Subscribes to Uniswap V3 contract events and publishes them to NATS |
uniswap-injestor |
Consumes events from NATS and persists them to PostgreSQL |
nats-messages |
Shared message definitions for NATS communication |
common |
Shared configuration utilities |
- At-least-once delivery via NATS JetStream durable consumers
- Deduplication using checksums (chain_id + tx_hash + log_index)
- Horizontal scaling - multiple injestors share the workload automatically
- Resilient - unacked messages are redelivered on failure