CapitalAllocator
CapitalAllocator carves the user's total risk budget across active strategies and refuses new orders that would cause any strategy slice or the aggreg
What it does
CapitalAllocator carves the user's total risk budget across active strategies and refuses new orders that would cause any strategy slice or the aggregate portfolio to exceed its configured allocation. It emits a RESHAPE constraint when a downsize is possible, and HARD_REJECT when the budget is exhausted.
Pipeline placement
Applies to: Every OrderIntent — enforces per-strategy and portfolio-level capital allocation budgets
Why it matters
| If this fails | Consequence |
|---|---|
| Over-allocation to a single strategy | Unconstrained capital flow into one strategy can consume the user's full budget, preventing diversification and concentrating tail risk. |
| Aggregate portfolio budget exceeded | Without a total-portfolio cap, concurrent strategies can collectively exceed the user's acceptable exposure, especially during correlated market events. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Open position notional per market from CLOB | clob_public | required | Track current strategy exposure across active positions. |
| Pending order value per strategy | clob_auth | required | Include pending orders in the budget calculation to prevent race conditions. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Capital allocation config per strategy and portfolio total | internal | required | Load per-strategy budget slice and aggregate portfolio cap. |
| KillSwitch active flag | KillSwitch | required | If active, reject all orders immediately. |
Authority
What this bot is permitted to do
State
Readiness
Planned
Status
planned
Class
Guardrail
Default mode
planned
Developer owner
Polytraders core — Risk pod
Capital impact
Direct
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| KILL_SWITCH_ACTIVE | HARD_REJECT | Global kill switch active. | Immediate HARD_REJECT. |
| CAPITAL_ALLOCATOR_STRATEGY_BUDGET_EXCEEDED | RESHAPE | Strategy slice is at or above per_strategy_max_usd. | RESHAPE if room remains; else HARD_REJECT. |
| CAPITAL_ALLOCATOR_PORTFOLIO_BUDGET_EXCEEDED | HARD_REJECT | Portfolio total is at or above the cap including buffer. | HARD_REJECT; no reshape possible at portfolio level. |
| CAPITAL_ALLOCATOR_BUFFER_WARN | WARN | Remaining portfolio buffer is below the warning threshold. | Attach WARN annotation; allow order if still above hard floor. |
| CAPITAL_ALLOCATOR_DATA_UNAVAILABLE | HARD_REJECT | Capital config or position data unavailable. | HARD_REJECT (fail-closed). |
Related bots in Risk Guardrail
Used by
Reverse index — strategies that currently reference risk.capitalallocator. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| US Elect — book-builder | demo-wired | last triggered 4m ago |
Showing 1 of 1 · demo-wired ≠ production-live
Why this matters
Risk Guardrail bots does NOT propose intents or sign orders; only permits or blocks. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →