DuplicateMarketDetector
Detect semantically identical or dangerously overlapping Polymarket markets to prevent accidental correlated exposure and to surface cross-market arbi
What it does
Detect semantically identical or dangerously overlapping Polymarket markets to prevent accidental correlated exposure and to surface cross-market arbitrage opportunities. Emits ObservationReports tagging each duplicate cluster with a similarity score.
Pipeline placement
Applies to: All active Polymarket markets with similar question text or resolution criteria
Why it matters
| If this fails | Consequence |
|---|---|
| Duplicate markets not detected | A strategy may take independent positions on two semantically identical markets, creating unintended double exposure that bypasses position-size limits. |
| Near-duplicate neg-risk bundles missed | Neg-risk outcome tokens across overlapping events can create correlated risk that is not visible from individual market inspection alone. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Market title, rules text, resolution source, and resolution date | Gamma API | required | Primary inputs for NLP-based semantic similarity computation. |
| Condition_id metadata and outcome-token list | Gamma API | required | Identify neg-risk bundles that share outcome tokens across events. |
| Neg-risk flag and enableNegRisk status | Gamma API | optional | Apply enhanced overlap detection for neg-risk market groups. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| MarketScanner candidate list | disc.marketscanner | required | Scope duplicate detection to tradable markets only. |
| KillSwitch active flag | risk.kill_switch | required | Suppress emissions when KillSwitch is active. |
Authority
What this bot is permitted to do
State
Readiness
Spec started
Status
planned
Class
Signal Service
Default mode
shadow_only
Developer owner
Polytraders core — Intelligence pod
Capital impact
Indirect
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| DUPLICATE_DETECTED | INFO | Two or more markets have been clustered as semantically identical. | Emit ObservationReport with cluster details; downstream bots use this to suppress correlated positions. |
| POTENTIAL_OVERLAP | WARN | Markets are similar but not identical; similarity between warning and default threshold. | Emit ObservationReport with POTENTIAL_OVERLAP annotation. |
| LARGE_CLUSTER_WARN | WARN | Cluster exceeds max_cluster_size, suggesting a data quality issue. | Emit with LARGE_CLUSTER_WARN flag; escalate for manual review if require_manual_review=true. |
| STALE_MARKET_DATA | HARD_REJECT | Gamma API or embedding model unavailable; detection cycle halted. | Halt cycle; retry on next interval. |
| KILL_SWITCH_ACTIVE | HARD_REJECT | KillSwitch is active; all emissions suppressed. | Return immediately. |
Related bots in Market Discovery
Used by
Reverse index — strategies that currently reference disc.duplicatemarketdetector. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| US Elections — sentiment fade | demo-wired | last triggered 14m ago |
Showing 1 of 1 · demo-wired ≠ production-live
Why this matters
Market Discovery bots does NOT propose or execute trades; only scores and ranks. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →