Skip to content

๐Ÿค– AI Agent (YieldBot)

The AI agent, called YieldBot, is a plugin built using ElizaOS that recommends optimal DeFi strategies based on market conditions and user risk preference. It runs off-chain and powers the strategy selection logic for the vaults.


๐Ÿง  Core Functionality

  1. Market Analysis

  2. Uses CoinGecko to fetch 7-day and 25-day price trends.

  3. Detects whether the market is trending bullish or bearish.

  4. Yield Pool Discovery

  5. Fetches current APYs from DeFiLlama:

    • Aave (Low Risk)
    • Morpho Blue (High Risk)
  6. Can be extended to Curve, Pendle, Compound, etc.

  7. Strategy Recommendation

  8. Based on market trend and user-selected risk (low/high),

  9. Chooses the best performing pool in that category.

  10. KV Storage

  11. Saves the selected strategy in ElizaOS KV Store:

    • Key: "strategy:low" or "strategy:high"
    • Value: JSON with pool details and APY
  12. Automation

  13. Output is used by Chainlink Automation to call allocateFunds() on-chain.

๐Ÿงช Sample KV Output

{
  "strategy": "0x9d0C7e2fFbC982F7FAb31E9b79a9aEecf87c0A81",
  "apy": "4.92%",
  "risk": "low",
  "platform": "aave"
}