Uniswap v4 protocol enabling private capital and AI trades with on-chain reasoning proofs
UniSkill is a Uniswap v4–native protocol that enables privacy-preserving, verifiable AI-driven trading. It combines zero-knowledge cryptography and Uniswap v4 Hooks to solve two major DeFi problems: opaque autonomous agents and idle private capital. Users deposit funds into a ZK-powered vault built with Noir, where deposits are stored as cryptographic commitments and withdrawals require zero-knowledge proofs, preserving anonymity and unlinkability. Rather than remaining idle, this private capital is routed into Uniswap v4 pools through custom hooks.
UniSkill introduces a new execution model where AI agents cannot trade freely. Every swap must include a Proof of Reasoning—a cryptographic commitment to the agent’s decision process, signed by a registered agent identity. A custom Uniswap v4 Hook verifies this proof on-chain in beforeSwap, ensuring the trade matches the committed action, satisfies timing constraints, and was produced by an authorized agent. Invalid or unverifiable trades are reverted at the protocol level.
By enforcing accountability for AI agents while preserving user privacy and capital efficiency, UniSkill transforms Uniswap v4 into a verifiable execution layer for autonomous finance. The result is MEV-resistant, auditable, and privacy-first DeFi infrastructure where both who funds a trade and why a trade happened are cryptographically guaranteed
UniSkill is built as a Uniswap v4–native protocol combining zero-knowledge cryptography, verifiable AI agents, and custom hook-based execution. The privacy layer (Cumulus) is implemented using Noir zero-knowledge circuits, which generate proofs for anonymous deposits and withdrawals. User deposits are committed on-chain using Poseidon hashes and stored in an incremental Merkle tree; withdrawals require a Noir-generated proof and a nullifier to prevent double spending, ensuring unlinkability between deposit and withdrawal addresses.
AI agents are powered by MolTBot, which generates trading decisions off-chain. For every trade, the agent produces a Proof of Reasoning by committing its decision path into a Merkle root and signing the intended swap parameters. This proof is passed to a custom Uniswap v4 Hook, implemented using the official v4-core contracts. The hook verifies agent authorization, validates the action commitment, enforces freshness constraints, and only then allows execution through the PoolManager.
Liquidity from the private vault is deployed into Uniswap v4 pools via an adapter contract, allowing private capital to remain productive without revealing individual LP identities. The project uses Foundry for Solidity testing, Hardhat/TypeScript for agent and swap orchestration, and Next.js for the frontend. A notable hack is repurposing Uniswap v4 hooks as an on-chain “policy engine” that enforces AI reasoning constraints at the protocol level—turning autonomous agents from opaque bots into verifiable, accountable actors.

