AI-Yield-Architect
Maximize Your Yield. Maximize Your Impact.
Created on 8th November 2025
•
AI-Yield-Architect
Maximize Your Yield. Maximize Your Impact.
The problem AI-Yield-Architect solves
AI Yield Architect tackles four major problems for DeFi users:
- Overwhelming Complexity: The DeFi yield landscape is fragmented and complex. Users must manually track APYs, risks, and strategies across dozens of protocols like Aave, Morpho, Spark, and Yearn. AI Yield Architect simplifies this by aggregating them into a single, "deposit-and-forget" ERC-4626 vault.
- Static, Time-Consuming Management: Manually rebalancing positions to chase the best yields is time-consuming, gas-intensive, and impractical for most users. Our platform makes this task easier by using an AI Strategy Engine (powered by Google Gemini) to continuously analyze market data 24/7 and provide optimal, real-time allocation recommendations.
- Opaque Risk: High APYs often hide significant risk (e.g., smart contract vulnerabilities, low liquidity). AI Yield Architect makes yield farming safer by providing AI-driven risk assessments, analyzing protocol TVL, historical performance, and other metrics to recommend risk-adjusted strategies, not just the highest-APY "degen" plays.
- Friction Between Profit and Purpose: Most yield farming is purely extractive. Users profit from the ecosystem without a simple way to support the public goods (core devs, infrastructure) that make it possible. We solve this by integrating Octant v2, automatically and transparently donating 4.2% of all earned yield to public goods, allowing users to earn competitive returns while simultaneously funding the future of Ethereum.
Challenges I ran into
Building a multi-protocol, AI-driven vault that also donates yield is a complex task. The three biggest hurdles we faced were:
-
The ERC-4626
totalAssets()Calculation: Our entireAIYieldVaultis built on the ERC-4626 standard, where the vault's share price is derived from thetotalAssets()function. Our challenge was that our vault doesn't hold the assets directly; they are all deposited in external protocols (Aave, Morpho, Spark, Kalani).- The Bug: A simple
balanceOf(USDC)check on our vault returned 0, as all the funds were in the adapters. This meant the vault's share price never increased, and depositors couldn't redeem their accrued yield. - The Solution: We had to implement a standardized
getBalance()function in each protocol adapter (AaveAdapter.sol,MorphoAdapter.sol, etc.). The maintotalAssets()function now loops through all active adapters, callsgetBalance()on each, and sums the results. This was especially complex for theYearnAdapter, as we had to trust its internal calculations to get an accurate value for our vault-within-a-vault.
- The Bug: A simple
-
Implementing the Octant v2 "Yield Skimming" Strategy: Our 4.2% public goods donation is not a simple fee. It's a yield-donating strategy as defined by Octant v2.
- The Hurdle: We couldn't just take 4.2% of a deposit. We had to design our
harvest()function to only skim the profit (yield) generated across all four protocols, without ever touching the user's principal. - The Solution: This required a complex
harvest()function that, when triggered, calculates the vault's total assets minus its total liabilities (original deposits). This resulting "profit" is then split, with 4.2% being routed to the Octant v2 donation address and the rest being compounded back into the vault for depositors. Getting this "profit-only" calculation right was a significant smart contract security challenge.
- The Hurdle: We couldn't just take 4.2% of a deposit. We had to design our
-
Connecting Real-Time AI to On-Chain Data: The AI Strategy Engine is not a gimmick. It needs to provide real, actionable advice based on live market conditions, which presented a major infrastructure challenge.
- The Hurdle: You cannot call an LLM (like Google Gemini) directly from a smart contract. Furthermore, LLMs don't understand raw on-chain data (like APYs in 27-decimal
rayformat). - The Solution: We had to build a serverless backend using edge functions (
live-protocol-data) to act as a crucial middle layer. This backend constantly:- Pulls raw data from all 4 protocols (Aave, Morpho, etc.).
- Cleans and pre-processes this data into a simple, human-readable format (e.g., "Aave APY: 8.45%").
- Feeds this clean data to the Gemini AI as part of its prompt context.
- Receives the AI's natural language recommendation and streams it to the frontend.
This data pipeline was the most difficult off-chain component to build, as stale or badly formatted data would cause the AI to give useless or dangerous advice.
- The Hurdle: You cannot call an LLM (like Google Gemini) directly from a smart contract. Furthermore, LLMs don't understand raw on-chain data (like APYs in 27-decimal
Tracks Applied (9)
Best use of a Yield Donating Strategy
Most creative use of Octant v2 for public goods
Best use of Kalani
Best use of Morpho V2
Best tutorial for Octant v2 (written/video)
Best use of Aave v3 (Aave Vaults)
Best team from dev3pack
Best use of Spark
Best Use of Uniswap v4 Hooks
Technologies used
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
