Agentic Trade Router

An agent that auto-routes swaps on Uniswap v4 based on user prefrences stored in ENS text records.

HackMoney 2026Shipped January 30, 2026Prize winner Dormant#ai-agents#defi#identity#infra#security#ethereum
Visit Repo
Agentic Trade Router banner

About

Agentic Trade Router turns your ENS name into a portable trading profile. You store your swap preferences like: slippage tolerance, fee tiers, routing hops, and deadlines as ENS text records and they automatically apply across any dApp that integrates the router. The AgenticRouter contract on Sepolia reads these parameters from your ENS and enforces them on-chain through Uniswap v4's Universal Router with slippage protection built in. You can still override settings for individual swaps when you need to. This tackles two real problems: ENS names are mostly just used for address resolution when they could do way more, and configuring swap parameters on every DEX you use is tedious and error-prone. The frontend is a Next.js app deployed on Vercel with RainbowKit wallet connection and live mainnet ENS integration.

How it's made

The project connects ENS, Uniswap v4, and Permit2 across two chains. ENS text records live on mainnet, while swaps execute on Sepolia where Uniswap v4 is deployed. The frontend is Next.js 14 with TypeScript, wagmi v2, RainbowKit for wallet connection, and TanStack Query for caching ENS reads with a 1-minute stale time to avoid hammering RPC endpoints. The smart contract (AgenticRouter.sol, Solidity 0.8.24, Foundry) takes a SwapPreferences struct with slippage in basis points, fee tier, max hops, and deadline, validates everything on-chain, then routes through Uniswap v4's Universal Router. It wraps ETH/WETH automatically, uses Permit2 for 1-hour token approvals instead of infinite ones, and calculates minimum output amounts with on-chain slippage math. Token addresses get sorted to match Uniswap v4's PoolKey format, and hardcoded sqrt price limits block MEV attacks. The weirdest part is the dual-chain setup: you write preferences to mainnet ENS via the Public Resolver, but the swap contract runs on Sepolia testnet. The frontend handles this by reading from mainnet and executing on Sepolia in the same session. There's also a fallback system—if no ENS preferences exist, it uses hardcoded defaults (0.5% slippage, 3000 bps fee tier, 2 hops, 20-minute deadline) so everything works even without an ENS name. The contract has 14 Foundry tests including fuzz tests for slippage calculations, and the frontend is live on Vercel with security headers.

Prizes

  • ENS · Integrate ENS · Integrate ENS

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

DormantLast push 300 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

WalletBuddy

Swap on Uniswap v3 using ENS text records to enforce user-defined slippage and fee settings.

agentx

AGENTX: Autonomous AI agents that live on-chain. ENS identities, real swaps on Base, P2P over AXL.

Intent Swap

Agent-executed intent-based swaps on Uniswap v4 using hooks for onchain enforcement