S
Back to portfolio
Project · 2024

Moonshot Monitor.

Real-time Solana token watcher

Role
Solo backend · infra
Year
2024
Stack
Rust · Tokio · Solana SDK
image placeholder
Moonshot Monitor — terminal hero
public/moonshot/hero.png

Moonshot Monitor is a single Rust binary that watches the Solana blockchain for new tokens created under the Moonshot program (`MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG`) and posts enriched updates to Discord — usually within seconds of the mint. No queue, no database, no orchestration. One Tokio process doing one job well.

3 min read·2024·by Shada Daab·
Ch. 01The problem

Speed is the entire product.

When a new memecoin mints, the first few minutes are when interesting things happen. Most dashboards poll on a 30-second interval, which is forever in crypto-time. The goal: see new mints within seconds of the on-chain event, with all the metadata needed to make a decision — and pipe it straight to a Discord channel where my watchers already live.

image placeholder
Latency budget — RPC → enrich → Discord
public/moonshot/01-latency.png
Fig 1Latency budget — RPC → enrich → Discord
Ch. 02Why Rust

Tight loop, predictable latency, no GC pauses.

I chose Rust over Node because the hot path is small, latency-sensitive, and never sleeps. Tokio handles thousands of concurrent tasks without thread overhead. The binary subscribes to a Solana `transactionSubscribe` WebSocket filtered to the Moonshot program, decodes the event stream, and fans out enrichment work to background tasks.

I chose Rust over Node because the hot path is small, latency-sensitive, and never sleeps.
  • Tokio + tokio-tungstenite for the WebSocket subscription.
  • `solana-client` / `solana-sdk` 1.18.16 for RPC + decoding.
  • Serenity for Discord posting (rustls backend, no openssl dep).
  • Parses three event types: `BuyEvent`, `SellEvent`, `CreateEvent`. Only create events trigger a post.
image placeholder
src/ — main.rs · event.rs · ws_client.rs · new_tokens.rs
public/moonshot/02-tree.png
Fig 2src/ — main.rs · event.rs · ws_client.rs · new_tokens.rs
Ch. 03The pipeline

Mint → metadata → previous mints → Discord.

On each `CreateEvent`, the binary kicks off two concurrent fetches: the token's metadata from its `uri`, and every other token the creator has minted in the past. Both run as Tokio tasks via `tokio::spawn`, joined with `try_join!`. That second lookup is the actual edge — it lets the channel see in one message whether the creator has 200 prior rug-pulls or is fresh.

image placeholder
Discord embed — token + creator history
public/moonshot/03-discord.png
Fig 3Discord embed — token + creator history
Ch. 04What I learned

Small tools are still worth making.

Not every project needs to be a platform. Sometimes the right answer is one binary, one process, one job — deployable to any Linux box with `cargo build --release` and a webhook URL. Building this taught me how much complexity I usually accept by default, and how good it feels to write something that just does its thing and never wakes anyone up.

Not every project needs to be a platform.
image placeholder
Deploy & logs
public/moonshot/04-deploy.png
Fig 4Deploy & logs
— fin —

built by one person · case study written by the same person

Live · in production

What it actually looks like.

moonshot-monitor — zsh