Documentation Index
Fetch the complete documentation index at: https://docs.sudont.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Overview
When the Judge blocks a fatal trade, Sudont emits a deterministic JSON ReAct error straight back into the swarm’s reasoning loop. The payload is the hot-path contract between the firewall and the agent: every field is stable, machine-readable, and consumable without prose parsing.The swarm never reads prose. It reads
rule_id, simulated_reality, and actionable_feedback —
three fields, every time, forever. This is the entire integration surface for agentic recovery.ALLOW returns an EIP-191 signed approval artifact instead. The diagnosis-only path
(sudont_diagnoseRawTransaction) always returns the full envelope without forwarding.
Canonical Payload
Every block ships the same JSON-RPC error shape. Multiple violations are emitted in a singleviolations array so the swarm can reason about the full conflict in one pass.
Field Reference
rule_id
A stable uppercase token identifying the Constitution rule that fired. Safe to branch on —
never changes for a given rule, across versions.
simulated_reality
A short machine-readable description of what the Cage observed in the sandbox. Not prose —
a compact signal the swarm can log verbatim for audit.
actionable_feedback
A stable uppercase token the swarm’s ReAct loop branches on to pick a recovery strategy.
The full token set is enumerated below.
hot_path_tier
Relative execution tier for the firewall path. Planned, not yet emitted by the server —
swarms should not branch on this field today.
Rule IDs
rule_id | Fired by |
|---|---|
MAX_SLIPPAGE_EXCEEDED | Cage State-Diff exceeded max_slippage_bps |
MAX_PRICE_IMPACT_EXCEEDED | Cage State-Diff exceeded max_price_impact_bps |
MAX_TRADE_SIZE_EXCEEDED | Canonical intent exceeded max_trade_size |
UNLISTED_DESTINATION | Target address not in target_allowlist |
UNLISTED_TOKEN | Token not in token_allowlist or present in token_denylist |
UNSUPPORTED_CHAIN | Chain ID not in chain_allowlist |
INTENT_OUTCOME_MISMATCH | Canonical intent diverges from simulated State-Diff |
UNKNOWN_STATE | Cage could not produce a confident simulation under fail_closed |
Actionable Feedback Tokens
The swarm’s agentic ReAct loop branches onactionable_feedback to pick a recovery strategy.
Every token is a directive, not a sentence.
| Token | Meaning |
|---|---|
RECALCULATE_ROUTE_OR_SIZE | Pick a different route or reduce trade size and resubmit |
PROVIDE_ALLOWLISTED_ADDRESS | Resubmit with a target from the allowlist |
REDUCE_APPROVAL_AMOUNT | Swap unbounded approval for exact trade amount |
SELECT_DIFFERENT_TOKEN | Pick a token in the allowlist |
HALT_STRATEGY | Terminal — the strategy is not recoverable, halt and escalate |
RETRY_WITH_PRIVATE_ROUTE | Resubmit through a private mempool egress |
Consuming in an Agentic ReAct Loop
The payload is designed to be consumed in two lines of loop code. Branch onactionable_feedback, pick a recovery strategy, and resubmit. No prompt engineering, no prose
parsing, no model inference in the hot path.
ReAct Recovery Branch
Constitution Compiler
Learn how every
rule_id is lowered into a memory-aligned Rust HashSet so Constitution
evaluation stays line-rate with the RPC.
