AI mandate-driven stablecoin yield copilot. Built for the DeFi Mullet Hackathon #1 (AI x Earn track).
Live: https://yieldpilot-iota.vercel.app
YieldPilot does not just find the highest yield. It enforces your rules.
- Connect your wallet
- App scans your USDC/USDT balances across Ethereum, Base, Arbitrum, and Optimism
- Describe your strategy in plain English or choose a preset mandate
- AI translates that strategy into a structured mandate with TVL, break-even, chain, and reward constraints
- App filters 659+ vaults against that mandate
- App fetches a Composer quote and calculates whether the move is economically worth it
- If the move passes your mandate and breaks even fast enough: execute
- If not: explicitly refuse and explain why your funds stay put
- App shows a visible decision trace from prompt to final verdict
The core differentiator is the combination of:
- natural-language mandate parsing
- visible AI decision trace
- deterministic vault ranking
- real Composer cost analysis
- refusal logic when the move is not worth it
GET /v1/vaultswith full pagination across all 659+ vaultsGET /v1/chainsfor supported chain metadataGET /v1/protocolsfor protocol metadata and maturity scoring- All requests are authed with
x-lifi-api-key(same key as the Composer routes) - Proxied through
GET /api/earnin the app so the browser does not depend on direct third-party API access
GET /v1/quoteto build deposit routes and extract gas/fee cost dataGET /v1/statusto track execution progress after deposit- Cost data feeds the break-even analysis engine
- viem
readContractfor USDC/USDT balances across 4 chains (Ethereum, Base, Arbitrum, Optimism)
POST /api/intentconverts a natural-language strategy into a custom mandate- Prefers Bankr LLM Gateway when
BANKR_LLM_KEYis present - Falls back to OpenAI when
OPENAI_API_KEYis present - Falls back to a deterministic parser when no model is configured
- AI output directly changes:
- cross-chain allowance
- TVL floor
- break-even ceiling
- reward-heavy exclusions
- APY improvement floor
Three presets remain, but they are no longer the only path.
Users can still choose:
| Mandate | TVL Floor | Max Break-Even | Cross-Chain | Reward-Heavy |
|---|---|---|---|---|
| Conservative | $100M | 7 days | No | Excluded |
| Balanced | $10M | 14 days | Allowed | Allowed |
| Aggressive | $1M | 30 days | Allowed | Allowed |
Or they can type a strategy like:
- "Keep me on the safest same-chain vault and do not bridge if payback is longer than 7 days."
- "Find me the best stablecoin yield above 5% even if it needs a bridge, but keep TVL above $50M."
That prompt becomes a custom typed mandate.
Before recommending any move, YieldPilot:
- Fetches a real Composer quote for the route
- Extracts total gas + fee cost in USD
- Calculates APY delta vs idle stablecoins at 0%
- Computes daily incremental yield
- Derives break-even days = route cost / daily yield improvement
- Compares against mandate threshold
If break-even exceeds the mandate limit, the move is refused with a clear explanation.
Vault selection stays deterministic. Factors:
- APY level (0-30 points)
- APY stability: 1d vs 30d drift (0-20 points)
- TVL depth (0-20 points)
- Protocol maturity tier (0-15 points)
- Same-chain bonus (0-15 points)
AI is used for intent translation, not for arbitrary vault picking. That means:
- AI converts vague user strategy into a strict mandate
- deterministic ranking selects the vault
- Composer verifies whether execution is economically worth it
This keeps AI load-bearing without making selection non-reproducible.
- Next.js 16 + TypeScript
- wagmi + RainbowKit for wallet connection
- viem for on-chain reads and transaction building
- Tailwind CSS 4
- LI.FI Earn Data API + Composer
- Bankr LLM Gateway / OpenAI API (optional, for natural-language mandates)
- Vercel for deployment
git clone https://github.com/dolepee/yieldpilot.git
cd yieldpilot
npm install
cp .env.local.example .env.local # add your LIFI_API_KEY
npm run dev| Variable | Description |
|---|---|
LIFI_API_KEY |
Composer API key from portal.li.fi |
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID |
WalletConnect project ID |
BANKR_LLM_KEY |
Optional. Enables Bankr-backed natural-language mandate parsing |
BANKR_LLM_MODEL |
Optional. Bankr model name, defaults to deepseek-v3.2 |
OPENAI_API_KEY |
Optional. Enables model-backed natural-language mandate parsing |
src/
app/
page.tsx # Main app flow
providers.tsx # wagmi + RainbowKit
api/quote/route.ts # Server-side Composer proxy
components/
Header.tsx # Nav + wallet connect
WalletSnapshot.tsx # Stablecoin balance display
MandatePicker.tsx # Mandate selection UI
RecommendationCard.tsx # Top vault recommendation
WorthItCard.tsx # Break-even analysis verdict
ExecutionTracker.tsx # Tx status polling
YieldStoryCard.tsx # Shareable result card
EarnStats.tsx # Vault/chain/APY stats
hooks/
useStablecoinBalances.ts # Multi-chain balance reads
useEarnData.ts # Vault/chain/protocol fetch
useLifiStatus.ts # Transaction status polling
lib/
constants.ts # Addresses, tiers, config
earn-api.ts # Earn Data API client
composer.ts # Composer quote client
mandates.ts # Mandate types and presets
ranking.ts # Deterministic vault ranking
worth-it.ts # Break-even analysis
demo.ts # Demo mode mock data
wagmi.ts # Wallet config
Built for the DeFi Mullet Hackathon #1 by LI.FI.
- Track: AI x Earn
- Duration: April 8-14, 2026
- Prize pool: $5,000 USDC
MIT