Brain-Shield — A Defensive Use Case for ShredStream (Opt-in Trade Insurance for Memecoin Holders)

TL;DR

ShredStream today is used almost exclusively offensively (sniping, frontrunning, sandwich). I built Brain-Shield, a defensive product on top of the same feed: an opt-in insurance subscription for
memecoin traders. The trader subscribes before entering a position. Brain-Shield then watches the holder’s positions in the background and, when a rug starts (LP withdrawal or coordinated dump), reacts
at ShredStream speed — before the catastrophe finalizes on-chain.

Repo + 24h live benchmark : GitHub - wicode06/brain-shield-proofs: Brain-Shield — Public proof pack: real-time anti-rug shield for Solana memecoin traders. Layer 1 (LP withdrawals) and Layer 2 (coordinated dumps) detected via ShredStream; Layer 3 (cartel tracking) powered by reinforcement learning. · GitHub


The 3 rug vectors covered

Layer What it detects Status
L1 LP Withdrawal (pool drain) Proven 24h live
L2 Coordinated Dump (multi-wallet sell, same blockhash) Prototype running
L3 Cartel Operation (960 active cartels indexed) Detection logic ready

All three layers consume the same live ShredStream feed.


Live proofs (Layer 1, 24h continuous run)

Metric Baseline Brain-Shield
Entries processed 3,750,000 3,750,000
Withdraws detected 1,359 1,359
False negatives -– 0 / 1,359
Avg per-entry time 985 µs 13.5 µs
Speedup -– 72.9× sustained
  • Local commodity hardware (WSL2 desktop) — Frankfurt bare metal server would push numbers further.
  • 18+ checkpoints over 24h, variance ~6% (structural, not warm-up).
  • Every detected withdrawal matched on Solscan.
  • L2 captured 2,507 coordinated-dump events in the same window, including TIER ≥15 (15+ wallets sharing the same blockhash, mathematically impossible by chance).

Full data : RESULTS.md + screenshots in the repo.


Product roadmap (3 phases)

Phase 1 — Alert subscription (today, fully working)
Subscriber holders receive a real-time alert (~13 µs from shred to notification) when L1/L2/L3 fires on a token they hold. They decide to exit manually. No custody required, no execution risk. Already
production-validated on the 24h bench.

Phase 2 — Opt-in auto-exit (next milestone)
For subscribers who want hands-off protection, Brain-Shield emits a Jito-bundled SELL transaction the moment the rug is detected. Goal : every subscriber exits in the same slot as the drain TX, or the slot
before. Requires non-custodial signing delegation (Solana program-based authority) — work in progress.

Phase 3 — BAM plugin (longer term)
A “Pre-Drain Exit Lane” plugin running inside a BAM Node TEE : at ordering time, subscriber SELL TXs landing in the same slot as a detected drain are batched and prioritized ahead of the drain itself. This
is where Brain-Shield’s detection logic could naturally integrate with Jito’s roadmap.


Economic alignment

Brain-Shield never blocks entries. Subscribers buy normally and pay full Jito tips at entry. When a rug fires, subscriber exits become additional Jito-bundled transactions with high priority fees
(urgency). On the 24h benchmark window (1,359 detected drains), a subscriber base of even 1,000 holders would generate hundreds of thousands of additional bundled exit TXs per day — net positive for
ShredStream economics, not cannibalizing them.


Open challenges (honest list)

  • Group slippage at exit when many subscribers hold the same illiquid pool. Trade-off : a -10% rushed exit beats a -100% rug, but the math has to be transparent to subscribers.
  • Non-custodial delegation for Phase 2 needs careful design (PDA authority, scoped revoke). I have a draft, looking for review from people who shipped Solana program-based authority before.
  • False-positive rate is not yet measured (the 24h bench measured 0 / 1,359 false negatives, which is the harder direction). Phase 1 (alerts only) absorbs this naturally; Phase 2 needs a confidence
    threshold.

Asks for the community

  1. Feedback on the framing : is “opt-in trade insurance” the right positioning for the forum, or would “exit lane” / “rug shutoff valve” / something else read better ?
  2. Any validators, BAM operators, or wallet UX teams interested in trialing Phase 1 alerts (the 13 µs detector slots into any pipeline) ?
  3. Pointers to the most relevant Jito grant / subsidy track for defensive infrastructure of this kind — JIP-31 BAM Early Adopter, NCN, or something I should know about ?

I’d like to use this thread to refine the proposal before promoting to a JIP-Draft.

-– wicode06

1 Like

Empirical proof — why tip economics alone cannot stop rugs, and why BAM is the only structural fix

Following up on my Brain-Shield — A Defensive Use Case for ShredStream (Opt-in Trade Insurance for Memecoin Holders).

For the last 3 months I have been running live defensive SELL experiments on Solana mainnet against real rug events on PumpSwap pools, from a sub-millisecond ShredStream detector on a bare-metal server in
Frankfurt (0.6 ms to Jito). I’ve tested every angle available at the protocol layer today: progressive Jito tip escalation, pre-signed TXs, multi-RPC parallel submission, direct TPU paths, slot-aligned
bundle timing. Every single defensive exit against an active drainer has failed.

The five duels below are a clean, on-chain-verifiable sample from that campaign. They destroy the two common counter-arguments (“just pay more tip” / “you were too slow”) and show why BAM Pre-Drain Exit Lane
is not an enhancement — it is the only structural fix.


Five same-slot duels — on-chain ledger

All TXs are independently verifiable on Solscan.

Duel #1 — slot 399 553 989 — WSOL-Frieren

Duel #2 — slot 399 566 241 — WSOL-axiomlana

Duel #3 — slot 399 600 905 — WSOL-RHINO

Duel #4 — slot 399 601 537 — WSOL-Coco #1

Duel #5 — slot 399 602 711 — WSOL-Coco #2 (the killer case)

All five — like every other defensive attempt in the campaign: rugger paid zero Jito tip, defensive exit landed in the same slot but behind the drain, reverted with DivisionByZero (6025) in
pump-amm/src/curve/fees.rs:21.


What this rules out

These five slots are not isolated bad luck. They are the cleanest snapshots of a failure mode I have now reproduced dozens of times over 3 months, against different ruggers, different pools, different
leaders, with every variation of tip / latency / submission path I could test.

Latency was not the bottleneck.
ShredStream-driven detection-to-Jito-bundle-submission measured at 0.36 ms – 1.00 ms across multiple live captures:

Sub-millisecond, reproducible, on live mainnet rugs. The infra is not the problem.

Tip economics did not move the needle.
Slot 399 602 711 paid 1.2 SOL ($114.26) in Jito tip — 9 600× the rugger’s total fee. Same result: 268 positions behind, DivisionByZero on a drained pool, 1.2 SOL paid out for nothing. I escalated tips week
after week across the campaign — the wall is always the same.

▎ Neither faster detection nor higher tip changes the outcome. The Solana scheduler does not care how fast you are or how much you pay — it does not have a primitive for defensive intent priority. 3 months
▎ of live data confirm this.


The case that closes the argument — slot 399 602 711


The hidden victim count

Across these five rugs alone, after subtracting identified cartel wallets (rugger + coordinated dumpers), an estimated ~1 800 holders held the token at rug-time with sincere positions large enough to warrant
a defensive exit.

Under the current Solana ordering primitive, 0 of them could have exited successfully — the scheduler placed every defensive intent behind the drainer, regardless of tip or latency. Extrapolated across the
3-month campaign, the real victim count is in the tens of thousands of wallets, on-chain, today.

Under BAM Pre-Drain Exit Lane, all of them would have had a structural escape.


Why this directly maps to BAM (JIP-28)

The current Solana ordering primitive is a Veblen good: paying more does not buy priority, it only buys inclusion. This is fine for general MEV (which is fundamentally optional). It is structurally unfit for
defensive exits, where ordering is the product. I have spent 3 months empirically confirming this so the rest of the community does not have to.

After-3-months verdict on every approach available today:

  • Higher Jito tip — :cross_mark: Proven insufficient (Coco #2: $114 still loses to $0)
  • Direct TPU to leader — :warning: Leader-dependent, no cross-leader guarantee
  • Slot-before submission — :warning: Needs >1 slot of warning, breaks against same-slot bundle rugs
  • Frontrun bundle (rug + SELL together) — :cross_mark: Impossible, cannot include another wallet’s TX
  • BAM Pre-Drain Exit Lane (plugin) — :white_check_mark: The only structural fix

A BAM plugin can recognize defensive SELL intents and enforce ordering before pool-state-mutating instructions within the same slot. This is not new MEV — it is negative-MEV protection, exactly the kind of
public good BAM is meant to enable.

It complements JIP-15 (MEV Blacklist) by adding a positive guarantee on top of the negative one: the blacklist removes the worst extractors, the Exit Lane gives victims a structural escape.


What I’m asking

  • Technical review of a Pre-Drain Exit Lane plugin design — happy to share the draft spec and PoC privately.
  • Mainnet BAM access to test the plugin under real conditions.
  • Bridge to the Grant Committee — Phase 1 (alerts, shippable today) can self-fund via subscription; Phase 3 (BAM-backed guaranteed defensive exits) is the public-good piece that needs BAM access and Jito
    coordination.

I am not asking for BAM funding. I am showing — with 3 months of on-chain failure data — why BAM is the only path to delivering a defensive guarantee retail holders can actually rely on.

GitHub repo with full data, scripts, and Solscan links:

Happy to deep-dive — DM or reply here.

-– wicode06