Overview
Sudont enforces a four-node decision architecture called The Diamond. Every transaction an AI agent wants to execute must pass through all four nodes before any value moves on-chain.The Diamond is a fan-out / fan-in shape: it fans out from a single policy source (Constitution)
into two parallel verification paths (Cortex and Cage), then converges at a single verdict (Judge).
No single node can approve or reject alone.
INTERROGATE verdict, the flow loops back through the Cortex
for a structured challenge round. See The Interrogation Protocol.
The Triangle of Truth
Intent
What the agent claims it wants to do β extracted by the Cortex. Deterministic, no LLM.
Physics
What would actually happen on-chain right now β computed by the Cage via revm or LiteSVM.
Policy
What the operator has defined as acceptable β enforced by the Constitution. JSON/YAML authored.
The Four Layers
Layer 1: The Constitution β THE LAW
βThe law that governs what is acceptable before a transaction leaves the system.βRust crate:
sudont-constitutionThe Constitution is the top of the Diamond. It defines rules that every transaction is evaluated
against. Operators author policy in JSON or YAML; the Constitution compiles this into an immutable
policy object used throughout the hot path.Constitution Policy Fields
Constitution Policy Fields
| Field | Purpose |
|---|---|
chain_allowlist | Permitted chain IDs |
protocol_allowlist | Permitted protocol identifiers (e.g. uniswap_v3, aerodrome) |
target_allowlist | Permitted router/contract addresses |
token_allowlist / token_denylist | Per-token permissions |
max_trade_size | Absolute size cap in base units |
max_slippage_bps | Slippage tolerance in basis points |
max_price_impact_bps | Price impact cap |
min_liquidity | Minimum pool liquidity threshold |
private_route_required | Force private mempool egress |
fail_closed | Reject any transaction with uncertain state |
PolicySnapshot struct in sudont-types captures the compiled policy at a point in time.
All policy decisions are deterministic and auditable.Layer 2a: The Cortex β INTENT
βIntent normalization β what is the agent actually trying to do?βRust crate:
sudont-cortexThe Cortex parses raw signed transactions, unsigned tx requests, and typed trade requests, then
normalizes them into a CanonicalIntent.CanonicalIntent
The Cortex is deterministic β no LLM is in the hot path. Unknown fields are preserved as explicit
nulls; the Cortex never hallucinates intent it cannot infer.
Layer 2b: The Cage β PHYSICS
βDeterministic physics β what would actually happen if this transaction executed now?βRust crates:
sudont-cage (EVM), sudont-cage-svm (SVM)The Cage simulates the exact on-chain execution of the transaction against current state. Both
cages implement the SimulationEngine trait:SimulationEngine Trait
SimOutcome
Layer 3: The Judge β VERDICT
βThe verdict engine β does intent match physics, and does physics satisfy policy?βRust crate:
sudont-judgeThe Judge receives the CanonicalIntent from Cortex, the SimOutcome from Cage, and the compiled
PolicySnapshot from Constitution, then produces one of three verdicts:| Verdict | When | Output |
|---|---|---|
| APPROVE | Intent matches physics, within Constitution limits | EIP-191 signed ExecutionAttestation |
| BLOCK | Intent β physics, or Constitution hard-violated | Stable reason code + human-readable headline |
| INTERROGATE | Medium-risk signal detected | Loops back to Cortex for challenge round |
Verdict Enum
SUDONT_SLIPPAGE_EXCEEDED, SUDONT_PRICE_IMPACT_EXCEEDED, SUDONT_POLICY_DENY,
SUDONT_UNSUPPORTED_TARGET, SUDONT_UNKNOWN_STATE, SUDONT_INTENT_OUTCOME_MISMATCH.The Interrogation Loop
When the Judge returnsINTERROGATE, the Diamondβs linear flow becomes a loop:

