⚠ 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

SelfTradeWashGuard

risk.self_trade_wash_guard
Risk Guardrail planned Spec ready frozen

Prevents Polytraders from trading against itself.

What it does

Prevents Polytraders from trading against itself. If an outgoing OrderIntent would cross with one of our own resting orders on the same market and outcome, SelfTradeWashGuard rejects it (full overlap) or downsizes it (partial overlap). This protects against wash-trade exposure and inadvertent self-fills.

Pipeline placement

runs after: exec.order_lifecycle_manager SelfTradeWashGuard runs before: exec.smart_router

Applies to: Per OrderIntent

Why it matters

If this failsConsequence
Wash-trade liabilityCrossing your own orders is treated as wash trading by most regulators and by Polymarket's own terms; even unintentional self-trades are a compliance risk.
Inventory churnSelf-fills move money from one account to another (or from one strategy book to another) while paying maker+taker fees both sides — pure deadweight loss.
Strategy interferenceTwo Polytraders strategies disagreeing on direction should not silently fund each other's positions through self-fills.

Inputs

Polymarket inputs

InputSourceRequiredUse
Outgoing OrderIntent (price/size/side/market_id/outcome)Strategy botrequiredThe order under review.
Resting orders snapshot (ours)OrderLifecycleManagerrequiredAll currently-resting Polytraders orders, indexed by (market_id, outcome_id, side).

Internal inputs

InputSourceRequiredUse
OrderLifecycleManager stateexec.order_lifecycle_managerrequiredSource of truth for our own resting book.

Authority

What this bot is permitted to do

Reject Downsize

State

Readiness

Spec ready

Status

planned

Class

Guardrail

Default mode

shadow

Developer owner

Risk pod

Capital impact

Direct

Reason codes emitted

CodeSeverityMeaningAction
RISK_SELF_TRADEP1Risk Self TradeSee decision output and developer log for context.
RISK_SELF_TRADE_DOWNSIZEDP1Risk Self Trade DownsizedSee decision output and developer log for context.

Used by

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

StrategyStateActivity
NBA props — line-shopdemo-wiredlast triggered 44m ago

Showing 1 of 1 · 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…