AI-powered, MEV-resistant autonomous liquidity manager for Uniswap v4.
Sentinel Agent is an autonomous, MEV-resistant liquidity management protocol built on Uniswap v4. It fundamentally addresses the critical "Loss-Versus-Rebalancing" (LVR) problem, which costs AMM liquidity providers roughly 5-7% annually due to stale pricing and arbitrage leakage. Unlike standard dynamic fee models, Sentinel employs a novel three-layer architecture to demonstrate true Agentic Finance:
By combining verifiable off-chain intelligence with transparent on-chain execution, Sentinel Agent transforms AI from a passive observer into a first-class economic actor that actively protects and grows on-chain capital.
Sentinel Agent is architected as a hybrid on-chain/off-chain system, bridging Uniswap v4 hooks with an autonomous Node.js agent swarm. The On-Chain Layer (Solidity & Foundry): We built SentinelHook inheriting from BaseHook, implementing a custom dynamic fee engine. The core innovation lies in the beforeSwap callback, which decodes hookData containing cryptographically signed instructions from our off-chain agents. We utilized HookMiner in Foundry to brute-force a salt that produced a contract address with the specific flags 0x4840, granting us permission to intercept beforeSwap, afterSwap, and beforeAddLiquidity calls. We also implemented an AgentRegistry based on ERC-8004 principles to manage agent identities and reputation scores on-chain.
The Off-Chain Swarm (Node.js & Ethers.js): The agent system is modularized into three distinct entities:
Notable & "Hacky" Implementations: To close the feedback loop without expensive on-chain queries, we engineered a semantic event system where the hook emits MarketHealth events (volatility index, imbalance ratio) in afterSwap. The agents listen to these specific events to trigger immediate recalculations for the next block. For the hackathon, we simulated the Trusted Execution Environment (TEE) attestation layer using standard ECDSA signatures from authorized agent wallets, proving the concept of verifiable off-chain intelligence controlling on-chain liquidity.

