⚠ 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

UserActivityLedger

gov.useractivityledger
Governance & Ops planned Spec started frozen

UserActivityLedger records every user-initiated action — strategy starts, parameter changes, halts, and overrides — as a SettlementReport, providing a

What it does

UserActivityLedger records every user-initiated action — strategy starts, parameter changes, halts, and overrides — as a SettlementReport, providing a per-user, per-session compliance ledger retained for 7 years.

Pipeline placement

runs after: Any user-initiated action: strategy start, parameter change, halt, override UserActivityLedger runs before: Nothing — runs on every user action event

Applies to: All user wallet sessions across the Polytraders platform

Why it matters

If this failsConsequence
No user activity ledgerRegulatory requests for user action history cannot be fulfilled; compliance audit fails.
User activity not linked to fillsIt is impossible to reconstruct which user action led to which trade; audit trail is broken.

Inputs

Polymarket inputs

InputSourceRequiredUse
None — UserActivityLedger consumes internal event stream onlyinternaloptionalN/A

Internal inputs

InputSourceRequiredUse
User action events from the platform event streaminternal.event_streamrequiredRecord every user-initiated action with wallet address, session ID, and action type.
ExecutionReport for fills linked to user sessionsinternal.report_busrequiredLink fills to the user session that initiated the strategy.

Authority

What this bot is permitted to do

Explain

State

Readiness

Spec started

Status

planned

Class

Governance Service

Default mode

shadow_only

Developer owner

Polytraders core

Capital impact

Indirect

Reason codes emitted

CodeSeverityMeaningAction
USER_ACTION_RECORDEDINFOA user action was recorded in the ledger.Log and emit SettlementReport.
ACTION_LINKED_TO_FILLINFOA user action was linked to a fill via trace_id.Update ledger record.
RETENTION_BELOW_REGULATORY_MINIMUMWARNretain_days < 2555.Emit WARN; refuse config change.
LEDGER_WRITE_FAILEDWARNPostgres write failed; event buffered in memory.Buffer; emit WARN; flush on reconnect.
KILL_SWITCH_ACTIVEWARNKillSwitch active; KillSwitch event recorded in ledger.Record kill-switch event as USER_ACTION.

Used by

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

StrategyStateActivity
US Elect — book-builderdemo-wiredlast triggered 25m ago
NBA H2H — moneyline market-makedemo-wiredlast triggered 32m ago

Showing 2 of 2 · 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 →
Polytraders Operator UX Mock · INTERNAL · demo-wired ≠ production-live · the plan · reason codes · shadow-mode pipeline
⚙ Page Configuration
Current page settings
Loading configuration…