Built · control planePolicy schema 1.3 · Robinhood Chain 4663
Loss limits
A loss limit stops an agent from losing more than you allow, and the agent cannot talk its way past it. The limit is enforced by Palisec's co-signature, not by the agent's prompt: the agent's key cannot move funds alone, so once the limit is reached, Palisec stops co-signing anything that adds risk.
Setting one
Add a loss_limit section to the policy (schema 1.3). It is off unless you add it.
| Field | Meaning |
|---|---|
max_drawdown_bps | Largest drop from the window's peak, in basis points (500 = 5%). 0 = not used. |
max_loss_usd_micros | Largest loss from the window's peak, in USD micros ("50000000" = $50). "0" = not used. Set at least one of the two. |
window_seconds | The rolling window, 1 hour to 7 days. |
on_breach | pause_risk: deny everything that adds risk. review: hold it for a person instead. |
on_valuation_unavailable | No reliable account value: deny or review. Never allowed. |
stablecoins | What a paused account may still swap into. |
exit_addresses | Your own and your recovery wallets. Transfers here are withdrawals, not losses, and stay allowed while paused. |
max_exit_slippage_bps | While paused, a swap into a stablecoin may lose at most this much. |
max_closed_market_price_age_seconds | How old a stock-token price may be while US markets are closed (for example, 259200 = 72 hours covers a weekend). |
reset_epoch | Raised by one to reset a breach (see below). |
Policy section
"loss_limit": {
"enabled": true,
"max_drawdown_bps": 500, // 5.00 %; 0 = not used
"max_loss_usd_micros": "50000000", // $50; "0" = not used
"window_seconds": 86400, // 1 hour to 7 days
"on_breach": "pause_risk", // or "review"
"on_valuation_unavailable": "deny", // or "review"; never allow
"stablecoins": ["0x…USDG"],
"exit_addresses": ["0x…your wallet", "0x…recovery wallet"],
"max_exit_slippage_bps": 300,
"max_closed_market_price_age_seconds": 259200,
"reset_epoch": 0
}How the loss is measured
- Value: ETH plus the priced tokens the account holds, at Chainlink prices on Robinhood Chain (ETH, WETH, USDG and the listed stock tokens). Tokens without a Chainlink price count as $0. So buying one counts the whole spend as a loss, and no made-up price can hide a loss.
- No pool prices: a trading pool's price never sets the value. A manipulated pool can only change how many tokens a trade returns, and Palisec measures that by simulating the exact trade, so a bad fill shows up as a loss.
- Deposits and withdrawals don't count: money sent into the account raises the starting point, money sent back to an exit address lowers it, and only trading results count.
- Peak in the window: the loss is the drop from the highest value in the window, with deposits and withdrawals taken out.
- Before every decision: Palisec measures the account and checks the operation's simulated result. The operation that would cross the limit is itself denied, and nothing reaches the chain.
When the limit is reached
- New operations that add risk are denied with
PS_LOSS_002(USD limit) orPS_LOSS_001(percentage limit), or held for a person ifon_breachisreview. - Still allowed: swaps into the policy's stablecoins within the exit slippage, transfers to the exit addresses, and bounded token approvals to allowlisted contracts.
- If a price is stale, paused for a corporate action, or USDG is more than 2% from $1, the value is unavailable. Operations that add risk then get
PS_LOSS_003and are never allowed. - The webhook
loss_limit.triggeredfires, and the console shows a banner on the agent's page.
Resetting
- Only the organization's owner can reset. The reset is a new policy version with
reset_epochraised by one. - Because it loosens the rules, it waits for your organization's delay, alerts everyone (
loss_limit.reset_pending), and can be cancelled until then. - When it applies, the window starts again from the account's value at that moment (
loss_limit.reset). - Lowering a limit or lengthening the window applies at once. Raising a limit, shortening the window, adding an exit address or a stablecoin, or turning the rule off waits for the delay.
API
| Endpoint | Who |
|---|---|
GET /v1/agents/{id}/loss-limit | organization members: value, window peak, loss and whether the agent is paused |
POST /v1/agents/{id}/loss-limit/reset | owner; a delayed loosening |
On chain
- The rule is part of the policy, so its hash is published through the Policy-Enforced Agent Accounts registry with every change (
PolicyPending,PolicyActivated). - Every recorded decision comes with a signed receipt. A loss-limit denial carries the reason
OTHERand the detail codepalisec:PS_LOSS_00x.