KL
Polymarket KL Brain
proposed gating layer · filters directional_v1 by KL divergence
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_fusedfrom quant signals and a market midp_market. - Compute KL divergence
D_KL(p_fused || p_market)and gate the trade only ifD_KL > thresholdAND 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 (seescripts/update_polymarket_dash.py, lines that regex out KL_GATE / KL_HIT_RATE). - Run as sibling daemon next to
directional_v1on 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/workspacenamedkl_brain/polymarket_kl. - Log emitter. directional_v1's source has no
KL_GATEtracing macro. - Publisher slot.
update_polymarket_dash.pyalready regex-parses KL_GATE lines and KL_HIT_RATE summaries — wired and waiting. - Storage slot. Supabase
bot-state/polymarket_kl.jsonexists and is upserted every 60 s bycom.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_v1on the London VPS.
Wiring