Ripple Engine

Prediction Market Cascade Analysis


Detecting probability shifts. Mapping correlated markets. Finding edge before the crowd.

The Problem & Solution

The Gap

Prediction markets don't reprice simultaneously. When "Trump tariffs on China this week" jumps from 40% to 65%, related markets — "China retaliatory tariffs by Sunday," "Fed emergency rate decision this week" — haven't moved yet.

That lag is the opportunity.

The Pipeline

Sentry PM + Kalshi 60s, crypto 60s, stocks 30s, RSS 120s, Bluesky 300s, whales 180s, PM Velocity 300s
Screener Filters ~200 market catalog down to ~20 relevant candidates
Strategist L1-L2-L3 deep analysis with extended thinking
Auditor Validates picks against Polymarket, Kalshi, Coinbase & Yahoo Finance

Three Layers of Analysis

L1 — Trigger

The shift that started it all.

e.g. "Trump tariffs this week" 40%->65%

L2 — Direct

Obvious causal links. Event siblings auto-included.

e.g. "China retaliates by Sunday"

L3 — Non-Obvious

Hidden connections. Where the real edge lives.

e.g. "Fed emergency rate this week"

TRIGGER: "Trump tariffs on China this week" jumps 40% -> 65%

Event siblings (auto-detected): china-retaliatory-tariffs tariff-exemptions-friday
L2: sp500-drops-3pct-friday apple-down-5pct-this-week
L3: fed-emergency-rate-this-week bitcoin-above-70k-sunday

All picks are real Polymarket questions expiring within 7 days. Bet before the cascade reprices them.

Filtering the Noise

Not every price move is a real signal. The engine looks at how much money is behind a market to decide if a move matters.

$50k+ backed
3% threshold
A 3% move here has real money behind it. Trust the signal.
$10k-$50k
~6% threshold
Less money, so we need a bigger move to be confident.
Under $10k
9% threshold
One person buying a few contracts can move this. Probably noise.

These thresholds auto-tune based on historical performance when auto_tune is enabled.

Event-Aware L2 Selection

Polymarket already groups related questions into events. We use that for free.

POLYMARKET EVENT: "US-China Trade War"
TRIGGER Trump tariffs this week 65%
sibling China retaliates by Sunday 42%
sibling Tariff exemptions Friday 28%
sibling Trade deal by month-end 15%

How it works

When the trigger belongs to an event, the engine automatically pulls sibling markets from that event.

These are pre-curated L2 candidates — Polymarket's editors already decided they're related. No AI needed.

The AI still finds L3 non-obvious picks from the broader catalog — connections that aren't in the same event.

Faster L2, smarter L3, lower cost.

AI Models & Validation

Three Models, Each in Their Lane

Gemini 2.5 Flash — Summarizes what moved and why. Fast and cheap — the right tool for a quick briefing.

GPT-4o-mini — Scans 200 markets and filters to ~20 relevant ones. Costs 1/20th of what Claude would for the same job.

Claude Sonnet — Default strategist for the short list. Fast, cheap, and strong enough for most cascades — takes the routine shifts end-to-end.

Claude Opus — Escalates for high-liquidity or high-risk shifts. Extended-thinking mode finds the non-obvious L3 connections that humans and cheaper models miss.

Trust but Verify

AI can hallucinate — it might suggest a market that doesn't exist. The Auditor checks every single pick against live Polymarket, Kalshi, Coinbase and Yahoo Finance data:

  • Does this market actually exist?
  • Is it still active and tradeable?
  • What's the current Yes/No price?
  • Enough liquidity to enter a position?
  • When does it expire?

Every recommendation is verified real and tradeable — never a hallucination.

Cross-Source Cascades

Shifts ripple across asset types. The engine detects signals on one source
and finds correlated picks on others — before the market catches up.

Polymarket Coinbase
▼ Iran regime fall probability drops 8%
Geopolitical instability increases...
CRYPTO:BTC-USD ▲ bullish
CRYPTO:ETH-USD ▲ bullish
"Flight to crypto as geopolitical hedge"
Coinbase Polymarket
▼ BTC crashes 5% in a minute
Risk-off sentiment spreading...
fed-emergency-rate-cut ▲ bullish
sp500-drops-3pct-friday ▲ bullish
CRYPTO:SOL-USD ▼ bearish
"BTC crash cascades to altcoins and macro markets"

4 market sources + 4 pre-movement signals (Polymarket, Kalshi, Coinbase, Yahoo Finance + RSS news, Bluesky social, whale trades, PM trade-velocity)
Crypto 60s · Stocks 30s · Prediction markets 60s · News 120s · Whales 180s · Social 300s · PM Velocity 300s (opt-in)

Selected Pre-Movement Triggers

Two of four pre-movement signal sources (RSS news + Bluesky social shown here; Polymarket whale trades and PM trade-velocity spikes use the same cascade).
These fire before Polymarket reprices — embedding-match headlines and posts to the catalog, then run the shared Screener -> Strategist -> Auditor cascade.

RSS News Polymarket
whitehouse.gov/news/feed — "Iran blockade of Strait of Hormuz"
Gemini embedding matches the headline to a Polymarket market before it reprices — the only source that fires ahead of the move, not after.
7 feeds polled @ 120s
Fed, White House, State Dept, SEC, BBC, NYT, WH actions
Similarity threshold 0.68
Dedupe by headline ID · fires same Screener → Strategist cascade
Bluesky Polymarket
@bloomberg.bsky.social, @reuters.bsky.social + 4 more — "Emergency NSC meeting called on Gulf tanker incident"
Same Gemini embedding path as news, but reads from a curated Bluesky allowlist — a post from a high-signal account fires the cascade before Polymarket reprices.
Per-handle allowlist @ 300s
Policy · macro · financial journalists
Public Bluesky API, no OAuth
Free, rate-unlimited, same dedupe + catalog match as RSS

10% take-profit on prediction markets (or hold to settlement via configurable hold strategies) · 3% take-profit · 3-4% stop-loss on crypto & stocks

How Picks Are Determined

The Strategist assigns a direction to every L2/L3 pick.
The Auditor then validates each pick and calculates the trade.

1. Shift Detected
L1 trigger market moves past threshold
2. Strategist Picks
Claude assigns direction per market:
bullish or bearish
3. Auditor Validates
Checks each pick exists,
fetches live price & liquidity
4. Trade Calculated
Shares, cost, profit potential
computed per pick type
Bullish Pick

The engine believes the probability will go up (or the asset will increase in price).

Prediction markets: Buy Yes shares

Crypto/Stocks: Buy the asset (long)

Bearish Pick

The engine believes the probability will go down (or the asset will decrease in price).

Prediction markets: Buy No shares

Crypto/Stocks: Sell / short the asset

Picks with "mixed" direction are automatically skipped — no actionable trade without a clear signal.

Investing by Pick Type

Polymarket
BuyYes shares (bullish) or No shares (bearish)
ProfitShares pay $1 each if correct; lose investment if wrong
Exit10% take-profit, or hold to settlement
Buy Yes at $0.40 → 250 shares → +$150 if correct
Kalshi
BuyYes or No contracts (same mechanics as Polymarket)
ProfitContracts pay $1 each if correct; lose investment if wrong
Exit10% take-profit, or hold to settlement
Buy No at $0.30 → 333 contracts → +$233 if correct
Crypto via Coinbase
BuyFractional coins at market price
P&LPercentage-based (no $1 settlement)
Exit+3% take-profit · -3% crypto / -4% stocks stop-loss
$100 of BTC at $71.5k → hits $73.6k → +$3 take-profit
Stocks via Yahoo Finance
BuyFractional shares at market price
P&LPercentage-based (no $1 settlement)
Exit+3% take-profit · -3% crypto / -4% stocks stop-loss
$100 of AAPL at $182 → hits $187.50 → +$3 take-profit
RSS News trigger source, not a pick type Headlines embedding-match a Polymarket market as the L1 trigger, then the Strategist cascades across all four pick types above.

Kelly-sized per pick (legacy flat mode: $100/pick) · Prediction markets 10% TP (+ hold-to-settlement) · Crypto 3% TP / 3% SL · Stocks 3% TP / 4% SL

Cost & Edge

Operating Cost (tracked from SDK)

ComponentPer ShiftMonthly
Gemini (summary + relevance)<$0.0002~$0.02
GPT-4o-mini (screener)~$0.0006~$0.40
Claude Sonnet (strategist, default)~$0.03~$5-10
Claude Opus (strategist, escalated)~$0.19~$90-110
Polymarket + Kalshi + Coinbase APIsFree$0
Total~$95-110/mo

Real cost logged per API call from SDK responses, visible on the History tab. Range depends on shift frequency (1-5 per day typical).

The Edge

30-300s poll cadence (per source)
7d max market window
3 layers of analysis
4 agents, 3 AI models

Detect a shift, analyze the cascade, and place bets — all before the crowd catches up.

Analytics & Optimization

SQLite Backend

WAL mode — dashboard reads never block sentry writes
22 normalized tables — every shift, pick, API call, and headline logged
Auto-migration from JSON on first run

Backtesting & Tuning

SQL-based win rate, profit factor, by source/layer
Grid search threshold simulation over 5 parameters
Auto-tune on startup via config flag

Hold Strategies

Near expiry — skip take-profit within 48h of resolution
High confidence — hold when price > 85% directional

Self-Improvement Loop

Strategist sees last 50 picks' win rate + P&L per layer
Nightly grader scores resolved chains for failure patterns
Periodic GPT-4o-mini audit sweep catches missed connections
Dashboard surface — 14 destinations (sidebar nav with grouped sub-tabs)
Overview Polymarket Kalshi Markets Signals Bankroll Open Picks Reasoning History Data Settings Roadmap Audit Sweep Features
Live prices, chain history, bankroll ledger, roadmap curation, and config editing all in one surface.

Ripple Engine

Prediction Market Cascade Analysis

SentryGemini 2.5 Flash
->
ScreenerGPT-4o-mini
->
StrategistClaude Sonnet / Opus
->
Auditor4 Data Sources

53 modules · 1955 tests · SQLite backend · Backtesting & auto-tuning · Nightly Strategist self-grading · Periodic GPT-4o-mini audit sweep

Watch one market. Predict the cascade. Bet on the ripple.