⚠ 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

OracleRiskMonitor

risk.oracleriskmonitor
Risk Guardrail live General live frozen reference impl flagship

OracleRiskMonitor watches the UMA Optimistic Oracle queue for proposals and active disputes on markets where open positions exist.

What it does

OracleRiskMonitor watches the UMA Optimistic Oracle queue for proposals and active disputes on markets where open positions exist. When a market enters a resolution proposal or a dispute window, the bot can block new orders on that market, require reduced size, or flag a position for review. It protects against the scenario where a trade is submitted into a market moments before a contested resolution flips the outcome. It never overrides the strategy intent or changes the direction of an order — it only controls whether and how much the order is permitted to proceed.

Pipeline placement

runs after: Strategy OrderIntent OracleRiskMonitor runs before: ExecutionPlan emit

Applies to: Every OrderIntent on markets that use the UMA Optimistic Oracle for resolution

Why it matters

If this failsConsequence
Trading into an active oracle disputeA position opened after a dispute was filed may be immediately underwater if the dispute resolves against the expected outcome; the resolution risk was not priced in.
Holding a full position through the proposal windowMarkets entering their proposal phase have uncertain resolution timing. Holding full size through this window increases exposure to a binary outcome that cannot be hedged once the proposal is live.
Stale oracle statusIf the oracle queue feed is unavailable, a strategy could open or increase a position without knowing a dispute is already active. The safe behaviour is to block, not to approve on missing data.
Neg-risk market definition shift during proposalOn neg-risk markets, the 'Other' outcome definition can shift if a proposal is disputed, potentially invalidating the expected payout structure.

Inputs

Polymarket inputs

InputSourceRequiredUse
Market resolution-source flag and dispute window metadataGamma APIrequiredIdentify whether the market uses the UMA oracle and retrieve the resolution window start and end times.
UMA Optimistic Oracle on-chain proposal and dispute eventsUMA Optimistic OraclerequiredDetect when a proposal has been submitted or a dispute has been filed for a market relevant to open positions or pending orders.
Open position list with market identifiersData APIrequiredCross-reference oracle events against markets where the account currently holds a position, to determine which events require action.
Neg-risk flag per marketGamma APIoptionalApply stricter reduce_at_proposal_pct on neg-risk markets, as definition shifts can affect multiple related markets simultaneously.

Internal inputs

InputSourceRequiredUse
Current position size per marketPortfolioGuardrequiredCalculate the maximum allowed position size after applying reduce_at_proposal_pct during the proposal window.
KillSwitch active flagKillSwitchrequiredIf KillSwitch is active, reject all orders without checking oracle status.

Authority

What this bot is permitted to do

Reject Reshape

State

Readiness

General live

Status

live

Class

Guardrail

Default mode

general_live

Developer owner

Polytraders core — Risk pod

Capital impact

Direct

Reason codes emitted

CodeSeverityMeaningAction
KILL_SWITCH_ACTIVEHARD_REJECTGlobal kill switch is active.Immediately return HARD_REJECT without oracle lookup.
STALE_MARKET_DATAHARD_REJECTOracle feed or market metadata is older than the staleness threshold.Return HARD_REJECT; retry on next fresh fetch.
ORACLE_DISPUTE_ACTIVEHARD_REJECTAn active UMA dispute is filed for this market; outcome is contested on-chain.Return HARD_REJECT if block_disputed=true.
ORACLE_RESOLUTION_PENDINGRESHAPEMarket is in the 2-hour UMA proposal window but no dispute has been filed yet.Return RESHAPE_REQUIRED with cap = reduce_at_proposal_pct * per_market_limit.
ORACLE_PROPOSER_BOND_BELOW_MINHARD_REJECTThe UMA proposer bond for this market is below the required 750 pUSD minimum, indicating a misconfigured or suspicious market.Return HARD_REJECT; log market_id and observed bond amount.
ORACLE_RESOLUTION_CONFIDENCE_DOWNGRADERESHAPEMarket is more than 50% through its proposal window; size cap is further reduced proportionally.Apply downgrade formula: cap = cap * (1 - proposal_fraction * 0.5).
ORACLE_NEGRISK_PROPOSAL_REDUCTIONRESHAPENegRisk market in proposal window; extra 20% size reduction applied due to definition-shift risk.Apply 0.8 multiplier to cap before emitting RESHAPE_REQUIRED.
ORACLE_DISPUTE_OVERDUEWARNDispute age exceeds max_dispute_window_h; escalation required.Emit WARN annotation and escalate to incident commander; continue blocking per block_disputed.

Used by

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

StrategyStateActivity
US Elect — book-builderdemo-wiredlast triggered 15m ago
NBA H2H — moneyline market-makedemo-wiredlast triggered 22m ago
US Elections — sentiment fadedemo-wiredlast triggered 29m ago

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

Why this matters

Risk Guardrail bots does NOT propose intents or sign orders; only permits or blocks. 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…