.png&w=828&q=75)
AgentSwap was born from a simple question: why do liquidity providers still rely on human attention or centralized bots to manage their Uniswap V3 positions? The answer is trust — there was no standard for trustless, on-chain AI trading agents until ERC-8004. We built AgentSwap as a fully autonomous liquidity rebalancing system that operates entirely on-chain. The agent monitors WETH/USDC price action via Chainlink oracles and subgraph data, calculates optimal tick ranges, and executes concentrated liquidity repositioning through ERC-8004 limit order primitives — all without ever holding a private key or requiring a centralized operator. Architecture: An off-chain TypeScript worker queries The Graph for pool state and Chainlink for price feeds, then computes rebalancing signals. When thresholds are crossed, it submits an ERC-8004 agent transaction to our Agent.sol contract, which interacts with Vault.sol (ERC-20 share accounting) and calls Uniswap V3's NonfungiblePositionManager to burn the old position and mint a new one in the optimal range. The ERC-8004 standard is critical here — it defines a trustless delegation interface that lets any on-chain agent execute limit orders with provable constraints, removing the need for owners to trust operators with full key access. This is the missing primitive for autonomous DeFi. Tech stack: TypeScript, Hardhat, ethers.js, Solidity (ERC-8004 + ERC-20), Uniswap V3, The Graph subgraph queries, Chainlink Data Feeds, Alchemy node infrastructure. Deployed and tested on Sepolia testnet with full integration test suite. What's next: multi-asset support, gas optimization via EIP-4337 batching, and integration with cross-chain liquidity aggregators. AgentSwap is the foundation for a new class of trustless AI trading agents that operate with provable, auditable logic.
12 Apr 2026