Autonomous AI treasury with Uniswap V4 dynamic fees that adapt to real-time market volatility
Velvet Arc, an autonomous treasury agent, manages DeFi capital across various blockchains. Users deposit USDC into a vault on Circle Arc, and the AI agent continuously monitors market conditions to optimize returns.
The agent closely observes ETH price volatility in real-time. During calm market conditions, it sets low swap fees (0.05%) to attract trading volume. Conversely, when volatility spikes, it increases fees (up to 1%) to capture premium from traders seeking liquidity during periods of chaos. In extreme situations, it activates a circuit breaker to prevent potential damage.
For instant off-chain payments, it uses Yellow Network state channels via the nitrolite SDK, enabling gas-free micropayments.
This intelligent yield strategy benefits passive depositors by providing an AI that actively adapts to market conditions. The AI updates Uniswap V4 hook fees on-chain based on data-driven decisions, ensuring that every fee change is a verifiable real transaction.
Velvet Arc maintains its own identity, accepts deposits from any blockchain through LI.FI, and operates transparently with all decisions logged on-chain.
Built with Next.js 14, TypeScript, and a strong emphasis on REAL on-chain transactions rather than simulations, this project leverages the power of SMART CONTRACTS (Solidity + Foundry).
On the Arc Testnet, VelvetVault operates as an ERC4626-style vault that accepts USDC deposits, issuing proportional shares. It employs agent-controlled bridging through Circle Gateway to facilitate seamless transactions.
On the Base Sepolia testnet, VelvetHook functions as an Uniswap V4 hook that implements beforeSwap and afterSwap mechanisms. These mechanisms dynamically override LP fees based on the volatility level, ensuring optimal trading conditions.
The agent logic, implemented in TypeScript, continuously fetches real ETH prices from the CoinGecko API every 30 seconds. It calculates 24-hour volatility and categorizes it into LOW, MEDIUM, HIGH, or EXTREME levels. The agent then executes on-chain transactions to update hook fees, providing transparent reasoning for each decision. All these actions are verifiable through the block explorer.
The frontend, built using React, wagmi, and viem, offers real-time event tracking via getLogs() from both Arc and Base. It resolves agent and user identities using ENS, querying the Ethereum mainnet for necessary information. Additionally, LI.FI widget integration facilitates cross-chain deposits, while Framer Motion animations enhance the 3D orb visualization.
Notable hacks include the requirement for a custom chain definition on the Arc Testnet due to its absence from standard chain lists. The project utilizes viem’s parseAbiItem for type-safe event parsing across different chains. Furthermore, dual-mode funding is employed, combining direct funding on the testnet with LI.FI support on the mainnet. Since LI.FI doesn’t support Arc testnet yet, ENS queries are directed to the mainnet, while transactions are processed on the respective testnets. This is managed through separate transports.
Five sponsor integrations working together: Uniswap V4 (dynamic hooks), Circle Arc (safe harbor vault), Yellow Network (state channels), LI.FI (cross-chain routing), and ENS (agent identity).

