60s poll's ~39s avg detection lag is slippage the copy edge pays; push is
~3s (paper-measured). fly.live.toml gains http_service + /health check
(self-heal); start.sh live role switches on ALCHEMY_SIGNING_KEY like paper
(poll fallback intact; push mode keeps the 60s heartbeat + 5min backstop
poll). sync_webhook.py syncs BOTH webhooks (alchemy_webhook_id_live).
watchdog.yml probes both apps; a disarmed live app paging is expected.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
py-clob-client is archived; the CLOB rejects its orders globally. New
LedgerLiveExecutor: SecureClient.create(private_key) — deposit wallet
auto-resolves, no api_key at runtime; place_market_order FAK/FOK with
protected prices (quoted ±live.max_slippage_pct, default 5%, clamped to
[0.01,0.99]); fills parsed from AcceptedOrder (BUY: making=USD given,
taking=shares got; SELL reversed — semantics PROVEN by today's $5 round
trip: buy matched 7.35294 @ 0.68, sell matched 7.35 @ 0.67). Still never
raises into the trade loop. chain_cash_gap repointed at the deposit
wallet's pUSD (was the emptied legacy proxy → CASH≠CHAIN +24.73 alarm).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First live fill (2026-07-10, $5 @ 0.68 UFC 329 main): buy leg FILLED on the
unified SDK but the probe's fixed 3s wait beat the data-api indexer, so the
sell-back never ran. Probe now polls up to 60s; flatten_positions.py is the
standalone sell-everything utility (and the emergency flatten).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>
The $3 test slice landed as pUSD 3.00 (bridge did native→USDC.e swap then
the wrap itself, zero fees). Watch pUSD+USDC.e for delivery; zero USDC.e
residue is the success case (manual wrap kept only as fallback).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
On-chain forensics (2026-07-10): pUSD accepts native USDC by contract, but
the public CollateralOnramp has native USDC PAUSED (paused()=1) — the exact
cause of the direct-wrap revert. Bridge native→USDC.e (Polymarket Bridge,
the UI deposit flow, ~$0.005 on $24.73 per quote), then gasless
approve+wrap USDC.e→pUSD. Stage-gated: $3 test slice first.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Root cause of zero live placements: the FIRST two qualifying signals
(Kruto 21:21, badaf Epic 21:53) each CRASHED the bot inside the
unguarded live order path (machine events: exit_code=1 seconds after
each signal; tick-size rejection the likely thrower — price was rounded
to 3dp on 1c-tick books). Fly restarted it and boot baseline marked the
fresh trades seen-without-copying: crash -> restart -> trade eaten,
twice. Fixes: _order never raises (failures return ok:False and feed
the new missed-row instrumentation); tick-size-aware pricing (cached
get_tick_size, buys ceil / sells floor, 0.01 fallback valid on every
book); size floored to 2dp; per-wallet poll guard (parity with the push
handler); baseline exempts trades younger than the stale window so a
restart can never eat a copyable trade again. host/order_probe.py =
controlled end-to-end placement proof (~$2 round trip).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>