⚠ INTERNAL — Operator UX mock · Design preview of V2 development path · demo-wired ≠ production-live · back to dev guide
Polygon · pUSD 10
📓 Developer Guide 📋 Reason Codes 📈 Shadow Mode
JD John Doe · Admin

LatencyProfiler

exec.latencyprofiler
Execution planned Spec started frozen

LatencyProfiler continuously measures round-trip order submission latency by route and surfaces regressions.

What it does

LatencyProfiler continuously measures round-trip order submission latency by route and surfaces regressions. It probes each configured route at probe_interval_s and emits ObservationReports when p95 or p99 thresholds are breached.

Pipeline placement

runs after: Order submission and fill events from ws_user LatencyProfiler runs before: Any exec bot that uses latency data for routing decisions

Applies to: All CLOB V2 order submission and ws feed routes continuously

Why it matters

If this failsConsequence
Latency regression undetectedStrategy signals age past their TTL in transit, causing stale-signal discards and missed opportunities without a clear root cause.
Route not profiled per endpointA degraded CLOB endpoint continues to receive orders because the routing layer lacks per-route latency data.
WebSocket lag not trackedws_user fill events arrive late, causing order lifecycle state to be updated with significant delay.

Inputs

Polymarket inputs

InputSourceRequiredUse
CLOB V2 order submission endpoint (probe orders)clob_authrequiredMeasure submit-to-ack latency per endpoint.
WebSocket user feed heartbeatws_userrequiredMeasure ws feed lag by comparing heartbeat timestamp to local clock.

Internal inputs

InputSourceRequiredUse
Probe trigger from schedulerinternal schedulerrequiredTrigger a latency probe on each configured route every probe_interval_s.

Authority

What this bot is permitted to do

Reshape

State

Readiness

Spec started

Status

planned

Class

Execution Utility

Default mode

shadow_only

Developer owner

Polytraders core — Execution pod

Capital impact

Direct

Reason codes emitted

CodeSeverityMeaningAction
LATENCY_OKINFOAll probed routes within p95 and p99 thresholds.No alert; emit metrics only.
LATENCY_WARNWARNp95 latency exceeded warn_p95_ms on a probed route.Emit ObservationReport with WARN; do not block orders.
LATENCY_HARD_BREACHHARD_REJECTp99 latency exceeded fail_p99_ms; route flagged as degraded.Flag route degraded; notify exec bots; alert ops.
PROBE_TIMEOUTWARNProbe request timed out; recorded as max latency (1000ms) in rolling window.Record max latency; check for 3 consecutive timeouts before HARD_REJECT.

Used by

Reverse index — strategies that currently reference exec.latencyprofiler. If you change this bot's authority or reason codes, these strategies must re-pass shadow.

StrategyStateActivity
Fed Rates — surprise driftfrozenlast triggered 22m ago
AI Frontier — release-day takerfrozenlast triggered 29m ago
NBA props — line-shopdemo-wiredlast triggered 36m ago

Showing 3 of 3 · demo-wired ≠ production-live

Why this matters

Execution bots does NOT propose new positions; only routes and shapes approved intents. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →
Polytraders Operator UX Mock · INTERNAL · demo-wired ≠ production-live · the plan · reason codes · shadow-mode pipeline
⚙ Page Configuration
Current page settings
Loading configuration…