← Back to home

Magpie

Magpie is your AI co-pilot for discovering, executing & protecting crypto investments.

Problem Statement

Magpie: The AI-powered DeFi Co-Pilot for Everyday Investors Overview Magpie is a DeFi AI (DeFAI) consumer application designed to simplify and automate the way users discover, execute, and protect crypto investments β€” all in a few clicks. It’s built for users who want access to profitable crypto strategies without spending hours analyzing markets or understanding complex DeFi tools.Whether you're a retail investor, a new entrant into crypto, or a passive user seeking automated strategies, Magpie helps you invest smarter, faster, and safer using real-time market data, AI-generated insights, and seamless execution.Core Features & Flow 🧠 1. Discoverability β€” Real-Time Market Intelligence Magpie continuously gathers data from on-chain and off-chain sources to power decision-making:Top Trader Insights: Aggregates data from the best-performing traders across multiple chains. Captures 25+ performance metrics like:Sharpe RatioReturn RateWin/Loss RatioAverage Holding PeriodToken Momentum Tracking: Identifies top-performing tokens in real-time by tracking PnL across trading pairs.Whale Movements: Tracks significant token movements by whales to signal bullish or bearish trends.PnL via 1inch API: Uses real-time data to fetch historical and current Profit and Loss stats from 1inch.πŸ“¦ All this data is cached in Redis (or CSV for MVP) before being processed and stored in a structured database.βš™οΈ 2. Strategy Creation β€” AI-Powered Investment Planning Magpie uses advanced AI models (LLMs like DeepSeek-R1.1.5B) to generate investment strategies based on the collected data:Analyzes performance metrics to select traders or tokens worth mimicking.Generates strategy outlines with estimated returns, risks, and holding periods.Uses prompt engineering with Python to ensure strategies align with user goals (e.g. low risk, short term, high growth).Strategies are shown to the user with PNL projections and rationale, offering clear choices without requiring technical knowledge.πŸš€ 3. Execution β€” One-Click, Smart Trade Routing Once a strategy is selected, users can instantly invest with one signature:Magpie integrates 1inch Fusion to:Route trades optimally across liquidity sourcesBatch trades for gas optimizationSecure better pricing with MEV protectionAll positions are created non-custodially, ensuring users always retain control of their funds.πŸ”’ 4. Protection β€” Real-Time Risk Monitoring Each strategy has built-in variable thresholds and stop-loss triggers:If a token or portfolio drops below a defined threshold, Magpie triggers an "intent to sell", offloading risk automatically.This allows automated exits without manual intervention, ensuring capital protection.Future integration with Guardian-style AI monitoring will allow deeper context awareness (e.g. macro events, whale dumping, chain outages).πŸ“± 5. Cross-Platform Interface Magpie is built using:React Native for seamless web and mobile app supportA fast backend powered by Rust and TypeScriptPython-based data pipelines for modeling and prompt engineeringTechnology Stack Frontend: React Native (Web & Mobile)Backend: Rust + TypeScriptData Layer: Python (LLM parsing, metrics processing)LLM: DeepSeek R1.1.5B (for generating strategies)Execution: 1inch Fusion + user signatureCaching: Redis or flat-file CSV (MVP)Monitoring: Rule-based engine for live position trackingWhat Problem Does Magpie Solve? Most users:Don’t know where to start in DeFiStruggle to evaluate trading strategies or tokensFind it hard to track whale activity and market sentimentAre at risk of holding positions too long or panic sellingMagpie solves this by automating the full lifecycle of investing β€” from discovery to execution to monitoring β€” using AI and DeFi infrastructure.MVP Summary The MVP version of Magpie delivers:Aggregated insights from top tradersReal-time token and whale trackingAI-generated investment strategiesOne-click execution using 1inchAutomated monitoring with exit protection

Solution

Flow: Discoverablity:Data collection:Aggregates top traders data, fetches traders metrics which included 25 data points includes sharpe ratio, return rate etc.Fetches the PnL using the 1inch api.Collects top tokens performing on each tracks it pnl performance with different pairs, track top whales movement of it.Strategy Creation:Above data is stored in cache first(redis or csv) and After data processing it’s stored in DBUsing the data collected it parses through the LLM models where we it figures best investment strategies with estimated pnl based on available data.Execution:Using 1inch fusion, we execute the investment in one click after collecting user’s signatures.Monitoring:Within strategy variable threshold is set for each holding, which trigger intent selling of the positions bought at magpie.frontend is crossplatform support web and mobile app using react native. backend is created using rust and typescript. Data is using python LLM for testing we are using deepseek-r1.1.5B and Python for prompt engineeringFor MVP: The app aggregates top trader insights, automates strategy execution, and ensures risk management through real-time portfolio monitoring.

Hackathon

ETHGlobal Taipei

2025

Contributors