⚠ 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

SessionKeyManager

sec.sessionkeymanager
Security planned Spec started frozen flagship

Issue, scope, and expire short-lived session keys so strategies can sign without re-prompting on every order.

What it does

Issue, scope, and expire short-lived session keys so strategies can sign without re-prompting on every order.

Pipeline placement

runs after: User authorisation grant SessionKeyManager runs before: Any strategy signing action

Applies to: All active session keys per user and strategy

Why it matters

If this failsConsequence
Session key never expiresA compromised key allows unlimited signing indefinitely without re-authorisation.
Key scope not strategy-boundA key issued for one strategy could sign orders for another, violating least-privilege.
No emergency revocation pathA stolen key cannot be neutralised quickly, extending the attack window.

Inputs

Polymarket inputs

InputSourceRequiredUse
ClobAuth session token for V2 APIclob_authrequiredBind the session key to the V2 ClobAuth domain for order signing.

Internal inputs

InputSourceRequiredUse
User-granted session scope (strategy, methods, max size)Admin UIrequiredDefine the scope of each issued session key.
KillSwitch active flagKillSwitchrequiredRevoke all session keys immediately if kill switch is active.

Authority

What this bot is permitted to do

Reject Pause

State

Readiness

Spec started

Status

planned

Class

Guardrail

Default mode

shadow_only

Developer owner

Polytraders core

Capital impact

Direct

Reason codes emitted

CodeSeverityMeaningAction
KILL_SWITCH_ACTIVEHARD_REJECTGlobal kill switch is active; all sessions revoked.Immediately return DENY and revoke all sessions.
SESSION_KEY_EXPIREDHARD_REJECTSession key has exceeded lifetime, call budget, or idle timeout.Return DENY; prompt user to re-authorise.
SESSION_BUDGET_WARNWARNSession call count exceeds 80% of max_calls_per_session.Emit warn; notify user to prepare re-authorisation.
SESSION_EXPIRY_WARNWARNSession age exceeds 75% of max_session_lifetime_h.Emit warn; notify user.
SESSION_ISSUEDINFONew session key issued successfully.Log issuance event.

Used by

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

StrategyStateActivity
NBA H2H — moneyline market-makedemo-wiredlast triggered 47m ago
US Elections — sentiment fadedemo-wiredlast triggered 7m ago
BTC weekly — close-aware quotesdemo-wiredlast triggered 14m ago

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

Why this matters

Security bots does NOT propose or execute trades; only guards signing and wallet operations. 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…