← Back to home

Deffi

A DeFi portfolio management app powered by AI agents that helps users learn and invest in decentralized finance

Problem Statement

Deffi is DeFi portfolio manager that makes DeFi accessible to everyone.Deffi consists of two main agents:Onboarding agent. Which personalizes the user experience based on their risk tolerance and investment goals.Portfolio Manager agent. Which helps the user manage their portfolio and make investment decisions.Portfolio Manager has its own tools and can help the user itself:Wallet management tools - ask address, balance, send and receive native token, send and receive ERC20 tokensDefi protocols interaction tools - e.g swap, deposit USDC to Morpho vault, etc.Also he can hire other agents from pre-built set of agents or in future from agents App Store:Pre-built agents which are currently available:Defi strategies explanation agent - explain how a particular DeFi strategy works, a brief information about protocols involved (TVL, audits, twitter), risks and rewardsDefi strategies monitoring agent📱 Automated daily reports aggregating insights from DeFi-focused Telegram channels and on-chain data🔔 Configurable alerts for important DeFi events and opportunities2 and 3 implemented in a companion bot:CCT

Solution

Main appRTechnical Stack:Coinbase AgentKit for AI agent orchestration and DeFi interactions, customized for using on the frontend. Tools: walletActionProvider, customized Morpho actions provider, Aave actions Provider startedCoinbase Smart wallet for secure wallet management on the frontend, transactions batching and paying gas in USDCBase network (mainnet + Sepolia testnet) as primary blockchainLangChain for natural language processingReact/TypeScript+Vite frontendCoinbase offramp for wallet top up using fiat and paying for LLM requests in the future.Companion bot with DEFI Strategies explanation and monitoring agents:rhWe've been using AWS Bedrock as our core AI infrastructure for it, leveraging several key AWS technologies and integrations:Core Architecture:Amazon Bedrock for LLM orchestration and RAG (Retrieval Augmented Generation)Custom Knowledge Base built on AWS to store DeFi protocols data and historical strategiesAWS Lambda for serverless computeDynamoDB for real-time data storageAmazon SNS for notificationsKey Technical Components:LLM Integration:Used Bedrock's Claude model for strategy analysis and risk assessmentImplemented custom prompt engineering for DeFi-specific analysisBuilt RAG system to provide context from historical dataData Processing Pipeline:Created custom Knowledge Base using Bedrock KB to store:Protocol TVL dataHistorical strategiesRisk metricsAudit reportsImplemented real-time updates using DynamoDB streamsMulti-Language Support:Leveraged Bedrock's multilingual capabilities for translationBuilt custom tokenizers for DeFi-specific terminologyIntegration Layer:Built custom connectors for:Telegram APIDeFi Llama APIProtocol APIsNotable Technical Achievements:Developed a custom RAG implementation that combines real-time DeFi data with historical analysisCreated an efficient caching system for frequently accessed protocol dataBuilt a flexible plugin architecture for easy integration of new protocolsThe most "hacky" but effective solution was our custom prompt engineering system that dynamically generates context-aware prompts based on the type of DeFi strategy being analyzed, significantly improving the accuracy of the analysis.

Hackathon

Agentic Ethereum

2025

Prizes

  • 🏆

    AgentKit Pool Prize

    Coinbase Developer Platform

Contributors