DeFi Garden

io.github.alex0xhodlerv1.0.0更新于 Oct 3, 2026

Underwritten DeFi yield discovery & goal planning for AI agents on Base & EVM.

已验证Streamable HTTP可网页运行FinanceData & Analytics

概览

AI 生成的概览

让助手借助 DefiLlama 与 Hyperliquid 数据探索 DeFi 收益池并规划目标储蓄。

功能
DeFi Garden 提供远程 MCP 端点,用于 DeFi 收益发现与储蓄规划。功能包括跨多条区块链和多种协议类型的多链资金池浏览、含 30 天平均 APY 与基础收益和奖励排放分离的深度资金池分析,以及 Hyperliquid 永续合约的资金费率收割计算器。信任规则会过滤异常 APY 峰值和低流动性资金池,收益预测由确定性计算得出而非模型估算。
适用场景
适合助手需要比较 DeFi 收益、解释资金池机制,或围绕经常性支出制定目标储蓄计划时使用。也适用于 Hyperliquid 上的 delta 中性资金费率分析。不用于执行交易或管理资金。
运行要求
使用提供方主机上的远程 streamable HTTP 端点;未声明需要安装包、API 密钥或环境变量。需要能访问提供方及其上游数据源的网络。
安装前请注意
该服务器被描述为只读的分析与规划工具,但它是第三方远程端点,因此查询内容及发送的上下文会离开用户设备。收益数字是估算而非保证,README 提到对可变排放强制施加衰减折扣。清单未要求任何凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 DeFi Garden,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "defi-garden": {
      "type": "http",
      "url": "https://www.defi.garden/api/mcp"
    }
  }
}

README

🌱 DeFi Garden

Calm, honest DeFi yield discovery and goal-based savings planning.

DeFi Garden is a static, zero-backend, zero-build-step web application built on the DefiLlama yields API, designed for cautious savers and DeFi operators who value trust, realistic projections, and mathematical transparency over speculative hype.

[Live Demo] [MIT License] [React 18 UMD]


🌟 The Two Core Faces of DeFi Garden

DeFi Garden serves two distinct workflows through an inline, zero-flash IA router (window.__APP_MODE in home.html):

1. 🪴 Garden Planner (Default Experience — / and plan.html)

  • Goal-First Conversational Savings: Plan savings around real-life goals (subscriptions, gadgets, life milestones) rather than chasing abstract APY numbers.
  • Yield-Funded Paradigm: "Buy it outright and the money's gone. Garden it and you keep the money AND get the thing."
  • Blended Yield Rates: Calculates honest "forever numbers" — the capital required so ongoing live yield pays recurring bills automatically.
  • Degen Honesty: Applies a mandatory ⅓ decay haircut to variable farm/reward emissions, ensuring users plan around realistic long-term carry.

2. 📊 Analytics & Yield Discovery (/?token=, /?chain=, /?pool=, /?app=1)

  • Multi-Chain Pool Explorer: Real-time yield monitoring across 50+ blockchains (Ethereum, Arbitrum, Base, Hyperliquid, Solana, etc.) and all major protocol types (Lending, Staking, LP/DEX, Yield Farming).
  • Deep Pool Breakdown (PoolDetail.js): In-depth pool analytics, 30-day mean APY tracking, base vs. reward emission separation, and impermanent loss risk indicators.
  • Funding Harvest Module (/hype-harvest.html / /?module=hype-harvest): Delta-neutral cash-and-carry funding harvest calculator for Hyperliquid perps with live basis spread tracking and dual-oracle divergence tripwires.

🛡️ Trust Rails (The Core Moat)

Every metric rendered across DeFi Garden derives from live on-chain and API data through strict, non-negotiable trust rails:

  1. APY_SANITY_LIMIT = 1000%: Anomalous, short-lived spikes can never enter a plan. In analytics, anomalous pools are demoted, flagged with ⚠, and forced to high-risk classification.
  2. DEFAULT_MIN_TVL = $100K: Low-liquidity pools below the safety floor are filtered out to protect savers from illiquid exits and sudden deprecations.
  3. Dual-Oracle Divergence Guard: Modules verify mark vs. oracle price divergence ($<15\text{ bps}$ tripwire) to alert on basis dislocation and squeeze risk.
  4. Deterministic Math Layer: LLMs may narrate or explain mechanisms, but numbers, projections, and compounded yields are calculated deterministically.

🎨 Design System — "Quiet"

DeFi Garden uses the "Quiet" design system — a restrained, clean-minimal, table-first interface designed for clarity and focus:

  • Surface Tokens (--ui-*):
    • Backgrounds: --ui-bg (#F7F8FA light / #161A20 dark), --ui-surface (#FFFFFF / #1E242C), --ui-surface-muted, --ui-surface-sunken.
    • Separation: Single-pixel hairline borders (--ui-border: #E4E7EE, --ui-border-strong: #CBD2DF).
    • Text: High-contrast hierarchy (--ui-text: #10151F, --ui-text-secondary: #5A6478, --ui-text-muted: #8A93A6).
    • Accents: Fixed trust-blue palette (--ui-accent: #3B82F6, --ui-accent-hover: #2563EB, --ui-accent-soft: #EFF5FF).
    • Radii: Clean geometric squircles (--ui-radius-sm: 8px, --ui-radius-md: 12px, --ui-radius-lg: 16px, --ui-radius-pill: 999px).
  • No Heavy Shadows or Skeuomorphic Skeins: Depth is created through crisp hairline borders and subtle surface tone steps, not artificial dual-direction shadows or background gradients.
  • Physical Press Physics: Interactive controls sink 1px on :active (transform: translateY(1px)), respecting prefers-reduced-motion.
  • First-Class Bilingual Support (translations.js): Complete English (en) and Korean (ko) localization synchronized across all user-facing strings.

🛠️ Architecture & Technology Stack

  • Zero Build Step: Runs natively on vanilla web standards. React 18 UMD loaded via script tag; components written in pure React.createElement (no JSX compilation step required).
  • Data Ingestion: Client-side integration with https://yields.llama.fi/pools and Hyperliquid Info API (https://api.hyperliquid.xyz/info).
  • State Management:
    • Theme: localStorage.getItem('theme') with data-theme="light|dark" attribute on <html>.
    • Language: URL param ?lang= + localStorage.getItem('defi-garden-lang').
    • Saved Plan: localStorage.getItem('garden-plan').
  • SEO & Machine Readability:
    • Automated dynamic sitemaps (generate-sitemap.js).
    • AI Context endpoints: llms.txt and llms-full.txt (generate-llms.js).
    • Model Context Protocol (MCP) server integration (mcp_server.js).

📁 Repository Structure

defi_garden/├── home.html                   # Master router & analytics app shell├── plan.html                   # Standalone Garden Planner entry├── hype-harvest.html           # HYPE Funding Harvest module├── planner.js                  # Conversational Garden Planner engine├── app.js                      # Core analytics grid & pool filtering├── PoolDetail.js               # In-depth pool analytics & calculator├── hype-harvest.js             # HYPE funding harvest React UMD module├── translations.js             # Bilingual dictionary (EN + KO)├── translations.min.js         # Production-minified translation dictionary├── style.css                   # "Quiet" design system tokens & base styles├── planner-styles.css          # Planner-specific layout styles├── pool-detail-styles.css      # Pool detail drawer styles├── hype-harvest.css            # Funding harvest layout styles├── trust-rails.js              # Shared trust-rail constants├── canonical.js                # URL canonicalization logic├── keeper/                     # Autonomous execution & risk keeper scripts│   ├── keeper_engine.py        # Core risk keeper engine│   └── hype_funding_harvest.py # Hyperliquid HYPE funding rate worker├── tests/                      # Python unit & integration test suite│   ├── test_keeper_engine.py│   └── test_keeper_hype_harvest.py└── test_*.js                   # JavaScript offline test suite (71+ test files)

🧪 Development & Testing

DeFi Garden requires no build pipeline. Serve locally with any static HTTP server:

bash
# Start local serverpython3 -m http.server 8000# Open in browser: http://localhost:8000

Running Tests

bash
# Run all unit tests in fast plain modenpm run test:fast
# Run the complete test suite (plain + browser)npm test
# Minify production assetsnpm run minify

📜 License

MIT License. See LICENSE for details.

来源:README.md,提交 349305c

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.0.0最新Oct 3, 2026