Hi all, ![]()
Sharing a Rust crate I extracted from a recent Solana MEV experiment, in case anyone here is building Rust-based bots, indexers, or monitoring tools and wants something lighter than pulling the full solana-client SDK for account subscriptions.
Context
I built a small cross-DEX arbitrage engine targeting SOL/USDC on Solana mainnet, running on a €4.50/month VPS for 15 hours straight. The engine captured zero profitable opportunities — the market was efficient to within ~29 bps on that route, which matches what I’d expect for a hobbyist setup without colocation or a private RPC tier.
What the experiment did produce was a resilient WebSocket layer that ran continuously for 15h without crashing. I extracted it and published it as helius-stream.
What it is
A focused Rust client for one specific use case: subscribing to Solana account updates over Helius WebSocket, with gap detection, reconnect, and a stream health state machine. 408 SLoC, 8 direct deps (vs ~200 transitive for the full solana-client SDK).
- Crate: crates.io: Rust Package Registry
- Source: GitHub - ginugokz/helius-stream-rs: Resilient Helius WebSocket client for Solana. · GitHub
- License: Apache-2.0 with patent grant
What it does today (v0.1)
accountSubscribeover Helius WebSocket- Gap detection (slot delta tracking, you know when you missed slots)
- Exponential backoff reconnect (100ms → 10s, configurable)
- Stream health state machine: Connected / Degraded / Stale / Failed
- Zero panics in normal paths
What it doesn’t do yet
- Async — v0.1 is sync, tokio coming in v0.2 behind a feature flag
programSubscribe,logsSubscribe,signatureSubscribe— onlyaccountSubscribefor now (there’s an opengood first issueforprogramSubscribeif anyone wants to contribute)- It’s not a Solana SDK; it’s an RPC client for one specific subscription type
Why I’m posting here
Two reasons:
-
Feedback before committing to v0.2 design. Especially interested in opinions from people who’ve built bots or indexers and have war stories about WebSocket flakiness or stale-data incidents.
-
Visibility — if your project pulls
solana-clientpurely for account subs and you’d benefit from something smaller, this might save you time.
Happy to discuss the MEV side of the experiment too. The short version: small-VPS SOL/USDC arb is dead unless you have colocation or your own validator, but the journey of finding that out empirically was worth the €4.50.
Critiques welcome.