Ga naar de hoofdinhoud
Terug naar voorbeeldapps

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.

Frontend-framework/bibliotheek:
Reageren
Taal:
TypeScript
Bouwtool/ontwikkelingsserver:
Next.js
Voorbeeld van een app-preview

Overzicht

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.


tip

Learn how to build the AI Powered DeFi Yield Optimizer on Base in our technical guide here.

Vereisten

  1. Anthropic Claude API:

  2. Quicknode Account:

Snel aan de slag

1. Kloon de 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

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

Architectuur

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 │
└──────────────────────┘

Deploy on Vercel

Deploy with Vercel


Voorbeeld

Voorbeeld

Bijdragen en feedback
We horen graag wat je ervan vindt en staan open voor alle bijdragen aan deze voorbeeldapp!
Om problemen te melden of feedback te geven, maak je een GitHub-issue aan in de qn-gids-voorbeelden repository.
Volg deze stappen om een bijdrage te leveren:
  1. Maak een fork van de repository
  2. Maak een feature-branch aan:
    git checkout -b feature/amazing-feature
  3. Sla je wijzigingen op:
    git commit -m "Geweldige functie toevoegen"
  4. Pushen van je branch:
    git push origin feature/amazing-feature
  5. Dien een pull-verzoek in.