For Agents

Living index of themes for this project. Each H2 is a topic; bullets are wikilinks to related notes. Updated by obsidian-documenter when documenting work. Read by historian at bootstrap. Topics kept alphabetical.

Autotrade Modes & Arming

Fee Model, MLM & Client Onboarding

  • pmv2-open-multi-wallet-liquidity-ceiling-brainstorm — OPEN brainstorm: book-depth liquidity ceiling caps profitable fills at ~1-2 wallets/signal → can’t onboard unlimited client wallets (levi/gyula/MLM) into same thin markets; constrains per-wallet fee_rate + fee-accounting engine; may need a per-market “capacity”/max-billable-wallets notion; fairness of lower-tier under-fill vs 20% fee

Multi-Wallet & Bankroll Isolation

  • pmv2-live-caps-are-advisory-not-blocking-2026-07-09 — the per-wallet advisory caps (total_exposure_cap_usd/daily_spend_cap_usd/max_open_positions/max_copies_per_event) are ALARMS not BRAKES on LIVE: fast_reserve (execute.rs:125) does a bare INSERT with no caps, evaluate_caps_post (execute.rs:133) runs in a spawn and only records a Telegram counter; caps are only synchronously enforced in reserve() (the DRY path). Current exposure LOW (20k vs $100–235 wallets); fix = fold caps into guarded reserve-INSERT CTE (babylon #1172)
  • pmv2-open-multi-wallet-liquidity-ceiling-brainstorm — OPEN brainstorm: fan-out (per-wallet durable consumer) has all wallets FAK the SAME thin book → adverse-selection cannibalization (deploy-confirmed 2026-07-08: 4.5× fan-out, 0×429s, first-Placed-later-fail); v1 mitigation = staggered priority tiers (feat/wallet-priority-tiers, per-wallet priority, Tier1 immediate / Tier2 +~400ms) orders contention but doesn’t beat the ceiling
  • pmv2-measure-before-mitigating-priority-tiers-2026-07-09 — the priority-tiers stagger was neutralized to TIER_DELAY_MS=0 after measurement showed it was harmful (levi/gyula ROI −7.3%/−7.6%); depth-cannibalization premise measured false
  • pmv2-pm-live-real-money-status-2026-07-02 — multi-wallet routing running live; backfill migration 20260701000200 copied config.modewallet1.mode=live
  • pmv2-sqlx-runtime-type-decode-bug-db-tests-2026-07-02wallet_handles_source routing gate bug that hard-falsed every source → skipped every entry fleet-wide
  • pmv2-multi-signer-wallet-2026-07-01 — wallet axis: N signer wallets per PM, pmv2_wallets registry (AES-256-GCM keys, per-wallet caps, size_scale), pmv2_source_wallets many-to-many routing, per-wallet durable consumers, advisory caps + single global breaker

Notifications & Telegram Output

Polymarket CLOB Execution

Portfolio & PnL (/wallets)

Infra & RPC Endpoints

Measurement, Latency & Method

  • pmv2-entry-config-cache-design-2026-07-09 — Zurich→Dublin ~183ms/round-trip; measured entry path (N=196): gates_ms median 733/p90 1179/p99 1914/max 2750ms, config reads the LARGEST controllable stage (>transit+book); 7 SELECTs not 4 (place_entry re-resolves mode after book, outside gates_ms) → true ~1.28s/entry; gates_ms==0 on 28% for the 12k-behind dry wallet (self-reinforcing backlog); sqlx test_before_acquire/min_connections=0 tax every cross-region query
  • pmv2-measure-before-mitigating-priority-tiers-2026-07-09 — RETRO: shipped priority-tiers stagger on a wrong “depth cannibalization” hypothesis; measurement showed 90.5% failures are price-moved-past-limit + emit→signal p50 2.31s pre-build latency → stagger neutralized TIER_DELAY_MS=0; measure before mitigating, instrument first (R0-R6 harness), watch for harmful mitigations, deploy-const-drift hazard
  • pmv2-open-multi-wallet-liquidity-ceiling-brainstorm — the measured VERDICT (price ceiling not depth) that overturned the tiering premise

Signer & On-Chain Wallets

Order Consumption & Source Resolution

Repo Conventions & Build

  • pmv2-entry-config-cache-design-2026-07-09 — do NOT add arc_swap/moka (absent from Cargo.lock, Dockerfile:24 builds cargo build --locked → breaks CI); use tokio::sync::watch (Receiver::borrow() is a cheap sync read); sqlx PgPoolOptions defaults test_before_acquire=true (ping/acquire) + min_connections=0 (TLS reconnect) = ~150ms/query cross-region
  • pmv2-live-caps-are-advisory-not-blocking-2026-07-09cargo test --features db-tests = 7 compile errors on main (mode_control_ledger.rs/consumer_ack.rs/ops_commands.rs never compiled since PositionManager::new gained agg; ops_commands.rs refs removed Command::Enable/Disable); a test that cannot compile is not protecting you and nothing tells you
  • pmv2-fak-no-match-reject-single-line-2026-06-30 — no comments/docstrings (seams are structural); CARGO_NET_GIT_FETCH_WITH_CLI=true; tests in #[cfg(test)] mod tests in execute.rs (155 passing)

Testing & Regression Safety

  • pmv2-live-caps-are-advisory-not-blocking-2026-07-09 — a test that cannot compile is not protecting you, and nothing tells you: live_cap_event_breach (asserts Skipped("cap:event")) is precisely the regression test for the advisory-caps bug but hadn’t compiled in months; 213 unit tests stayed green, only the money-path db-tests were dead, and CI doesn’t run them (need Docker/testcontainers) → green CI meant nothing. Same class as the sqlx decode bug — wire --features db-tests into CI
  • pmv2-entry-config-cache-design-2026-07-09 — three config-cache traps whose WRONG behavior passes the existing tests: hardcoded size_scale:ONE in decide3 (silent 1× orders), read-time clamp_size_scale moved to load (raw size_scale=100 → 100× order), empty boot snapshot reading FRESH; adversarial pre-build review caught them, not the test run
  • pmv2-measure-before-mitigating-priority-tiers-2026-07-09 — measure before mitigating: a plausible mechanism (depth cannibalization) is not evidence; instrument first (R0-R6 harness); a mitigation shipped on a wrong premise can make things worse (harmful stagger); deploy-const-drift: branch cut before TIER_DELAY_MS=0 still carried 400
  • pmv2-resolution-pnl-booking-verified-false-alarm-2026-07-03 — before assuming a PM PnL bug, re-verify against CLOB tokens[].winner directly (deploy’s re-check is authoritative); a #1031 “false losses” alarm was actually an upstream crypto Data Streams near-tie cross-ref artifact
  • pmv2-dry-run-verification-signals-2026-07-03 — verifying a new wallet in dry_run: trust DRY-SIGNED logs + dry N digest count, NOT empty pm_fak_attempts (live-only)
  • pmv2-sqlx-runtime-type-decode-bug-db-tests-2026-07-02 — sqlx runtime type-decode bugs compile fine + are invisible to offline tests; only real-Postgres testcontainers feature=db-tests (tests/wallet_fak_db.rs, anchor wallet_handles_source_regression) catches this class; wire into CI; --features db-tests full build blocked by ops_commands.rs drift → use --test

Schema & Contracts