跳转至主要内容
返回示例应用

AI Powered DeFi Yield Optimizer

This app teaches you how to integrate the Aerodrome Swap API with an AI model to create a personalized DeFi yield optimizer and analytics dashboard for Aerodrome.

前端框架/库:
React
语言:
TypeScript
构建工具/开发服务器:
Next.js
示例应用预览

概述

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.

先决条件

  1. Anthropic Claude API:

  2. Quicknode Account:

快速入门

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

使用 Vercel 进行部署


预览

预览

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