WalletFundingGuard
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
Applies to: Per OrderIntent
Why it matters
| If this fails | Consequence |
|---|---|
| Insufficient-funds rejects | Each one wastes a CLOB round-trip and pollutes monitoring with noise that hides real issues. |
| Funding-race conditions | Two strategies competing for the same wallet's collateral can both pass an unsynchronised check; the second order rejects on-chain. |
| Operational embarrassment | An incident where the system tried to trade on a wallet that was never funded looks worse than catching it cleanly. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| On-chain pUSD balance per wallet | ERC-20 contract | required | Authoritative balance source. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Wallet → strategy assignment | Config | required | Which wallet funds which OrderIntent. |
| In-flight collateral reservation | exec.order_lifecycle_manager | required | Collateral already committed to resting orders. |
Authority
What this bot is permitted to do
State
Readiness
Spec ready
Status
planned
Class
Guardrail
Default mode
shadow
Developer owner
Security pod
Capital impact
Direct
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| SEC_FUNDING | P1 | Sec Funding | See decision output and developer log for context. |
| SEC_FUNDING_OK | P1 | Sec Funding Ok | See decision output and developer log for context. |
| SEC_FUNDING_RACE_LOST | P1 | Sec Funding Race Lost | See decision output and developer log for context. |
Related bots in Security
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.
| Strategy | State | Activity |
|---|---|---|
| NBA props — line-shop | demo-wired | last triggered 3m ago |
| Crypto Q2 — basket rebalance | frozen | last triggered 10m ago |
| US Elect — book-builder | demo-wired | last 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 →