
概述
This project is an AI-powered DeFi yield farming optimizer that helps users build personalized portfolio strategies across Aerodrome Finance pools on Base network.
This example app is provided for educational and demonstration purposes only. Use at your own risk.
提示
Learn how to build the AI Powered DeFi Yield Optimizer on Base in our technical guide here.
先决条件
-
Anthropic Claude API:
- Sign up at console.anthropic.com
- Get API key
-
Quicknode Account:
- Sign up at quicknode.com
- Install the Aerodrome Swap API add-on
- Get endpoint URL
快速入门
1. Clone the Repository
git clone https://github.com/quiknode-labs/qn-guide-examples.git
cd qn-guide-examples/sample-dapps/ai-powered-defi-yield-optimizer
2. Install Dependencies
pnpm install
# or
npm install
3. Environment Configuration
cp .env.example .env
编辑 .env:
# Required for AI optimization
ANTHROPIC_API_KEY=your_claude_api_key_here
# Required for live Aerodrome data
NEXT_PUBLIC_QUICKNODE_ENDPOINT=https://your-quicknode-endpoint.com/your-api-key/
4. Run Development Server
pnpm dev
# or
npm run dev
Visit http://localhost:3000 to see the application.
建筑
System Overview
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ User Input │ │ AI Processing │ │ Pool Data API │
│ │ │ │ │ │
│ • Risk Quiz │───▶│ Claude AI API │◀───│ Quicknode API │
│ • Preferences │ │ • Analysis │ │ • Live Pools │
│ • Investment $ │ │ • Optimization │ │ • Token Data │
└─────────────────┘ │ • Reasoning │ │ • Verification │
└──────────────────┘ └─────────────────┘
│
▼
┌──────────────────────┐
│ Optimized Strategy │
│ │
│ • Pool Selection │
│ • Allocations │
│ • Risk Scores │
│ • Reasoning │
└──────────────────────┘
部署到 Vercel
预览

投稿与反馈
我们非常希望听到您的反馈,并欢迎大家为这个示例应用做出任何贡献!
如需报告问题或提供反馈,请在 qn-guide-示例 存储库。
如需贡献,请按照以下步骤操作:
- 分叉该仓库
- 创建一个功能分支:git checkout -b feature/amazing-feature
- 提交您的更改:git commit -m "添加超棒的功能"
- 推送您的分支:git push origin feature/amazing-feature
- 提交一个拉取请求。
探索更多示例应用