⚠ 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

WalletPermissionGuard

sec.walletpermissionguard
Security planned Spec started frozen flagship

Enforce that each strategy can only call the wallet methods the user has explicitly granted, scoped per session.

What it does

Enforce that each strategy can only call the wallet methods the user has explicitly granted, scoped per session.

Pipeline placement

runs after: Strategy OrderIntent and Risk guardrails WalletPermissionGuard runs before: Any order signing or submission

Applies to: Every pending order before signature

Why it matters

If this failsConsequence
Strategy calls an unauthorized wallet methodUnexpected asset movement or signing actions outside the user-granted scope, undermining non-custodial guarantees.
Method whitelist not enforcedA compromised strategy could sign arbitrary orders, draining pUSD balances.
Permission scope not session-boundStale grants from a previous session silently persist, violating least-privilege.

Inputs

Polymarket inputs

InputSourceRequiredUse
Pending order contract address and methodclob_authrequiredCheck that the target contract method is on the per-strategy whitelist.
CTFExchangeV2 method signaturesonchainrequiredValidate that the called method exists and is recognised in the V2 ABI.

Internal inputs

InputSourceRequiredUse
Per-strategy method whitelist and contract allowlistAdmin UIrequiredAuthoritative grant set for each strategy session.
Active session expiry timestampSessionKeyManagerrequiredReject calls from expired sessions.
KillSwitch active flagKillSwitchrequiredHard reject all calls when 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

Critical

Reason codes emitted

CodeSeverityMeaningAction
KILL_SWITCH_ACTIVEHARD_REJECTGlobal kill switch is active.Immediately return DENY.
SESSION_KEY_EXPIREDHARD_REJECTThe active session key has expired.Return DENY; prompt user to re-authorise.
WALLET_PERMISSION_DENIEDHARD_REJECTMethod or contract not in session whitelist, or size cap exceeded.Return DENY and emit security alert.
PERMISSION_SCOPE_WARNWARNOrder size is between 80% and 100% of max_per_call_size_usd.Log warning; continue to next check.
SESSION_ABOUT_TO_EXPIREINFOSession expires within require_reapproval_h hours.Emit INFO; notify user to prepare re-authorisation.

Used by

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

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

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