FillQualityAnalyzer
FillQualityAnalyzer scores every completed fill on price slippage, execution latency, and post-fill toxicity relative to the original intent.
What it does
FillQualityAnalyzer scores every completed fill on price slippage, execution latency, and post-fill toxicity relative to the original intent. Low-scoring fills generate WARN annotations; systematic poor scores feed back to strategy tuning.
Pipeline placement
Applies to: Every completed fill event emitted by OrderLifecycleManager
Why it matters
| If this fails | Consequence |
|---|---|
| Slippage not tracked per fill | Execution costs compound silently; strategy returns eroded without visibility into the cause. |
| Post-fill toxicity not measured | The system continues submitting orders on markets with chronic adverse selection, accumulating losses. |
| Fill latency not profiled | Slow fills on fast-moving markets indicate queue-position issues that smarter order type selection could fix. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| CLOB V2 trade tape — last 100 fills on market | ws_market | required | Compute post-fill mark drift over toxicity_horizon_s for toxicity score. |
| Market mid at time of fill (top-of-book snapshot) | clob_public | required | Compute arrival mid for slippage calculation. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| ExecutionReport (FILLED) from OrderLifecycleManager | exec.orderlifecyclemanager | required | Source fill price, size, intent price, and submit_ms for all score dimensions. |
| Original DecisionReport (intent price) | strat layer via internal bus | optional | Compare fill price against decision-time price to compute decision-to-fill slippage. |
Authority
What this bot is permitted to do
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
| Code | Severity | Meaning | Action |
|---|---|---|---|
| FILL_QUALITY_PASS | INFO | Fill quality score >= min_score_for_repeat on all dimensions. | Emit annotated ExecutionReport; no further action. |
| FILL_QUALITY_BELOW_THRESHOLD | WARN | Overall fill score below min_score_for_repeat. | Annotate ExecutionReport; emit WARN to strategy layer. |
| FILL_QUALITY_CRITICAL | HARD_REJECT | Overall fill score below 0.2 — severe slippage, latency, or toxicity. | Emit HARD_REJECT; alert risk pipeline. |
| FILL_SLIPPAGE_ELEVATED | WARN | Slippage exceeded warn_threshold_bps. | Annotate ExecutionReport. |
| FILL_QUALITY_TOXICITY_UNAVAILABLE | WARN | Post-fill trade tape unavailable; toxicity_score not computed. | Omit toxicity_score from overall; note in ExecutionReport. |
Related bots in Execution
Used by
Reverse index — strategies that currently reference exec.fillqualityanalyzer. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| Crypto Q2 — basket rebalance | frozen | last triggered 3m ago |
Showing 1 of 1 · 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 →