ChainHopper Agent

AI agent that analyzes your crosschain assets and generates optimal rebalancing strategies via LI.FI

Visit Repo
ChainHopper Agent banner

About

ChainHopper Agent is an AI-powered portfolio rebalancer that works across Ethereum, Arbitrum, Base, and Optimism. Enter an ENS name or wallet address, and the agent fetches your token balances across all chains, analyzes your current allocation, and uses GPT-4o to generate a personalized rebalancing strategy. It then fetches real LI.FI quotes for each recommended swap or bridge, ready to execute. The goal: make crosschain DeFi portfolio management as simple as chatting with an AI assistant.

How it's made

Built with TypeScript and Next.js 16. ENS resolution uses viem to convert names like vitalik.eth to addresses. Portfolio fetching hits multiple RPC endpoints in parallel across 4 chains (ETH, ARB, BASE, OP) for native ETH plus USDC/USDT/WETH. The AI brain is OpenAI's GPT-4o with structured JSON output, we engineered a system prompt that outputs valid RebalanceAction objects with chain IDs. LI.FI's REST API provides real time crosschain quotes. Frontend uses RainbowKit for wallet connect. The hacky part: we lazy-load the OpenAI client to avoid API key errors in demo mode, and we parallelize all balance fetches to keep latency under 3 seconds despite hitting 16 RPC calls.

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 299 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.

lifi agents

A multi-agent system that automates cross-chain DeFi strategies using LI.FI as the execution layer.

ChainSage

ChainSage: AI-powered DeFi strategy optimizer across multiple chains. Leverages Zircuit for high-performance smart contracts, LayerZero for cross-chain messaging, and Phala Network for confidential AI computations. Maximize your DeFi returns with personalized, secure insights.