4 Commits

Author SHA1 Message Date
jaxperro fb945be2e4 T0 detection: RTDS trade stream listener (~1s, wallet-attributed)
Polymarket's real-time data socket (wss://ws-live-data.polymarket.com,
topic activity/type trades — undocumented but official: powers the site's
live feed, spec'd in Polymarket/real-time-data-client) streams every
platform trade with proxyWallet attribution. Probe 2026-07-10: median
0.8s delivery over 22k msgs, ~45/s at peak, zero drops in 45 min.

RtdsListener: unfiltered subscribe (server-side filters broken, RTDC#34),
client-side Set E match → the same on_wallet_activity funnel as the
Alchemy push (locks internally). Capped-backoff reconnect forever; if the
lib or stream is missing, detection degrades to the existing backstops
(Alchemy ~3s, 300s poll, reconcile janitor) — never to zero. Heartbeat
shows 'rtds up Ns' / '⚠ rtds down'. Paper role: ON by default (24h shadow
run starts now). Live role: OFF until the shadow validates —
RTDS_DETECT=1 enables. 5 stub paths pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 18:23:41 -04:00
jaxperro 67d2c00843 fly image: add unified SDK; probe reads positions from client.wallet
polymarket-client==0.1.0b16 baked into the worker image (py-clob-client
stays for legacy read paths). Probe: drop the manual-wrap block (bankroll
already converted to pUSD via the bridge — the onramp pauses native USDC)
and stop reading positions from LIVE_FUNDER_ADDRESS (the emptied legacy
proxy); the SDK-resolved deposit wallet is the position holder now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 00:36:47 -04:00
jaxperro 0b9a5173fe fly: live deps in the worker image (LIVE_ROLLOUT 1.3)
py-clob-client==0.34.6 + web3==7.16.0, the versions preflight_live.py
was validated against. Paper path stays import-lazy/unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 22:49:47 -04:00
jaxperro b7b1487175 copybot: migrate Railway (US region, geo-blocked) -> Fly.io arn Stockholm
Polymarket geoblocks order placement by IP and Railway ran the worker in a
US region — fine for the paper bot (reads only) but a dead end for going
live. Fly arn (Sweden, unrestricted, ~25ms from the CLOB's eu-west-2
primaries) passes: geocheck VERDICT TRADABLE, pm geoblock blocked:false.

- host/geocheck.py: 3-probe geo-gate verdict (ipinfo, pm /api/geoblock,
  unauth CLOB order POST); --idle keeps a test machine up
- host/start.sh: geocheck at boot (GEOCHECK_ONLY=1 = probe-and-idle test
  mode, no second book-writer); warns loudly if a region is blocked
- fly.toml/fly.Dockerfile: wwf-copybot, single machine, http_service :8080
  for the Alchemy push webhook (now wh_blf4qjjvfdbqs9mc -> fly.dev domain)
- deploy_bot.sh: railway redeploy -> flyctl apps restart + banner wait

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 16:02:06 -04:00