CactusNetwork

Intent-driven DeFi autopilot using Grok AI for optimal OTC & DEX routing via KeeperHub.

CactusNetwork

Created At

Open Agents

Project Description

DeFi traders constantly bleed value to MEV sandwich attacks, high DEX slippage, and the sheer complexity of manually splitting large orders. CactusNetwork solves this with an intent-driven, autopilot execution platform. Instead of managing complex routing, users simply sign an EIP-712 intent detailing what they want to trade and their price limits.

Behind the scenes, our hybrid AI-evaluation architecture goes to work. It first attempts to match trades in our zero-slippage Local OTC Dark Pool. If no match is found, the system dynamically queries the Uniswap API for external liquidity. The optimal execution path is then selected and securely settled on-chain. This ensures users get the best possible price without the headache of manual execution or the risk of MEV extraction.

How it's Made

We built CactusNetwork using a robust full-stack architecture combining Web3 tools and AI. The frontend is built with Next.js, handling seamless wallet authentication via EIP-191 and capturing user intents as EIP-712 typed data signatures. Our Python FastAPI backend utilizes a unique hybrid approach: an Orchestrator manages pending orders and strict pre-filtering, while the Grok AI Agent acts as the decision engine. Grok evaluates routes by strictly prioritizing local OTC dark pool matches before requesting external quotes via the Uniswap API.

For on-chain execution, we leveraged KeeperHub as our reliable relay layer. Instead of manually handling gas, nonces, and RPC nodes, the backend forwards the AI-generated JSON execution payload to KeeperHub, which dispatches the optimal calldata to our custom Solidity smart contracts (deployed on Sepolia via Foundry). A notable hacky feature is our strict "guardrail" system for the AI: Grok is isolated from direct fund manipulation and only outputs standardized JSON proposals. These proposals are cryptographically verified against the user's signature by the SettlementRouter.sol contract, ensuring that even if the AI hallucinates, no unauthorized financial loss can occur.

background image mobile

Join the mailing list

Get the latest news and updates

CactusNetwork | ETHGlobal