Decentralized pause oracle for DeFi: TEE-attested agent swarm with economic quorum.
Klaxon is an autonomous DeFi pauser swarm. It replaces the human-signed pauser multisig with bonded AI agents that detect exploits and call Guardian.pause() before the drainer's second transaction lands.
Every DeFi protocol has a pauser key. It's the most dangerous key in the system, and also the slowest. When an exploit lands at N, the drainer's next transaction is at N+1 — twelve seconds later. Multisig signers are asleep, in flight, or not watching the right Slack channel. By the time anyone signs the pause, the drainer's wallet is already in a mixer.
Klaxon replaces that multisig with three (or more) bonded agents. Each one is minted as an ERC-7857 iNFT on 0G Storage with its own reputation, bond, and keeper bot. They watch every block, run sealed inference inside a dstack TEE on 0G Compute, and gossip signed Finding envelopes over the Gensyn AXL mesh (libp2p over Yggdrasil, Ed25519-signed). When three independent signatures land on the same findingHash, every agent's keeper races to fire Guardian.pause (sigs[], findingHash, teeAttestationHash) through KeeperHub on Base Sepolia. KeeperHub's race lock picks one winner; the rest revert with AlreadyProcessed. Pool flips to paused at N+1. The drainer's follow-up drain() reverts with IsPaused(). The whole loop runs in under 850 ms.
The whole thing is auditable. TEE attestation hash, 0G Compute sealed-inference signature, iNFT storageRoot delta — every analysis leaves a receipt checkable on chain. The agents have real ETH bonded; lying gets them slashed.
Stack: 0G Compute (Track B: Autonomous Agents, Swarms, iNFT), Gensyn AXL (gossip mesh), KeeperHub (race-safe execution), Base Sepolia (Guardian/Pool/Oracle deployed; AgentINFT lives on 0G Galileo). Solidity 0.8 + Foundry contracts, Python agents, klaxon CLI on Typer + Rich.
Klaxon is a swarm of three Python agents that watch a DeFi protocol every block, detect oracle manipulation independently, and race to call Guardian.pause() on Base Sepolia before the drainer's second tx lands.
Contracts
Solidity 0.8 + Foundry. Guardian verifies 3-of-N quorum signatures plus a TEE attestation hash before flipping Pool.paused(). VulnerableLendingPool is a deliberately naive AAVE-style pool that prices collateral off an external oracle. ManipulableOracle is the attack surface. All three live on Base Sepolia (chain 84532). We started on 0G Galileo and pivoted on Day 6 because KeeperHub's chain catalog doesn't list 0G yet.
Agents
Python 3.11, async, one process per agent. Each one subscribes to the AXL gossip topic via libp2p over Yggdrasil, polls Base Sepolia block headers and Oracle.latestPrice(), and when the price moves more than 100x in a single block, sends a sealed-inference request to 0G Compute (qwen-2.5-7b-instruct on a dstack-attested provider). The agent wraps the model's verdict and the TEE attestation envelope into a Finding struct, signs the digest with its secp256k1 wallet key, and gossips it. Receivers verify the signature and the TEE attestation locally, with no provider round-trip. Once three distinct signers agree on the same findingHash, every agent's keeper bot fires a KeeperHub workflow execution.
Receipts
Each agent is minted as an iNFT (ERC-7857) on 0G Galileo. The tokenURI is the keccak256 root of the agent's canonical signed manifest stored on 0G Storage. After every successful pause, the storageRoot updates with a new entry, so anyone can replay an agent's full history.
What each partner did for us:
keccak256(tee_text) committed in Guardian.FindingAttested lets the contract gate quorum on real enclave output instead of the placeholder zero we shipped on Day 4.Guardian.pause(). KeeperHub's workflow execution lets the first tx through and reverts the others with AlreadyProcessed, which saved us from writing a per-pause mutex on chain.Hacky bits:
Finding signing. They live in different files so a compromised transport key can't forge findings.highpass=80, arnndn, loudnorm) so the seven scenes of the demo video splice at identical loudness and noise floor.klaxon CLI (Typer + Rich) is the operator UX. klaxon doctor, klaxon agents up, klaxon attack bump, klaxon receipts. We tested cold-clone-to-first-paused-exploit at around eight minutes.
