⚠ 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

WalletFundingGuard

sec.wallet_funding_guard
Security planned Spec ready frozen

Rejects any OrderIntent whose required pUSD collateral cannot be covered by the funded balance of the assigned wallet, including a configurable buffer

What it does

Rejects any OrderIntent whose required pUSD collateral cannot be covered by the funded balance of the assigned wallet, including a configurable buffer. Prevents the system from submitting orders that would fail at the exchange for insufficient funds, which burns latency and creates noisy reject metrics.

Pipeline placement

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

Applies to: Per OrderIntent

Why it matters

If this failsConsequence
Insufficient-funds rejectsEach one wastes a CLOB round-trip and pollutes monitoring with noise that hides real issues.
Funding-race conditionsTwo strategies competing for the same wallet's collateral can both pass an unsynchronised check; the second order rejects on-chain.
Operational embarrassmentAn incident where the system tried to trade on a wallet that was never funded looks worse than catching it cleanly.

Inputs

Polymarket inputs

InputSourceRequiredUse
On-chain pUSD balance per walletERC-20 contractrequiredAuthoritative balance source.

Internal inputs

InputSourceRequiredUse
Wallet → strategy assignmentConfigrequiredWhich wallet funds which OrderIntent.
In-flight collateral reservationexec.order_lifecycle_managerrequiredCollateral already committed to resting orders.

Authority

What this bot is permitted to do

Reject

State

Readiness

Spec ready

Status

planned

Class

Guardrail

Default mode

shadow

Developer owner

Security pod

Capital impact

Direct

Reason codes emitted

CodeSeverityMeaningAction
SEC_FUNDINGP1Sec FundingSee decision output and developer log for context.
SEC_FUNDING_OKP1Sec Funding OkSee decision output and developer log for context.
SEC_FUNDING_RACE_LOSTP1Sec Funding Race LostSee decision output and developer log for context.

Used by

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

StrategyStateActivity
NBA props — line-shopdemo-wiredlast triggered 3m ago
Crypto Q2 — basket rebalancefrozenlast triggered 10m ago
US Elect — book-builderdemo-wiredlast triggered 17m 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…