---
title: "DeFi Portfolio Monitor — Daily risk assessment and yield opportunities via DefiLlama"
description: "You are my DeFi portfolio monitor.\n\nFirst, read my portfolio from memory at defi/portfolio.md using memory_read.\nIf the file does not exist, create it with this example portfolio and confirm:\n\n# My DeFi Portfolio\n- Lido: 2 ETH staked\n- Aave: $500 USDC supplied\n- Uniswap: $300 ETH/USDC LP\n\nThen do the following:\n\n1. For each protocol in my portfolio, fetch its current data from DefiLlama:\nhttps://api.llama.fi/protocol/[protocol-slug]\n(slugs: lido, aave, uniswap-v3 — map protocol names to slugs yourself)\n\nExtract for each:\n- Current TVL\n- TVL change 24h (%)\n- TVL change 7d (%)\n\n2. Fetch the top 5 stablecoin yields from:\nhttps://yields.llama.fi/pools\n\nFilter only pools where:\n- stablecoin = true\n- apy > 5%\n- tvlUsd > 1000000\n\n3. Based on the data, evaluate risk for each of my positions:\n- TVL dropped >20% in 7d = HIGH RISK\n- TVL dropped 10-20% in 7d = MEDIUM RISK\n- TVL stable or growing = LOW RISK\n\n4. Send me a Telegram message in this format:\n\n\"📊 DeFi Portfolio Report\n\n[Protocol] — [my position]\n💰 TVL: $[X]B | 24h: [X]% | 7d: [X]%\n⚠️ Risk: [LOW/MEDIUM/HIGH]\n💡 [one line recommendation]\n\n---\n🌾 Best yield opportunities right now:\n1. [Pool] — [APY]% APY | TVL: $[X]M\n2. [Pool] — [APY]% APY | TVL: $[X]M\n3. [Pool] — [APY]% APY | TVL: $[X]M\n\nOverall portfolio health: [GOOD/WATCH/DANGER]\"\n\nCreate a routine that runs every day at 9:00 AM and executes this entire portfolio check automatically."
canonical: "https://hub.ironclaw.com/usecases/defi-portfolio-monitor-daily-risk-assessment-and-yield-opportunities-via-defillama"
markdown: "https://hub.ironclaw.com/usecases/defi-portfolio-monitor-daily-risk-assessment-and-yield-opportunities-via-defillama.md"
type: "use-case"
categories: ["Personal assistant","Web 3 / Crypto","Automation"]
author: "Evgeny"
---

# DeFi Portfolio Monitor — Daily risk assessment and yield opportunities via DefiLlama

## Example Prompt

> You are my DeFi portfolio monitor.
> 
> First, read my portfolio from memory at defi/portfolio.md using memory_read.
> If the file does not exist, create it with this example portfolio and confirm:
> 
> # My DeFi Portfolio
> - Lido: 2 ETH staked
> - Aave: $500 USDC supplied
> - Uniswap: $300 ETH/USDC LP
> 
> Then do the following:
> 
> 1. For each protocol in my portfolio, fetch its current data from DefiLlama:
> https://api.llama.fi/protocol/[protocol-slug]
> (slugs: lido, aave, uniswap-v3 — map protocol names to slugs yourself)
> 
> Extract for each:
> - Current TVL
> - TVL change 24h (%)
> - TVL change 7d (%)
> 
> 2. Fetch the top 5 stablecoin yields from:
> https://yields.llama.fi/pools
> 
> Filter only pools where:
> - stablecoin = true
> - apy > 5%
> - tvlUsd > 1000000
> 
> 3. Based on the data, evaluate risk for each of my positions:
> - TVL dropped >20% in 7d = HIGH RISK
> - TVL dropped 10-20% in 7d = MEDIUM RISK
> - TVL stable or growing = LOW RISK
> 
> 4. Send me a Telegram message in this format:
> 
> "📊 DeFi Portfolio Report
> 
> [Protocol] — [my position]
> 💰 TVL: $[X]B | 24h: [X]% | 7d: [X]%
> ⚠️ Risk: [LOW/MEDIUM/HIGH]
> 💡 [one line recommendation]
> 
> ---
> 🌾 Best yield opportunities right now:
> 1. [Pool] — [APY]% APY | TVL: $[X]M
> 2. [Pool] — [APY]% APY | TVL: $[X]M
> 3. [Pool] — [APY]% APY | TVL: $[X]M
> 
> Overall portfolio health: [GOOD/WATCH/DANGER]"
> 
> Create a routine that runs every day at 9:00 AM and executes this entire portfolio check automatically.

## What the Agent Does

The agent stores your DeFi positions in persistent memory.

Every morning at 9 AM it fetches live TVL data for each protocol from DefiLlama and evaluates risk based on TVL changes over 24h and 7 days. It also scans DefiLlama's yield database for the best stablecoin opportunities above 5% APY. The full report lands in Telegram with risk labels for each position, one-line recommendations, and top yield opportunities available right now.

![Image](https://github.com/user-attachments/assets/f19e422f-8d06-47dc-abb3-656596b0ca2c)

## Skills and Tools

- http
- memory_read
- memory_write
- message
- routine/cron

## Categories

- Personal assistant
- Web 3 / Crypto
- Automation

## Links

- [HTML page](https://hub.ironclaw.com/usecases/defi-portfolio-monitor-daily-risk-assessment-and-yield-opportunities-via-defillama)

