Guardrailed AI agent execution matrix on ENSv2, 0G Private Compute & Uniswap V3.
The Problem: Autonomous AI agents are rapidly entering DeFi, managing treasuries, rebalancing liquidity, and executing trades. However, giving an AI agent direct access to private keys or smart contract allowances creates catastrophic risks: flash loan exploits, prompt injection, slippage bleeding, and rogue transactions drain user capital with zero recourse.
The Solution — AegisNet: AegisNet is a guardrailed AI execution matrix that establishes cryptographic and onchain safety boundaries for autonomous agents before they can touch DeFi protocols:
ENSv2 Subname Identity & EAC: Every agent is minted an ENSv2 subname (e.g., agent1.aegisnet.eth). The ENS subname registry serves as an Execution Access Control (EAC) whitelist, specifying exactly which adapters (e.g., Uniswap V3), daily spend limits, and ENSIP-26 metadata records the agent is bound to. 0G Private Compute & AI Strategy: Autonomous trade proposals are evaluated and generated inside 0G Private Compute using verifiable AI models, ensuring decision confidentiality and tamper-resistance. Dual-Path Execution & Human Approval Gate: Low-value transactions (< $1,000 threshold): Automatically verified against ENS permission whitelists and daily allowances, executing instantaneously on Uniswap V3. High-value transactions (≥ $1,000 threshold): Automatically paused onchain in AegisExecutionManager. The transaction cannot execute until authenticated by the real human subname owner through an EIP-712 cryptographic signature checkpoint. 0G Storage Verifiable Audit Trail: Every proposed strategy, reasoning payload, and execution receipt is Merkle-hashed and permanently archived to 0G Decentralized Storage for cryptographic auditability. 2. "How it's Made" / Technical Implementation
AegisNet is built end-to-end on Ethereum Sepolia, 0G, and Uniswap V3:
Smart Contracts (Solidity v0.8.24, Hardhat): AegisSubnameRegistry: Native ENSv2-compliant hierarchical subregistry managing subname node ownership, EAC target contract whitelists, daily spend limits, and ENSIP-26 agent text records (agent.capabilities, agent.biometric_threshold, agent.operator).
AegisExecutionManager: The central security gateway that intercepts all proposed trades, checks daily spend limits, enforces the threshold security gate, and securely executes approved transactions.
AegisUniswapAdapter: Direct execution adapter integrating Uniswap V3 SwapRouter02 with dual-path resilience (real ERC-20 token swap delivery with strict slippage protection).
AI Strategy Layer (0G Private Compute): Utilizes 0G Decentralized AI Router and Private Compute (0gm-1.0-35b-a3b) to reason over market conditions, construct optimal trade parameters, and sign off on trades.
Verifiable Audit Logging (0G Turbo Storage): Submits trade logs, parameters, and AI reasoning trees to the 0G Storage testnet via Merkle proof hashing, returning permanent root hashes verifiable on 0G Storage Scan. Backend & Relayer (Node.js, Express, TypeScript, Ethers.js v6): Event indexer syncing Sepolia contract state, managing EIP-712 human gate verification sessions, and serving serverless API functions on Vercel. Frontend (Vanilla HTML5 / Modern CSS / Vanilla JS): High-performance, zero-framework Web3 console with EIP-6963 multi-wallet discovery (MetaMask, Rabby), live onchain state synchronization, and human approval modals. 3. ENSv2 Qualification Requirement: "How does your project use ENSv2?"
Centrality to the Product: ENSv2 is not a cosmetic label in AegisNet; it is the fundamental access control and identity architecture:
Subregistry EAC: Agent permissions (allowed target contracts, max trade size, daily limits) are hard-coded directly into the ENSv2 Subname node state. An agent cannot call any contract unless that contract is whitelisted under its ENS subname node. ENSIP-26 Agent Text Records: Stores machine-readable agent capabilities, operator addresses, and human approval threshold policies directly on the ENS text resolver. Owner Derivation & Replay Protection: High-value human gate approvals derive authorization directly from the registered subname owner on Sepolia, guaranteeing single-use replay protection and true sovereign delegation. 4. Links & Contract Reference for Submission GitHub Repository: https://github.com/shriyashsoni/aegisnet Network: Ethereum Sepolia (Chain ID 11155111) AegisSubnameRegistry: 0x6Dbd89B71e8AB7BF93a9200C6fB81951699549FE AegisExecutionManager: 0x13d7b8Add8265AB1Cfdc3a6E8E60D1b3bcD56fa8 AegisUniswapAdapter: 0xD855719f7Cc2cD867540F8398E3d2Fa4b2dD8221 0G Storage Explorer Sample: https://storagescan.0g.ai/file/0x915b0d5c28f574cbf40708585c0e95e54f17c23df768b0ef467cc9d572a7c7b3
AegisNet was built from the ground up as a production-grade Web3 & AI architecture consisting of four integrated layers:
Designing an Execution Access Control system that doesn't rely on centralized offchain gatekeepers or compromise agent composability. By anchoring permissions directly to ENSv2 subname nodes and enforcing spending rules inside Solidity, the safety checks are purely cryptographic and decentralized.

