pam ▸ docs/pam_production_readiness_2026-05-24.md
updated 2026-05-30

Pam Production Readiness Brief - 2026-05-24

Executive readout

Pam is not ready for autonomous live trading.

The repository still contains a cross-venue Kalshi/Polymarket arbitrage path, but the current production-safe landing point is an observe, journal, alert, and manual-review system. Automated execution should remain disabled until exchange clients, order semantics, capital accounting, partial-fill handling, and deployment topology are corrected and verified against live canary tests.

Remediation pass - 2026-05-24

Code-level blockers unblocked:

Current post-fix verification:

Where the arbitrage strategy stands

Pam is still looking at arbitrage between Kalshi and Polymarket in code:

The current live evidence does not support production auto-execution:

Practical landing point: keep cross-venue arbitrage as a research and discovery track, keep Kalshi ladder arbitrage as an alert-only scanner, and make Pam’s near-term production surface a monitored candidate-review system with no auto-execution.

Production blockers

  1. Exchange API contracts are stale or incomplete. - Kalshi balance is currently requested from /account/, but current Kalshi docs show GET /trade-api/v2/portfolio/balance. - Kalshi event-market order creation now uses POST /trade-api/v2/portfolio/events/orders with V2 fields such as ticker, side, count, price, and time_in_force. - Kalshi orderbook docs show GET /trade-api/v2/markets/{ticker}/orderbook; Pam’s overlap/liquidity code expects a get_market_orderbook method that does not exist in execution/kalshi_api.py. - Polymarket discovery and trading are partly coupled to private-key CLOB auth. Public market/orderbook reads should not fail because trading credentials are absent or invalid.

  2. Live execution is not atomic enough for arbitrage. - arbitrage/arbitrage_executor.py has a placeholder branch for real order placement in _place_order_with_retry. - Two-leg execution is sequential and partial-fill recovery is not a real hedge/unwind workflow. - Polymarket place_order() returns pending, while the executor checks for filled, so live status semantics are inconsistent.

  3. Capital and balance checks are not production-grade. - Kalshi balance lookup failed with a 404 during the sweep. - Polymarket account balance returns a placeholder value. - The overlap report could not compute a reliable capital split.

  4. Journaling and review freshness need tightening. - A fresh trade-candidates --no-journal scan produced current rows in output, but candidate review still read stale journaled rows and blocked them with scan_age_sec>900. - Production candidate review needs a single source of truth for scan freshness.

  5. Deployment is web-only. - render.yaml starts gunicorn app:app. - There is no separate production worker service for schedulers, research loops, overlap watchers, or ladder daemons.

  6. Dashboard and secrets need hardening. - app.py still has fallback admin credentials and a fallback secret key. - render.yaml sets a static admin username/password. - Dashboard code references Polymarket methods that do not exist on the current client.

  7. Dry-run/live separation needs cleaner accounting. - Status and dry-run flows can create arbitrage trade records, so headline counts do not clearly separate simulated, review, paper, and live executions.

Phase 1 should be production monitoring, not trading:

Phase 2 can add manual approvals:

Phase 3 is automated execution, only after live canaries and manual approvals have run cleanly for a sustained period.

Verification performed

Primary source checks