Polymarket KL Brain

proposed gating layer · filters directional_v1 by KL divergence
NOT BUILT POLYGON ← VOLIA
Live Telemetry — placeholders
KL Pass-Rate
awaiting first event
Fused Prob (latest)
awaiting first event
Drift Alert
awaiting first event
Events (lifetime)
0
since publisher start
KL gate · last 50 events (left = oldest, right = newest)
What this bot is supposed to do
  • Subscribe to directional_v1's per-trade signal and the live Polymarket order book; compute a fused probability p_fused from quant signals and a market mid p_market.
  • Compute KL divergence D_KL(p_fused || p_market) and gate the trade only if D_KL > threshold AND directional confidence agrees.
  • Emit one structured log line per decision — KL_GATE asset=BTC verdict=PASS|BLOCK fused=0.62 market=0.51 dkl=0.024 — that the existing publisher already knows how to parse (see scripts/update_polymarket_dash.py, lines that regex out KL_GATE / KL_HIT_RATE).
  • Run as sibling daemon next to directional_v1 on the London VPS so it sees the same log stream and same wallet context.
  • Publish state via the same Supabase slot bot-state/polymarket_kl.json — this dashboard is already wired to it. No frontend change required when it ships.
Reference history (NOT this bot)
Disclaimer. The numbers below are directional_v1's Wilson per-asset stats — the bot the KL Brain is meant to filter. They are shown only to motivate the KL gate (WR is well below break-even, so un-gated execution loses money). They are not the KL Brain's record. The KL Brain has zero events.
Asset
N
Wilson WR (95%)
Settled PnL
BTC
ETH
SOL
What's missing
  • Bot binary. No code under ~/.openclaw/workspace named kl_brain / polymarket_kl.
  • Log emitter. directional_v1's source has no KL_GATE tracing macro.
  • Publisher slot. update_polymarket_dash.py already regex-parses KL_GATE lines and KL_HIT_RATE summaries — wired and waiting.
  • Storage slot. Supabase bot-state/polymarket_kl.json exists and is upserted every 60 s by com.neo.bot-dash-populator.
  • Dashboard. This page (auto-fills on first event).
  • Threshold calibration. Pick KL cutoff that historically would have blocked the BTC/ETH/SOL losses without killing the wins. Backfill on vault/research/decision-log/summary.json.
  • Live deploy. Spawn the daemon next to directional_v1 on the London VPS.
Wiring
Publisher
com.neo.bot-dash-populator (60 s)
Source script
scripts/update_polymarket_dash.py
Updated (Supabase)
Drift alert
Publisher note