Polytraders Dev Guide
internal
v3 spine Phase 1 · Shared contracts 9 demo-wired · 0 shadow-ready · 0 production-live · 100 pending · 109 total 15/33 infra tasks the plan status board
HomeBy ClassGovernance Service

Governance Service

15 bots · 5 live · 2 beta · 8 planned · 1 reference

Bots that log, explain, reconcile, and audit. They sit across the top of everything else and produce the artefacts the team and users need to trust the system. Governance never blocks; it explains.

Class rules

Bots in this class

Grouped by layer. Reference bots first, then live, then alphabetical within each layer.

Governance · 15 in this class

6.1 Governance LIVE
BuilderAttribution reference
BuilderAttribution tags every outgoing order with the Polytraders builder code before submission, logs each fill against the builder code, and reconciles the local fill log against the Polymarket builder-code report every 24 hours. If a discrepancy is detected — missing attribution, volume drift, or order counts that do not match — it quarantines the affected records and raises an alert. BuilderAttribution never submits, modifies, or cancels orders. Its authority is to explain and audit only.
Governance Service General live
6.6 Governance LIVE
Cron Runner
CronRunner maintains the authoritative cron schedule for the entire Polytraders system. It reads a declarative cron manifest (cron_expression per task, UTC), fires each task at the correct wall-clock moment, serialises concurrent firings into an ordered queue, and emits an OperationsReport heartbeat after each dispatch. CronRunner never executes strategy logic or touches the CLOB directly; it is purely a scheduling and dispatch service. Internal-only — no API surface beyond the internal bus.
Governance Service General live
6.2 Governance LIVE
Health & Heartbeat
HealthHeartbeat monitors the liveness of all 97 production bots by polling each bot's internal health endpoint at a configurable interval. If a bot misses missed_heartbeats_to_alert consecutive polls, HealthHeartbeat emits a page-severity alert and optionally triggers an auto-restart. It emits an OperationsReport after every sweep cycle summarising bot health across all layers. Internal-only — no external API surface.
Governance Service General live
6.3 Governance LIVE
PnL Reporter
PnLReporter reconciles all fill events into realised and unrealised P&L, denominated in pUSD. It reads fee from the fill's match event (not from the signed order — fees are operator-set at match time in V2). It accrues maker rebates (20–25% of fees, paid in pUSD, per market) and credits them against gross fees. It groups P&L by bot, market, and builder as configured. It emits a SettlementReport after every fill and on the configured window cadence for regulatory retention. PnLReporter is the authoritative post-trade ledger for all pUSD flows.
Governance Service General live
6.7 Governance LIVE
Portfolio Sync
PortfolioSync keeps the in-memory portfolio state — open positions and open orders — continuously synchronised with on-chain pUSD balances and CLOB open-order state. It reconciles the internal position store against clob_auth open orders and the Polygon on-chain balance every sync_interval_s. For negative-risk markets (NegRiskAdapter), it correctly aggregates multi-outcome positions using the negRisk flag. On discrepancy beyond discrepancy_alert_usd, it emits an alert and, if configured, pauses the affected strategy to prevent trading against a stale view of risk. Emits both a SettlementReport (position deltas) and an OperationsReport (sync health) on every cycle.
Governance Service General live
6.4 Governance BETA
Backtester
Backtester replays historical CLOB snapshots and the full report archive through the live execution path at tick resolution. It runs in replay mode (mode=replay), consuming archived ObservationReport, DecisionReport, RiskVote, ExecutionReport, and SettlementReport envelopes and re-executing the strategy under test against them. It emits replay-tagged OperationsReport records (and replay-tagged copies of every simulated report kind) to polytraders.reports.operations, partitioned by bot_slug+epoch, retained for 1 year. Backtester is used by the governance team to validate parameter changes, A/B test strategies, and produce audit-quality evidence before any strategy is promoted to live. Backtester never signs orders or touches the live CLOB.
Governance Service Limited live
6.5 Governance BETA
Paper-Trade Runner
Paper-Trade Runner mirrors every live signal against a simulated paper account in real time (mode=paper). It subscribes to the live CLOB order book and signal streams, runs the strategy under test through the full execution path, and simulates fills against the current order book snapshot without submitting any real orders. It is the mandatory pre-promotion environment for all new strategies. Paper-Trade Runner emits OperationsReport records (and paper-tagged copies of any report kind it simulates) to polytraders.reports.operations, partitioned by bot_slug+epoch, retained for 1 year. A strategy may only be promoted to limited live when Paper-Trade Runner has accumulated at least min_paper_days of continuous paper trading with require_positive_risk_adj=true passing. Paper-Trade Runner never signs orders, never submits to the CLOB, and never touches on-chain state.
Governance Service Limited live
6.14 Governance PLANNED
AttributionRevenueReporter
AttributionRevenueReporter reconciles builder-code rebates with internal fill records and publishes a daily auditable SettlementReport. Retained 7 years for financial and regulatory compliance.
Governance Service Spec started
6.9 Governance PLANNED
ExperimentTracker
ExperimentTracker manages shadow and limited-live A/B experiments, records matched-pair samples, computes confidence intervals, and emits a drift signal to StrategyRegistry when a variant underperforms.
Governance Service Spec started
6.11 Governance PLANNED
IncidentCommander
IncidentCommander coordinates halts, flattens, and post-mortems when a guard, monitor, or operator declares an incident. It records the incident timeline, dispatches auto-actions by severity, pages on-call, and tracks RCA completion.
Governance Service Spec started
6.10 Governance PLANNED
ParameterChangeAuditor
ParameterChangeAuditor intercepts every config edit across the Polytraders fleet, records what changed, who changed it, when, and the before/after values with replay-grade detail.
Governance Service Spec started
6.12 Governance PLANNED
PostTradeExplainer
PostTradeExplainer turns every fill into a plain-English SettlementReport: which strategy, which signal, which guard checks passed, why this size, why this price. Retained 7 years for regulatory compliance.
Governance Service Spec started
6.15 Governance PLANNED
SLAMonitor
SLAMonitor tracks service-level objectives committed to internally and to users, measures error-budget burn rate, and emits alerts when burn rate approaches the SLO budget limit. Retained 7 years as a compliance-grade availability record.
Governance Service Spec started
6.8 Governance PLANNED
StrategyRegistry
StrategyRegistry is the single source of truth for which strategy is at which lifecycle stage and under what authority. It stores stage metadata, promotion history, linked artefacts, and live-cap policy.
Governance Service Spec started
6.13 Governance PLANNED
UserActivityLedger
UserActivityLedger records every user-initiated action — strategy starts, parameter changes, halts, and overrides — as a SettlementReport, providing a per-user, per-session compliance ledger retained for 7 years.
Governance Service Spec started