DeFi buddy
Auto-monitors your portfolio & sends ready-to-approve transactions when critical events occur.
Problem Statement
DeFi Buddy automatically monitors your DeFi portfolio and prepares transactions for you to approve, ensuring you never miss critical information that could impact your positions. When you have a position on Aave and a hack is announced, or bad debt is detected, you want to react immediately—see the news first, get alerted instantly, and respond easily. That's exactly what DeFi Buddy enables.The system works by analyzing your portfolio through a Next.js web dashboard that fetches your positions from Octav. The backend automatically creates monitoring workflows via Otomato for each protocol you're using (Aave, Uniswap, ENS, etc.), tracking on-chain events, protocol updates, security alerts, and market conditions. Every 15 minutes, the backend refetches your portfolio, detects changes, and dynamically starts or stops workflows based on your current positions. When a workflow is triggered—such as health factor drops, liquidity going out of range, or security issues—Otomato sends a notification to an XMTP agent, which analyzes the context and proposes a ready-to-approve transaction directly to your mobile device. This creates a seamless flow from portfolio monitoring to actionable transaction proposals, ensuring you're always informed and can react quickly to protect or optimize your DeFi positions.
Solution
DeFi Buddy is built as a three-component system: a Next.js frontend (React, TypeScript, Tailwind CSS), an Express.js backend, and an XMTP agent. The frontend uses the Octav Portfolio API to fetch and visualize portfolio data, displaying positions across protocols in a modern dashboard. The backend leverages the Otomato SDK to create and manage event-driven workflows that monitor on-chain events, protocol updates, and security alerts. It stores wallet data locally in JSON files and implements a 15-minute polling mechanism to detect portfolio changes and dynamically adjust monitoring workflows.The XMTP agent, built with the XMTP Agent SDK, receives workflow triggers from Otomato and uses natural language processing to analyze context and propose appropriate blockchain transactions. The agent can handle USDC transfers, Aave operations, and other DeFi actions, sending ready-to-approve transaction proposals directly to users' mobile wallets via XMTP. The integration between Otomato and XMTP enables real-time notifications with actionable transaction proposals, creating a seamless user experience. The system uses viem for blockchain interactions and implements intelligent message analysis to determine when and what transactions to propose based on the workflow context.
Hackathon
ETHGlobal Buenos Aires
2025
Prizes
- 🏆
Best App built using Octav API
Octav
- 🏆
Best Use of the Agent SDK
XMTP
Contributors
- clementh59
24 contributions
- PercheEtienne
19 contributions