RAXCLAW is an autonomous smart contract security agent powered by 0G Storage, 0G Compute, on-chain ERC-8183 audit proof + ERC-7857 agent NFT, and OpenClaw orchestration — detecting vulnerabilities usi




# RAXCLAW — Autonomous Security Cognition on 0G
## Short Description
RAXCLAW is an autonomous smart contract security agent that detects vulnerabilities using 722 real DeFi exploits ($4.1B+ in losses) as its memory — powered entirely by 0G Storage, 0G Compute, and on-chain proof via ERC-8183 and ERC-7857 on 0G Mainnet.
---
## Full Description
RAXCLAW is a fully autonomous smart contract auditing agent built on the 0G network. It combines a 13-phase deterministic reasoning pipeline with decentralized AI infrastructure to produce cryptographically verifiable security reports — without relying on any centralized service.
### What We Built
- A Rust-based multi-agent cognition engine with 7 parallel tools: reentrancy detection, flash loan analysis, access control check, gas analysis, pattern detection, LLM reasoning, and self-reflection
- An OpenClaw orchestration layer — making RAXCLAW a composable, skill-dispatched agent callable by other agents via natural language
- An Ink/React CLI (`raxclaw run`) that orchestrates the full 13-phase audit pipeline end-to-end
- A Next.js frontend at [raxclaw.vercel.app](https://raxclaw.vercel.app) for verifying reports by 0G root hash
### 0G Integrations
| Layer | How We Use It |
|-------|---------------|
| **0G Storage** | 722 real DeFi exploits indexed as a vector database; every audit report (JSON + markdown) uploaded to 0G Mainnet storage and referenced by content root hash |
| **0G Compute** | Decentralized LLM inference (Qwen 2.5-7B) for tool selection, vulnerability explanation, and self-critique reflection — 2 calls per audit |
| **0G EVM (Mainnet, chain 16661)** | ERC-8183 `RaxcAuditTask8183` manages the full audit task lifecycle (create → finalize with verdict + root hash + replay ID); ERC-7857 `RaxcAgentNFT` stores the agent's cumulative intelligence as an on-chain memory pointer updated after every audit |
---
## Live Proof on 0G Mainnet
| Item | Value |
|------|-------|
| Network | 0G Mainnet (Chain ID 16661) |
| ERC-8183 contract | [`0xa018A255881e0525831Df7bCDf9A03D1B06E1790`](https://chainscan.0g.ai/address/0xa018A255881e0525831Df7bCDf9A03D1B06E1790) |
| ERC-7857 contract | [`0xF335a9B58f2AA6A2f884d2dA4E308F7378A4CF7e`](https://chainscan.0g.ai/address/0xF335a9B58f2AA6A2f884d2dA4E308F7378A4CF7e) |
### Live Transactions
| # | Action | TX |
|---|--------|----|
| 1 | ERC-8183 Task #1 created | [`0x9fbc0d61...`](https://chainscan.0g.ai/tx/0x9fbc0d61bcfbedb0e9e8d947c134d7e2b890ca9a9fc985c05940061413180a58) |
| 2 | 0G Storage upload (JSON, seq 101964) | [`0x7fdacda8...`](https://chainscan.0g.ai/tx/0x7fdacda80da7b9640e54514e52f39ef4d0f56d37f5ffe875d4d6cb36316a2992) |
| 3 | 0G Storage upload (report, seq 101964) | [`0xa94dce2b...`](https://chainscan.0g.ai/tx/0xa94dce2b879501a6ee5ecd70d489895b91baf492021f5bdcb22fc5908c6514cd) |
| 4 | ERC-7857 NFT updated (Update #2) | [`0xc530287c...`](https://chainscan.0g.ai/tx/0xc530287c782be4c7231f19817b1830c2dc7b4e6bc866e3d488e1603629511ab4) |
| 5 | ERC-8183 Task #1 finalized | [`0x6849d86b...`](https://chainscan.0g.ai/tx/0x6849d86ba0962916f8921928ad3e8c350c6b1fb6cd13e297c04afee07b397e65) |
| 6 | ERC-8183 Task #2 created | [`0xe4f12e35...`](https://chainscan.0g.ai/tx/0xe4f12e35147b375227530addcc8b606f8a0aa1eb98c4b0774e16840dd4a98286) |
| 7 | 0G Storage upload (JSON, seq 101967) | [`0x35eee100...`](https://chainscan.0g.ai/tx/0x35eee100473e6ea3666aba2137ade8c5fd8b2088a56b665244c02d15d6987292) |
| 8 | 0G Storage upload (report, seq 101968) | [`0x444e5130...`](https://chainscan.0g.ai/tx/0x444e5130b5ca34fea47b3c6ae496a9fb961494729b94a351c8f48a3f3ab86a61) |
| 9 | ERC-7857 NFT updated (Update #3) | [`0x7d3e5c34...`](https://chainscan.0g.ai/tx/0x7d3e5c3421bb6d414ed7f410124559607995d886df4027aa1ccbb5d6082271f6) |
| 10 | ERC-8183 Task #2 finalized | [`0x64fc5049...`](https://chainscan.0g.ai/tx/0x64fc5049de6fef9764f769760a5e2b42e8db03834eaddee7d63bf49ce07f1097) |
### Verified Audit Reports
- [Task #1 — DeFiVault Reentrancy](https://raxclaw.vercel.app/roothash/0xa23fe510c76ed95cf758d455a2494178fdfb08035bba41e88d49fa6065fb2580?tx=0x6849d86ba0962916f8921928ad3e8c350c6b1fb6cd13e297c04afee07b397e65)
- [Task #2 — DeFiVault Reentrancy](https://raxclaw.vercel.app/roothash/0x99bfe8c55a10e5551fef7dce66a11b165760911dc249ff564db08b76c1f81242?tx=0x64fc5049de6fef9764f769760a5e2b42e8db03834eaddee7d63bf49ce07f1097)
---
## Links
| | |
|-|-|
| **GitHub** | https://github.com/JFKongphop/raxclaw |
| **Frontend** | https://raxclaw.vercel.app |
| **Demo Video** | https://youtu.be/OV41-JY1zbM?si=zLvJMfrKi-cd8TTS |
## Progress During Hackathon
**Week 1 — Architecture & Data Layer**
- Designed the 13-phase autonomous audit pipeline (RAG → LLM → Consensus → Simulation → Attestation)
- Built the 0G Storage indexer (`indexer_protocol_0g.ts`) — parsed and embedded 722 real DeFi exploits ($4.1B+ in losses) into a vector database stored on 0G Storage
- Deployed the fly.dev API server pre-loading all 722 exploits in RAM for <10ms RAG queries
**Week 2 — Cognition Engine & On-Chain Proof**
- Built the Rust multi-agent cognition engine with 7 parallel tools: reentrancy, flash loans, access control, gas analysis, pattern detection, 0G Compute LLM reasoning, and self-reflection
- Integrated 0G Compute (Qwen 2.5-7B) for decentralized LLM inference — used twice per audit (tool reasoning + self-critique)
- Implemented ERC-8183 `RaxcAuditTask8183` — full audit task lifecycle: `createTask → finalizeTask(verdict, rootHash, replayId)` on-chain
- Implemented ERC-7857 `RaxcAgentNFT` — agent intelligence NFT updated after every audit with 0G Storage root hash as memory pointer
**Week 3 — OpenClaw Integration, Frontend & Mainnet Migration**
- Wrapped the Rust engine in an OpenClaw skill (`skills/raxc-security/SKILL.md`) — making RAXCLAW composable and callable by any OpenClaw agent via natural language
- Built the Ink/React CLI (`raxclaw run`) with OpenClaw orchestration layer (`[OpenClaw] → [Planner] → RAXC`)
- Deployed Next.js frontend at `raxclaw.vercel.app` — verifies audit reports by 0G root hash with on-chain TX proof
- Migrated all contracts and storage from 0G Galileo Testnet (chain 16602) to **0G Mainnet (chain 16661)**
- Deployed both contracts on mainnet and executed 10 live on-chain transactions covering the full audit lifecycleBootstrapped — actively seeking seed funding to scale the exploit dataset, expand to multi-chain audit coverage, and bring autonomous on-chain security to every protocol building on 0G.