WhisperFi

AI-powered DeFi assistant: chat naturally to swap, bridge, and manage crypto with built-in privacy.

WhisperFi

Created At

HackMoney 2026

Winner of

ENS

ENS - Integrate ENS

Prize Pool

Project Description

WhisperFi is a chat-based DeFi interface that uses Claude AI to turn natural language into privacy-optimized crypto transactions. Users type what they want ("swap 5 ETH for USDC with maximum privacy") and the AI parses their intent, scores MEV/front-running risk, and generates an execution plan — splitting orders, adding time delays, or routing cross-chain to protect trades. Built on Uniswap v4 for swaps, LI.FI for cross-chain bridging, and ENS for a decentralized strategy marketplace where users can share and discover privacy strategies.

How it's Made

WhisperFi is built on Next.js 16 (App Router with Turbopack) and styled with Tailwind CSS v4 and shadcn/ui components.

The core AI pipeline uses Claude Sonnet 4 via the Anthropic SDK with structured tool use — not free-form text generation. We defined three tools (parse_defi_intent, analyze_privacy, optimize_strategy) that Claude calls to return typed JSON. The API route streams results to the client via Server-Sent Events, so the UI updates in stages: parsing, privacy analysis, strategy optimization, and optionally a LI.FI quote.

For Uniswap v4, we build swap transactions targeting the Universal Router, encoding pool keys with viem's encodeAbiParameters and encodePacked. The privacy layer splits large orders into randomized chunks with time delays between them to prevent MEV bots from detecting the full trade size.

LI.FI SDK powers cross-chain operations — when Claude detects a cross-chain intent (different source/destination chains), we fetch real-time quotes from LI.FI's aggregator and include the bridge transaction data in the execution plan. For maximum privacy, the optimizer routes through an intermediate chain to break the on-chain link between source and destination.

ENS integration stores and retrieves community privacy strategies as text records (keyed under com.whisperfi.strategy.*), creating a decentralized marketplace where users can publish and browse strategies on-chain.

The execution engine is a state machine built with wagmi hooks (useSendTransaction, useSwitchChain) that walks through multi-step plans — handling token approvals, chain switching, swap execution, timed waits with live countdowns, and bridge transactions — with full cancellation and error recovery.

background image mobile

Join the mailing list

Get the latest news and updates