All Case Studies

02 / CASE STUDY · INJECTIVE EVM · BITTENSOR SN50 · ERC-8004 · RUST

Zhi 智

The model plans once. The subnet verifies. The chain enforces.

Zhi 智 product interface
59 / 59FOUNDRY TESTS PASSING

Unit tests for every skip reason, timelocks, poke, capital and credit, plus 3 invariants fuzzed at 128 runs × 8,192 calls each with 0 reverts.

24 / 24RUST HARNESS TESTS

Fixed-point math, indicators, the Synth gate, intent sizing, Zhi Score, and replay that detects a tampered decision log.

16ON-CHAIN SKIP REASONS

Every rejected intent is emitted as TradeSkipped with its reason, from LEVERAGE and DRAWDOWN to SYNTH_UNAVAILABLE. A skip is public evidence, not a silent drop.

LiveFIRST ORDER ON INJECTIVE TESTNET

Agent #72 shorted 0.0001 BTC on BTC/USDC PERP through the 0x65 exchange precompile on 10 Nov 2026, with the order hash recorded in ExecutionLogged.

ClientZhi (zhi-finance)
RuntimeInjective EVM Testnet (chain 1439)
Releasev0.1 · Injective testnet · Unaudited
On-Chain Artifact0xc29CD9...453497
02 / EXECUTIVE THESIS

Designing for the real constraint.

Every architectural decision begins by isolating the structural failure modes of existing solutions and engineering directly against them.

01 / THE PROBLEM

Vulnerability & Friction Surface

Most AI trading agents keep a language model in the loop on every tick. That model can be talked out of its own limits by a single post that says "ignore limits, 100×", and its risk limits usually live in the operator’s own server, where nobody else can check them. The track record is self-reported, so there is no evidence a capital allocator can trust. An agent that is fast and tireless is also one bad prompt away from emptying its account.

02 / OUR APPROACH

Protocol & Product Strategy

Zhi separates the agent into three trust boundaries, and each one distrusts the layer above it. An LLM compiles a trading thesis once into a schema-bounded rule tree that the operator signs with EIP-712. A deterministic Rust harness evaluates that frozen tree on Injective oracle data in 18-decimal fixed point, and Bittensor Synth (SN50) must agree before any entry. Only the on-chain Guardrail Vault can place an order, through Injective’s exchange precompile, and it checks every intent against limits no prompt can change. Every fill and every skip becomes ERC-8004 reputation evidence.

03 / DELIVERED

Shipped Production System

Five Solidity contracts on Injective EVM testnet: GuardrailVault, ZhiFactory, ZhiAttestor, AllocatorVault (ERC-4626) and CreditPool. A Rust core and zhi CLI with eight commands from hash to poke, and a Next.js 16 app with a compile → review → sign → deploy terminal, leaderboard, agent pages, markets and docs. On 10 Nov 2026 the demo vault, Agent #72, placed its first order on Injective’s native orderbook: a 0.0001 BTC short on BTC/USDC PERP, recorded on-chain as ExecutionLogged.

SYSTEM ARCHITECTURE

Plan once, verify, enforce on-chain.

Hover any node for technical detail
01LLM CompilerRuns Once
02EIP-712 Sign-offRule Tree Hash
03Rust HarnessFixed-Point · Replayable
04Synth SN50Entry Gate
05Guardrail VaultOn-Chain Limits
VERIFICATION LOOP

Every fill and skip is emitted on-chain and posted to ERC-8004 reputation, which feeds the Zhi Score and capital access.

03 / THE PRODUCT

Try to break the vault.

Screens from the live app on Injective testnet. The playground runs the vault’s checks in the same order as the contract, using the live demo agent’s limits.

PRODUCT WALKTHROUGH · 41S MUTED LOOP
Zhi · hero, how it works, playground, launch, evidence
TECHNICAL ARCHITECTURE & PROOF

Architecture & verification.

Explore the defense-in-depth matrix, formal cryptographic equations, end-to-end execution trace, and systems engineering trade-offs.

03 / THREE TRUST BOUNDARIES + ONE GATE

The LLM can only propose. The chain decides.

The model can only propose a rule tree, the harness can only propose an intent, and only the Guardrail Vault can place an order. Synth sits between the harness and the vault as a second opinion on every entry.

LAYER 01

Compile Once

Next.js /api/compile · Claude (Gemini fallback) · JSON-schema output · EIP-712
WHAT IT ENFORCES

Turns a thesis, an X post or a URL into a rule tree. Values not grounded in the text become operator defaults (yellow), values above presets are clamped (red), and unknown keys fail. The canonical JSON is hashed with keccak256 and the operator signs that hash.

WITHOUT IT

The model reads every new post on every tick, so one injected instruction can change what the agent does.

LAYER 02

Deterministic Harness

Rust zhi-core + zhi-cli · alloy 2 · 18-decimal fixed point
WHAT IT ENFORCES

Samples the same oracle precompile the vault checks, builds candles locally and evaluates the frozen tree. Every tick is logged with its inputs, and zhi replay must reproduce each intent hash bit for bit.

WITHOUT IT

There is no way to prove a trade came from the rules the operator signed rather than from a later change.

LAYER 03

Synth Gate

Bittensor Synth SN50 · direction probability · 90% band · forecast hash on-chain
WHAT IT ENFORCES

An entry needs Synth’s direction probability above the tree’s threshold and its 90% band under a ceiling. If Synth is unreachable the entry fails closed as SYNTH_UNAVAILABLE, and the hash of the raw forecast goes on-chain with every gate skip.

WITHOUT IT

Entries rest on a single indicator read, with no independent forecast and no record of why a trade was or wasn’t taken.

LAYER 04

Guardrail Vault

Solidity 0.8.24 · EIP-1167 clones · Injective 0x65 exchange + 0x67 oracle precompiles
WHAT IT ENFORCES

Checks every intent against signed bounds: notional, leverage, oracle freshness, price deviation, cooldown and daily drawdown. A breach freezes the vault, anyone can call poke(), and loosening any bound waits out a 24-hour timelock.

WITHOUT IT

Risk limits live in the operator’s server, where a bug or a bad prompt can switch them off.

HAVE A RELATED CHALLENGE?

Let's make
it ship.

Whether you are architecting zero-knowledge circuits, formally verified DeFi primitives, or a 250-builder ecosystem hackathon, you work directly with our founders and senior engineers.