PostTradeExplainer
PostTradeExplainer turns every fill into a plain-English SettlementReport: which strategy, which signal, which guard checks passed, why this size, why
What it does
PostTradeExplainer turns every fill into a plain-English SettlementReport: which strategy, which signal, which guard checks passed, why this size, why this price. Retained 7 years for regulatory compliance.
Pipeline placement
Applies to: Every filled or partially filled order
Why it matters
| If this fails | Consequence |
|---|---|
| No post-trade explanation | Users and regulators cannot understand why a trade was made; compliance audit fails. |
| Explanation not linked to fill | Fill records and strategy intent cannot be reconciled; audit trail is broken. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Fill confirmation from CTFExchangeV2 | clob_auth | required | Consume fill metadata (size, price, side, builder_fee_pusd) for the explanation. |
| ExecutionReport envelope | internal.report_bus | required | Source of the full order lifecycle context for the explanation. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| DecisionReport for the originating intent | internal.report_archive | required | Fetch strategy name, signal inputs, and parameter values at decision time. |
| RiskVote record for the originating intent | internal.report_archive | required | Include guardrail votes in the explanation. |
Authority
What this bot is permitted to do
State
Readiness
Spec started
Status
planned
Class
Governance Service
Default mode
shadow_only
Developer owner
Polytraders core
Capital impact
Indirect
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| TRADE_EXPLAINED | INFO | A fill was successfully explained and a SettlementReport emitted. | Log and store. |
| EXPLANATION_ARCHIVE_UNAVAILABLE | WARN | DecisionReport or RiskVote could not be fetched; partial explanation emitted. | Emit partial SettlementReport with explanation_complete=false. |
| RETENTION_BELOW_REGULATORY_MINIMUM | WARN | retain_explanation_days is below 2555 (7 years). | Emit WARN; do not reduce retention. |
| EXPLANATION_MISSING_GUARD_VOTES | WARN | RiskVote records not found for the fill; explanation is incomplete. | Emit partial explanation; flag explanation_complete=false. |
| KILL_SWITCH_ACTIVE | WARN | KillSwitch was active at fill time; noted in explanation. | Include kill-switch note in explanation. |
Related bots in Governance & Ops
Used by
Reverse index — strategies that currently reference gov.posttradeexplainer. 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 24m ago |
Showing 1 of 1 · demo-wired ≠ production-live
Why this matters
Governance & Ops bots does NOT propose, approve, or block trades; only observes and reports. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →