CrossMarketGraph
CrossMarketGraph builds and maintains a directed graph of semantically equivalent and logically linked Polymarket markets by embedding market titles a
What it does
CrossMarketGraph builds and maintains a directed graph of semantically equivalent and logically linked Polymarket markets by embedding market titles and rules text, applying cosine-similarity clustering, and supplementing with manual override pairs. Each node is a condition_id; each edge carries a relation_type (SAME_EVENT, COMPLEMENTARY, NEG_RISK_SIBLING, SUPERSEDES) and a confidence score. The graph is the foundation for cross-market correlation signals used by SumToOneArb and liquidity-aware strategies to detect near-duplicate markets and hedge opportunities. CrossMarketGraph is strictly read-only — it never submits or signs orders.
Pipeline placement
Applies to: All live Polymarket markets with active conditions
Why it matters
| If this fails | Consequence |
|---|---|
| Near-duplicate markets not detected | SumToOneArb cannot identify arbitrage opportunities where two markets resolve the same event; edge goes unexploited and probability discrepancies persist. |
| Stale graph used during rapid market creation spree | New markets linked to a live event are not added to the graph in time; strategy enters both sides of a newly duplicated market, creating an unintended hedge. |
| Neg-risk siblings not identified | Strategy holds positions on multiple outcomes of the same neg-risk event without knowing they are structurally linked, over-exposing the book to a single resolution. |
| Incorrect SUPERSEDES edge causes stale-market entry | A superseded market is incorrectly treated as live; strategy generates an intent for a market that has already been replaced by an updated version. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Market titles, rules text, condition IDs, neg_risk flag, enable_neg_risk flag | Gamma API | required | Primary input for embedding and metadata-based graph construction. |
| Market active/closed/resolved status | Gamma API | required | Filter out closed or resolved markets from graph nodes; mark SUPERSEDES edges for replaced markets. |
| 24-hour trading volume and book depth per market | data_api / clob_public | optional | Annotate graph nodes with liquidity metadata for downstream strategy weighting. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Manual pair override list | config / operator overrides | optional | Inject known-linked pairs with forced confidence=1.0 regardless of embedding similarity. |
| KillSwitch active flag | KillSwitch | required | Continue computing graph updates but suppress ObservationReport emissions when KillSwitch is active. |
Authority
What this bot is permitted to do
State
Readiness
Limited live
Status
beta
Class
Signal Service
Default mode
limited_live
Developer owner
Polytraders core — Intelligence pod
Capital impact
Indirect
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| CROSSMARKETGRAPH_SAME_EVENT_EDGE | INFO | Two markets linked as SAME_EVENT: titles or rules text highly similar (confidence >= cluster_threshold). | Emit ObservationReport; SumToOneArb and strategies consume edge for arb detection. |
| CROSSMARKETGRAPH_NEG_RISK_SIBLING | INFO | Two neg-risk markets share a parent condition; linked as NEG_RISK_SIBLING. | Emit ObservationReport; strategies aggregate combined neg-risk exposure across siblings. |
| CROSSMARKETGRAPH_DENSE_CLUSTER | WARN | A node has > 80% of max_edges_per_node edges; potential event-cluster explosion. | Include in ObservationReport warnings; alert Intelligence pod lead for review. |
| CROSSMARKETGRAPH_SUPERSEDES_EDGE | WARN | A closed market is superseded by a new active market (similarity > 0.95). | Emit ObservationReport with relation_type=SUPERSEDES; downstream strategies prefer the new market. |
| STALE_DATA | WARN | Gamma API unavailable for > 2× rebuild_interval_s; graph is frozen at last snapshot. | Halt ObservationReport emissions; log STALE_DATA; alert on-call. |
| KILL_SWITCH_ACTIVE | HARD_REJECT | KillSwitch active; ObservationReport emissions suppressed. | Continue computing graph updates but suppress all emissions. |
| PARAMETER_CHANGE_REQUIRES_APPROVAL | HARD_REJECT | A parameter change violates a locked bound (e.g. cluster_threshold < 0.65 or rebuild_interval_s < 30). | Reject config change; do not apply. |
| CROSSMARKETGRAPH_EMBED_FAILURE | WARN | Sentence-embedding model failed to encode one or more markets; those markets excluded from this rebuild. | Log with condition_id; skip affected markets; retry on next cycle. |
Related bots in Intelligence
Used by
Reverse index — strategies that currently reference intel.crossmarketgraph. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| NBA H2H — moneyline market-make | demo-wired | last triggered 37m ago |
Showing 1 of 1 · demo-wired ≠ production-live
Why this matters
Intelligence bots does NOT propose, veto, sign, or execute any trade. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →