yield-dashboard
Cross-protocol DeFi yield dashboard for Stacks — view positions across Zest Protocol, ALEX DEX, and Bitflow, see total portfolio value, APY breakdown per protocol, and get rebalance suggestions. Read-only, mainnet-only. Requires an unlocked wallet for address context.
What this skill does
# Yield Dashboard Skill
Aggregated read-only dashboard across Stacks DeFi protocols: **Zest Protocol** (lending), **ALEX DEX** (AMM LP), and **Bitflow** (DEX LP). Also checks native STX stacking status.
All data is fetched live from Stacks mainnet via Hiro API read-only contract calls.
## Usage
```
bun run yield-dashboard/yield-dashboard.ts <subcommand> [options]
```
## Subcommands
### overview
High-level portfolio summary: total value across all protocols, weighted average APY, and per-protocol breakdown.
```
bun run yield-dashboard/yield-dashboard.ts overview
```
Output:
```json
{
"totalValueSats": 500000,
"totalValueBtc": "0.00500000",
"weightedApyPct": 4.2,
"protocols": {
"zest": { "valueSats": 300000, "apyPct": 5.0 },
"alex": { "valueSats": 150000, "apyPct": 3.5 },
"bitflow": { "valueSats": 50000, "apyPct": 2.8 },
"stacking": { "valueSats": 0, "apyPct": 0 }
},
"walletSbtcSats": 25000,
"walletStxMicroStx": 5000000
}
```
### positions
Detailed per-protocol position data.
```
bun run yield-dashboard/yield-dashboard.ts positions
```
Returns an array of positions with protocol, asset, amount, current APY, and any reward info.
### apy-breakdown
Current APY rates across all supported protocols (no wallet needed for this — pure market data).
```
bun run yield-dashboard/yield-dashboard.ts apy-breakdown
```
Output:
```json
{
"timestamp": "2026-03-06T03:00:00.000Z",
"rates": [
{ "protocol": "Zest Protocol", "asset": "sBTC", "supplyApyPct": 5.0, "riskScore": 20 },
{ "protocol": "ALEX DEX", "asset": "aBTC/STX LP", "apyPct": 3.5, "riskScore": 50 },
{ "protocol": "Bitflow", "asset": "sBTC", "apyPct": 2.8, "riskScore": 35 },
{ "protocol": "STX Stacking", "asset": "STX", "apyPct": 8.0, "riskScore": 10 }
],
"zestV2Ready": false
}
```
### rebalance
Suggests rebalancing moves based on current positions vs optimal allocation given risk-adjusted APY.
```
bun run yield-dashboard/yield-dashboard.ts rebalance [--risk-tolerance low|medium|high]
```
Options:
- `--risk-tolerance` (optional, default: `medium`) — Risk preference for allocation suggestions
Output:
```json
{
"currentAllocation": { "zest": 60, "alex": 30, "bitflow": 10, "stacking": 0 },
"suggestedAllocation": { "zest": 50, "alex": 20, "bitflow": 10, "stacking": 20 },
"suggestions": [
"Consider moving 10% from Zest to STX stacking for diversification",
"ALEX LP has higher IL risk — reduce if STX/BTC volatility is high"
]
}
```
## Known Limitations
- **ALEX LP positions**: User LP token balance reading is not yet implemented — `valueSats` will show 0 even if you hold LP tokens. APY is read correctly.
- **Bitflow LP positions**: Same as ALEX — LP balance reading is a TODO. APY falls back to a 2.8% estimate if the Bitflow API is unavailable (output includes `apySource: "fallback estimate"`).
- **ALEX asset**: The ALEX pool uses aBTC (ALEX wrapped BTC), not native sBTC. Different trust assumptions — labeled as "aBTC/STX LP" in output.
- **Stacking value**: STX stacking is denominated in microSTX, not sats. The `overview` command separates these: `totalValueSats` (BTC-denominated) vs `totalValueStx` (STX stacking).
- **Bitflow API**: Uses `https://app.bitflow.finance/api` — undocumented endpoint, may change without notice.
## Notes
- All reads are free (no gas needed) — uses read-only contract calls
- Wallet must be unlocked so the skill knows which address to query
- APY figures are point-in-time estimates from on-chain state
- Bitflow data uses the Bitflow public API (no key required)
- Zest V2 availability is probed automatically; falls back to V1 pool data
Related in Data & Analytics
clawarr-suite
IncludedComprehensive management for self-hosted media stacks (Sonarr, Radarr, Lidarr, Readarr, Prowlarr, Bazarr, Overseerr, Plex, Tautulli, SABnzbd, Recyclarr, Unpackerr, Notifiarr, Maintainerr, Kometa, FlareSolverr). Deep library exploration, analytics, dashboard generation, content management, request handling, subtitle management, indexer control, download monitoring, quality profile sync, library cleanup automation, notification routing, collection/overlay management, and media tracker integration (Trakt, Letterboxd, Simkl).
querying-soql
IncludedSOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use handling-sf-data), Apex DML logic (use generating-apex), or report/dashboard queries.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
habit-flow
IncludedAI-powered atomic habit tracker with natural language logging, streak tracking, smart reminders, and coaching. Use for creating habits, logging completions naturally ("I meditated today"), viewing progress, and getting personalized coaching.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
visualizing-data
IncludedBuilds dashboards, reports, and data-driven interfaces requiring charts, graphs, or visual analytics. Provides systematic framework for selecting appropriate visualizations based on data characteristics and analytical purpose. Includes 24+ visualization types organized by purpose (trends, comparisons, distributions, relationships, flows, hierarchies, geospatial), accessibility patterns (WCAG 2.1 AA compliance), colorblind-safe palettes, and performance optimization strategies. Use when creating visualizations, choosing chart types, displaying data graphically, or designing data interfaces.