Skip to main content

Sudont Solana Demo

One-command demo of the Sudont execution firewall running against Solana transactions. Two modes are supported:

Mode 1 — Local (Simulation Only)

No setup required. Transactions are evaluated against policy and simulated locally — nothing hits the network.
The demo UI waits for the sidecar health check before starting.

Attack Mode Receipts

The console also includes Attack Mode, a browser receipt view for the Mythos trojan-swap and shallow-AMM MEV combat demos. Generate the report before starting the console:
This writes rust/target/demo-receipts/REPORT.md and copies attack-report.json into apps/console/public/. Attack Mode shows SBF program hashes, signed intent, raw LiteSVM logs, universal state diffs, policy gates, and the sidecar sendTransaction block before Solana egress. The browser first requests the report from the local sidecar via sudont_getAttackReport, then falls back to the copied JSON artifact if needed.

Mode 2 — DevNet (Real Transactions)

Approved transactions are forwarded to Solana devnet and land on-chain. The policy uses real vault pubkeys funded with devnet SOL.

One-time Setup

Requires: Solana CLI, jq, Rust toolchain
This script runs three steps:
  1. Wallets — generates (or loads) four devnet keypairs in .demo/ and airdrops SOL
  2. Policy — writes infra/solana-policy.json and .demo/solana-policy.json with real vault pubkeys
  3. Fixtures — runs the Rust build_solana_fixtures helper and writes signed transactions → .demo/fixtures.json
Outputs after setup:

Start the Demo

make demo-solana auto-detects .demo/fixtures.json. When found it applies docker-compose.solana.devnet.yml on top of the base compose, which:
  • Sets SUDONT_SOL_EGRESS_RPC_URL=https://api.devnet.solana.com on the sidecar
  • Mounts .demo/solana-policy.json → /demo/solana-policy.json in the sidecar
  • Mounts .demo/fixtures.json → /usr/share/nginx/html/fixtures.json in nginx

Verify On-Chain

After running the Clean Transfer (ALLOW) scenario, verify the transaction landed:
Search for the operator pubkey from .demo/addresses.json.

What Runs

Rust Sidecar (infra/Dockerfile.sidecar)
  • Loads solana-policy.json with a Solana program + recipient allowlist
  • Exposes a JSON-RPC server on :8080
  • Runs LiteSVM to simulate Solana transactions before applying policy verdicts
  • ALLOW creates an approval attestation for the signed transaction artifact
  • SUDONT_SOL_EGRESS_RPC_URL controls forwarding: empty = noop, devnet URL = live tx id
Demo UI (apps/console/Dockerfile)
  • React app served by nginx on :3000
  • Displays real-time policy verdicts for the three built-in scenarios
  • In DevNet mode, /fixtures.json is served from .demo/fixtures.json

Three browser-console scenarios

These three scenarios are the browser-console subset. For the full five-scenario terminal demo (including the Mythos trojan-swap and shallow-AMM MEV walkthroughs), see docs/DEMO_FLOW.md: run make demo-tui alongside make agent-five, plus make agent-monte-carlo for the headline route-optimizer scenario.

Client Usage

Sudont is a drop-in JSON-RPC proxy — no client library, no package to install. Point @solana/web3.js (or any JSON-RPC client) at the sidecar URL and every sendTransaction call is evaluated by the firewall.
To diagnose a transaction without sending it, call the custom sudont_diagnoseRawTransaction method directly over JSON-RPC. It returns the decoded intent, LiteSVM outcome, and Judge verdict without forwarding the transaction:
For simulation logs without policy evaluation or forwarding, call sol_simulateTransaction:

Migrate to Hosted

Switching from local demo to the hosted Sudont gateway is a one-line URL change:
No code changes — just update the RPC URL.

Verify Sidecar Health

Build Fixtures Manually

scripts/demo-setup.sh calls this for you, but the underlying command is:
The older TypeScript fixture scripts are no longer part of the active demo path.