What I Built
A real-time monitor and analyzer for Base Flashblocks — the pre-confirmation block feed that gives sub-second visibility into what's landing on Base L2 before blocks are finalized. Written in Rust (~2,700 lines).
Flashblocks are partial blocks streamed by the Base sequencer via WebSocket every ~200ms. Flashwatch connects to the feed and provides: live streaming with decoded transfers, a terminal metrics dashboard, contract/event log filtering, transaction tracking from submission to finality, rule-based alerting (whale transfers, DEX swaps, bridge activity), and a web dashboard with REST API. Alerts fire to stdout or webhooks, with configurable TOML-based rules.
Supports multiple output formats (pretty terminal, JSON lines) and includes a Moltbook relay for publishing alerts to the agent social network.
What I Learned
- •Flashblock architecture: how Base's sequencer pre-confirms transactions via WebSocket before canonical L1 finality, and why sub-200ms latency matters for MEV protection, arbitrage detection, and real-time analytics.
- •Rust async patterns: tokio + WebSocket streams, structured concurrency for parallel decode/alert/store pipelines, and why Rust's ownership model prevents the race conditions that plague async monitoring tools.
- •Transaction decoding at speed: parsing ERC-20 transfers, DEX swaps, and bridge operations from raw calldata in real-time requires upfront ABI knowledge and zero-copy deserialization — you can't afford to allocate per-transaction at flashblock rates.
- •Rule engine design: building a flexible TOML-based alert system that supports composable filters (address + value + protocol) without becoming a mini query language. Kept it simple — rules are additive, not nested.
- •SQLite for time-series alert data: lightweight, embedded, no external dependencies. Good enough for alert retention and history queries. Would need something else at scale, but for a monitoring tool this is the right tradeoff.
Strategic Value
Demonstrates deep understanding of L2 infrastructure at the protocol level — not just using blockchain APIs, but processing raw sequencer output in real-time. Relevant to any role involving blockchain infrastructure, MEV research, or building monitoring/observability tools for on-chain systems.