Build a comprehensive risk monitoring dashboard for your DeFi portfolio with real-time alerts and position health tracking.
ROLE: You are a DeFi portfolio risk manager who builds monitoring systems for tracking multi-protocol, multi-chain DeFi positions. You design dashboards that give investors real-time visibility into their risk exposure, position health, and portfolio-level metrics that cannot be seen by looking at individual protocol interfaces. CONTEXT: I manage a DeFi portfolio across 8+ protocols on 4 chains. Each protocol has its own dashboard, but I have no unified view of my total risk exposure. I need a portfolio-level risk dashboard that aggregates all positions, monitors health metrics, and alerts me when action is needed — before I get liquidated or suffer preventable losses. TASK: 1. Dashboard Architecture & Data Sources — Explain how to build a unified DeFi risk dashboard. Cover the data collection layer (Zapper, DeBank, or custom indexing for position discovery), on-chain data integration for real-time position monitoring, protocol-specific data parsing (each protocol exposes different data formats), price feed integration for valuation (CoinGecko API, on-chain oracle prices), refresh frequency requirements (every block for lending positions, every few minutes for LP positions), and handling data across multiple chains with different block times. 2. Position Health Monitoring — Detail the health metrics to track for each DeFi position type. Cover lending positions (health factor, liquidation price, distance to liquidation as a percentage), LP positions (current IL percentage, range utilization for concentrated liquidity, fee accrual rate), staking positions (validator health, unbonding status, slashing risk), vault positions (share price tracking, underlying strategy performance), and cross-protocol aggregate metrics (total collateral ratio, net exposure by asset). 3. Risk Metrics & Indicators — Walk through the portfolio-level risk metrics to calculate and display. Cover total portfolio value with real-time updates, value-at-Risk (VaR) calculation for the portfolio using historical volatility, maximum drawdown under stress scenarios, concentration metrics (exposure by protocol, chain, asset, strategy type), correlation analysis between positions (do they diversify or concentrate risk?), and leverage ratio across all positions (total borrowed divided by total collateral). 4. Alert System Design — Explain how to design an effective alert system. Cover critical alerts (health factor approaching liquidation threshold — immediate action needed), warning alerts (IL exceeding threshold, concentrated liquidity going out of range), informational alerts (governance proposals affecting your protocols, upcoming token unlocks), alert delivery channels (Telegram bot for speed, email for non-urgent, push notifications for mobile), alert fatigue management (appropriate thresholds to avoid over-alerting), and escalation procedures (if critical alert is not acknowledged within X minutes, send to backup contact). 5. Visualization & UX Design — Describe the dashboard layout for effective risk monitoring. Cover the summary panel (total portfolio value, overall health score, number of active alerts), the position detail view (drill down into each position with protocol-specific metrics), the risk heatmap (color-coded view of positions by risk level), the historical performance chart (portfolio value, yield earned, IL incurred over time), the comparison view (risk-adjusted yield across positions for rebalancing decisions), and mobile-optimized views for on-the-go monitoring. 6. Automation & Response Integration — Address automated responses triggered by dashboard alerts. Cover integration with DeFi Saver for automated lending position protection, automated position unwinding when risk thresholds are breached, rebalancing triggers based on portfolio drift from target allocation, report generation for periodic portfolio review, integration with notification workflows (PagerDuty for institutional users), and the manual override capability (automated actions should be confirmable, not blindly executed).
Or press ⌘C to copy
Copy and paste into your favorite AI tool
Explore more Web3 prompts
Browse Web3