Skip to main content
Version: 1.0

TEE Clearing

Live Attestation

What you are looking at is a live, real-time feed of Sovereign Liquidity Agents executing Cooperative Batch Clearing inside a hardware-secured Trusted Execution Environment on the Hyperliquid Testnet.

This dashboard provides a transparent window into the Grey Box of agentic trading. It proves mathematically and cryptographically that our matching engine is fair, tamper-proof, and immune to Maximal Extractable Value (MEV) and toxic latency arbitrage (LVR).


How to Read the Dashboard

As you watch the dashboard update, you will see discrete Clearing Rounds occurring (typically every few seconds). For every round, the system generates verifiable cryptographic artifacts.

Here is how to interpret the data streaming on your screen:

1. Clearing Envelope

Every time a batch clears, the Enclave produces a Clearing Envelope. This represents a sealed batch of trades that were matched simultaneously at a single, mathematically optimal uniform price ($p^*$).

  • Instrument: The market being traded (ETH-PERP).
  • Volume & Fills: The total amount of liquidity matched between the agents and the market.
  • Clearing Price: The single fair price at which all buys and sells in that specific batch were executed.

2. Attestation Stream

Next to the trade data, you will see a scrolling feed of cryptographic strings. This is the Proof of Execution.

  • Agent Signature: Every decision is cryptographically signed by the Enclave’s internal private key. This key never leaves the hardware.
  • Attestation Document: A raw COSE_Sign1 binary blob generated directly by the Secure Module. It proves that the trade was executed by our specific algorithm, running in a secure enclave, with zero human interference.

3. Hash Chain

You will notice a prev_envelope_hash attached to the rounds. Each clearing round cryptographically locks into the hash of the round before it. This creates a tamper-evident chain. If anyone attempted to alter a past trade, the entire chain would instantly break and invalidate.


9-Step Verification Protocol

Before any matched order from the Enclave is allowed to actually execute on the Hyperliquid blockchain, the Nunchi Parent Gateway runs a strict 9-Step Verification Protocol.

If you look at the dashboard logs, you will see a checklist of [+] PASS marks for every single round. Here is what the system is verifying in milliseconds:

StepVerification CheckWhat it proves to the user
1-2Payload Integrity & SignatureThe trade data wasn't intercepted or modified in transit.
3-4Attestation Cert ChainThe trade actually originated from genuine AWS Nitro hardware, not a spoofed server.
5PCR ValuesThe "DNA" of the code. Proves the algorithm running is the exact, audited Nunchi code we published.
6-7Market Clearing & FillsZero-sum validation. Proves the system didn't invent phantom liquidity (Buys perfectly equal Sells).
8KKT CertificateThe Math Proof. Verifies the Karush-Kuhn-Tucker conditions, proving the clearing price was mathematically optimal for all participants.
9Round IntegrityProves no orders were selectively censored or dropped from the batch (Anti-MEV).

Terms

  • PCR (Platform Configuration Register): A set of cryptographic hashes that act as the fingerprint of the Enclave's environment. If a hacker alters even one line of the trading algorithm, the PCR hash changes, and the network automatically rejects the trades.
  • KKT Certificate: Named after the Karush-Kuhn-Tucker optimization conditions. Because running heavy convex optimization on-chain is too slow, our Enclave solves the matching off-chain and generates this "certificate." The blockchain uses this certificate to verify the math is perfect in $O(n^2)$ time.
  • Avellaneda-Stoikov MM: One of the Sovereign Agents operating in the current sandbox session. You will see it actively managing spreads and inventory dynamically based on the market volatility.