Inspiration

The DeFi landscape offers incredible financial opportunities, but remains inaccessible to most users due to its complexity. We observed friends and colleagues consistently missing optimal yields, paying excessive fees, and making timing errors that cost them significantly. During a crypto winter, we noticed a critical insight: while token prices were down, DeFi protocols were still generating substantial yields, yet many retail investors had exited the market entirely. They were missing these opportunities due to the overwhelming complexity of navigating multiple protocols and optimizing strategies. We asked ourselves: what if we could democratize access to sophisticated DeFi strategies through AI-powered automation? What if we could build something that would level the playing field between retail users and institutional investors? That's how YieldSage.ai was born.

What it does

YieldSage.ai is an AI-powered DeFi yield optimization platform that:

Automatically optimizes yield across multiple NEAR Protocol DeFi platforms Implements personalized strategies based on each user's risk tolerance and investment goals Provides an AI advisor chatbot that explains strategies in plain language and offers personalized recommendations Executes complex transactions including yield farming, market making, dollar-cost averaging, and automated dip buying Continuously monitors portfolio performance and rebalances when beneficial Offers real-time analytics showing portfolio performance compared to benchmarks

The platform acts as a personal DeFi financial advisor and execution engine, making sophisticated yield strategies accessible to everyone, not just professionals.

How we built it

DeFi Yield Optimizer Agent is built as an early-stage application with a focus on establishing the core frontend and NEAR Protocol integration. We started by setting up the React application with TypeScript, Tailwind CSS, and Shadcn UI for a modern and user-friendly interface. The initial development focused on implementing the basic UI components, portfolio tracking, and wallet connection using @near-wallet-selector and near-api-js. The early stage is primarily frontend-focused, laying the groundwork for integrating the AI-powered optimization engine and more advanced features in subsequent development phases. We are currently in the process of developing and integrating the AI algorithms for yield strategy optimization.

Challenges we ran into

In the early stages of development, we encountered several challenges:

NEAR Protocol Integration Complexity: Integrating with the NEAR Protocol, particularly setting up secure and user-friendly wallet connections using @near-wallet-selector and managing interactions with NEAR smart contracts, presented initial hurdles. Ensuring smooth user onboarding and transaction management within the NEAR ecosystem required careful implementation. Frontend Development and UI Complexity: Building a responsive and intuitive user interface using React, TypeScript, and Tailwind CSS, while leveraging the component library Shadcn UI, required significant effort. Customizing and integrating the UI components to effectively display DeFi data and strategy options was a learning process. Anticipated AI Engine Integration: While the AI-powered optimization engine is still under development, we foresee challenges in seamlessly integrating complex AI algorithms with the frontend application. This includes data processing, real-time market analysis, and translating AI-driven insights into actionable yield strategies within the UI. Type Compatibility and Dependency Management: We experienced some type compatibility issues with the @near-wallet-selector library, requiring workarounds to ensure smooth integration within our TypeScript codebase. Managing dependencies and ensuring compatibility between different libraries also posed some challenges. Early Stage Application Limitations: As an early-stage application, we are currently focused on core functionalities. Expanding features, enhancing performance, and ensuring scalability will be ongoing challenges as the project evolves.

Accomplishments that we're proud of

Despite being an early-stage application, we are proud of several key accomplishments:

Functional User Interface: We have successfully built a functional and visually appealing user interface using React, TypeScript, Tailwind CSS, and Shadcn UI. This provides a solid foundation for user interaction and future feature additions. Seamless NEAR Wallet Integration: We've achieved smooth integration with NEAR Protocol wallets using @near-wallet-selector. Users can connect their wallets and interact with the application, which is crucial for a DeFi project. Core Feature Implementation (Frontend): We have implemented the frontend components for key features like portfolio tracking, strategy selection, and risk assessment. While the AI engine is still in development, the UI is prepared to display and utilize these features. Clear Project Structure and Technology Stack: We have established a well-structured project using a modern and relevant technology stack. This sets the stage for efficient development and scalability as we move forward. Addressing a Real-World DeFi Problem: We are proud to be tackling the complexity of DeFi yield optimization by creating an AI-powered solution that has the potential to empower users within the NEAR ecosystem. Overcoming Initial Technical Challenges: We successfully navigated the initial complexities of NEAR Protocol integration and frontend development, demonstrating our ability to overcome technical hurdles in this domain.

What we learned

Through the development of the DeFi Yield Optimizer Agent, we gained valuable insights and learned several key lessons:

Deepened Understanding of DeFi Complexity: We learned firsthand the intricacies of DeFi yield farming, including the multitude of strategies, protocols, and risks involved. This project provided a practical understanding of the challenges users face in navigating the DeFi space. NEAR Protocol Ecosystem Expertise: We significantly enhanced our expertise in developing applications within the NEAR Protocol ecosystem. This includes wallet integration using @near-wallet-selector, understanding NEAR smart contracts, and working with the NEAR API. Frontend Development Best Practices: We honed our skills in modern frontend development using React, TypeScript, Tailwind CSS, and Shadcn UI. We learned how to build a component-based UI, manage state effectively, and create a responsive user experience. Importance of User-Centric Design: We recognized the critical importance of creating a user-friendly interface for DeFi applications. Simplifying complex DeFi concepts and presenting them in an intuitive manner became a key focus. Anticipating AI Integration Challenges: While the AI engine is still in progress, we gained a clearer understanding of the challenges involved in integrating AI-powered solutions into DeFi applications. This includes data handling, real-time analysis, and bridging the gap between AI insights and user actions. Agile Development and Problem-Solving: As an early-stage project, we learned to be agile and adaptable in our development approach. We encountered and overcame technical challenges, iterated on our design, and prioritized core functionalities within a limited timeframe.

What's next for DeFi Yield Optimizer Agent(yieldsage.ai)

The immediate next steps for DeFi Yield Optimizer Agent are focused on building a fully functional version to onboard 1000 users for real-world testing. Our roadmap includes:

AI Engine Development and Integration: The top priority is to finalize the development of the AI-powered yield optimization engine. This involves completing the machine learning algorithms for market analysis, risk assessment, and strategy optimization. We will then integrate this engine with the frontend application to enable automated yield strategy recommendations. Backend Infrastructure Development: To support the AI engine and user data, we will develop a robust backend infrastructure. This includes database setup, API development for data retrieval and processing, and secure data management practices. Smart Contract Integration and Automation: We will implement the smart contract interactions necessary for automated yield farming execution on NEAR Protocol. This involves integrating with DeFi protocols like Ref Finance and Burrow, enabling the agent to automatically execute trades and manage user funds based on AI-driven strategies. Enhanced Security Measures: Security is paramount in DeFi. We will implement comprehensive security measures throughout the application, including smart contract audits, secure wallet integrations, and robust data encryption to protect user assets and information. User Testing and Feedback Iteration: We aim to release a beta version to 1000 users for real-world testing. We will actively collect user feedback to identify areas for improvement, refine the AI algorithms, and enhance the user experience. This iterative process will be crucial for building a user-centric and effective yield optimization platform. Feature Expansion and Protocol Support: Based on user feedback and market demand, we plan to expand the features of the agent. This may include adding support for more DeFi protocols on NEAR, incorporating advanced risk management tools, and offering more granular strategy customization options. Our goal is to move from this early-stage application to a fully functional, secure, and user-tested platform that can genuinely empower users to optimize their DeFi yields on NEAR Protocol. Reaching 1000 users for testing is a key milestone in validating our approach and driving further development.

Built With

  • autoprefixer-linting:-eslint-ui-components:-shadcn-ui
  • class-variance-authority
  • clsx
  • css
  • embla-carousel
  • frontend:-languages:-typescript
  • here-wallet
  • html-frameworks/libraries:-react
  • input-otp
  • javascript
  • lucide
  • lucide-react
  • meteor-wallet
  • modal-ui)-other:-build-tool:-vite-package-manager:-npm-styling:-postcss
  • my-near-wallet
  • near-wallet-selector-(core
  • react-day-picker
  • react-hook-form
  • react-query
  • react-resizable-panels-near-protocol-integration:-libraries/sdks:-near-api-js
  • react-router
  • recharts
  • sender
  • shadcn-ui
  • sonner
  • tailwind-css
  • tailwind-merge
  • vaul
  • zustand
Share this project:

Updates