RiskClaw

A 0G agent swarm decides, in real time, how a Uniswap v4 pool should behave under risk

Open AgentsShipped April 24, 2026 Shipping#ai-agents#ai#defi#security
Repo
RiskClaw banner

About

RiskClaw — an autonomous risk guardian for Uniswap v4-style liquidity pools, powered by 0G. RiskClaw watches pool behavior in real time, runs verifiable AI risk analysis on 0G Compute, persists every decision and piece of evidence on 0G Storage, and updates an onchain policy registry that a Uniswap v4 hook reads before every swap and liquidity add. Built for the ETHGlobal agentic hackathon, it is fully shipped and live on the 0G Galileo testnet (chain id 16602). A three-agent swarm coordinates each loop: - Observer snapshots pool metrics and writes them to 0G Storage KV. - Analyst sends those metrics to 0G Compute, where a TEE-verified 7B-parameter LLM (qwen-2.5-7b-instruct) returns a signed risk memo with a score and reasoning. The memo is pinned to 0G Storage and its explanationRoot is committed onchain. - Guardian validates the memo against hard guardrails (max fee, max score, max single-update jump), logs the decision, and submits a signed PolicyUpdate tx to RiskPolicyRegistry. RiskHook.beforeSwap then enforces one of three modes on the next swap: ALLOW (baseline fee), PENALTY_FEE (dynamic fee override, e.g. 10% effective), or BLOCK (revert with PoolBlocked). The same hook blocks LP deposits into red pools via beforeAddLiquidity. The hook is deployed at a CREATE2-mined address whose low 14 bits encode its declared v4 permissions (BEFORE_SWAP_FLAG | BEFORE_ADD_LIQUIDITY_FLAG).

Every policy update onchain carries a PolicyProof struct with explanationRoot, computeProofRoot, metricsRoot, the provider address, and the inference responseId — so anyone can audit which model, on which evidence, justified each policy change. The full chain (observation → inference → decision → onchain enforcement → real swap settling at the AI-set fee) has been demonstrated end-to-end with verifiable testnet transactions.

The reusable pieces — 0G Storage memory adapters, 0G Compute + TEE verification helpers, policy schema/guardrails, and v4 hook adapters — are designed to lift into a hook-agent-kit package so any builder can drop a 0G-powered agent loop in front of their own v4 hook. Repo: https://github.com/Truunik/RiskClaw

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

ShippingLast push 20 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

UniswapSwarm

6-agent AI swarm that researches, risk-scores & executes Uniswap swaps via 0G Compute + ENS routing.

SwarmSwap

SwarmSwap: Verifiable autonomous AI swarms optimizing Uniswap V3 liquidity via 0G Storage & Compute

Sentinel Swarm

Multi agent DeFi guardian swarm with verifiable AI decisions and guaranteed on chain execution

Swarmex

Autonomous multi-agent DeFi engine: specialized AI swarms trade via Uniswap v4 hooks and 0G memory.