Skip to content

Commit 42ef205

Browse files
TokenBriceclaude
andcommitted
feat(reserves): add curated reserve compositions for 20 more stablecoins
AI-researched reserve data for: USDD, USDTB, M, U, USDai, USD0, A7A5, TUSD, FDUSD, CUSD (Cap), EURC, USR, YLDS, USX, USDa, FRAX, DOLA, AUSD (Agora), IUSD, USDF. Sources include attestation reports (Prescient, KPMG, PwC, Moore HK), SEC filings, protocol docs, and transparency dashboards. Total coins with curated reserves: 35 (up from 15). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c140f89 commit 42ef205

File tree

5 files changed

+1220
-0
lines changed

5 files changed

+1220
-0
lines changed
Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
# Reserve Composition: AI-Assisted Bulk Research (Tier B) Implementation Plan
2+
3+
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4+
5+
**Goal:** Build a Claude skill (`reserve-research`) that researches a stablecoin's reserve composition via web search and official sources, then proposes a `ReserveSlice[]` array for human review. Use it to populate reserves for ~50 mid-cap coins.
6+
7+
**Architecture:** Create a new skill (`.claude/skills/reserve-research/SKILL.md`) modeled on the existing `stablecoin-info-fetch` pattern. The skill will: (1) read the coin's existing metadata from `stablecoins.ts`, (2) web-search for reserve/collateral breakdowns, (3) visit transparency pages and attestation reports, (4) propose a `reserves` array with sources, (5) apply after human approval. No new components or types needed.
8+
9+
**Tech Stack:** Claude skill (markdown), WebSearch, WebFetch, agent-browser, Edit tool.
10+
11+
---
12+
13+
## Context
14+
15+
### Existing Skill Pattern
16+
The `stablecoin-info-fetch` skill at `.claude/skills/stablecoin-info-fetch/SKILL.md` follows this pattern:
17+
1. Read current state of coin in `stablecoins.ts`
18+
2. Research in parallel (DefiLlama, CoinGecko, official docs, web search)
19+
3. Verify findings cross-reference
20+
4. Present structured findings → user approves → apply via Edit
21+
22+
The `reserve-research` skill will follow the same structure but focus exclusively on the `reserves` field.
23+
24+
### Data Structure
25+
```typescript
26+
// src/lib/types.ts:72-77
27+
type ReserveRisk = "low" | "medium" | "high";
28+
interface ReserveSlice {
29+
name: string; // e.g. "U.S. Treasury Bills"
30+
pct: number; // percentage (should sum to ~100)
31+
risk: ReserveRisk; // low=green, medium=amber, high=red
32+
}
33+
```
34+
35+
### Risk Classification Reference
36+
| Risk | Assets |
37+
|------|--------|
38+
| `low` | U.S. Treasuries, overnight repos, FDIC deposits, regulated MMFs, cash, government securities |
39+
| `medium` | ETH, BTC, wstETH, WBTC, institutional-grade RWA, corporate bonds, regulated stablecoins as collateral (USDC, USDT) |
40+
| `high` | Altcoins (SOL, TRX, etc.), perpetual futures positions, unsecured loans, exotic DeFi positions, unregulated assets |
41+
42+
### Target Coins (~50 mid-cap coins without reserves)
43+
44+
All coins in `src/lib/stablecoins.ts` that:
45+
- Don't already have `reserves` defined
46+
- Are NOT in the top 20 (those are handled by Tier A manual curation)
47+
- Have a `collateral` field (i.e., we know what they hold, just not the percentages)
48+
49+
---
50+
51+
### Task 1: Create the `reserve-research` skill
52+
53+
**Files:**
54+
- Create: `.claude/skills/reserve-research/SKILL.md`
55+
56+
**Step 1: Write the skill file**
57+
58+
```markdown
59+
---
60+
name: reserve-research
61+
description: Research and populate reserve composition data for a single stablecoin. Use when asked to add reserves data for a specific coin, or when batch-populating reserve compositions.
62+
---
63+
64+
# Reserve Composition Research
65+
66+
## Input
67+
User provides a stablecoin name, symbol, or ID from `src/lib/stablecoins.ts`.
68+
69+
## Process
70+
71+
### Step 1: Read Current State
72+
73+
Read the coin's entry in `src/lib/stablecoins.ts`. Note:
74+
- `collateral` field (text description of backing — this is your starting hypothesis)
75+
- `pegMechanism` field
76+
- `flags.backing` (rwa-backed | crypto-backed | algorithmic)
77+
- `flags.governance` (centralized | centralized-dependent | decentralized)
78+
- `proofOfReserves` (if present, this is your primary source)
79+
- Whether `reserves` already exists (if so, verify rather than replace)
80+
81+
### Step 2: Research Reserve Breakdown
82+
83+
Run these research tasks in parallel:
84+
85+
1. **Official transparency page**: If `proofOfReserves.url` exists, visit it with WebFetch (fallback to agent-browser on 403). Extract the latest reserve breakdown percentages.
86+
87+
2. **Web search**: Search for `"<coin name> reserve composition breakdown <current year>"` and `"<coin symbol> attestation report reserves"`. Look for:
88+
- Monthly/quarterly attestation PDFs
89+
- Real-time transparency dashboards
90+
- Blog posts announcing reserve changes
91+
- Audit firm reports (Deloitte, KPMG, BDO, Moore, Prescient)
92+
93+
3. **Protocol-specific sources**:
94+
- For DeFi protocols: Check docs for collateral ratio pages, Dune dashboards
95+
- For RWA-backed: Check SEC filings, fund fact sheets
96+
- For delta-neutral: Check transparency dashboards showing position breakdown
97+
98+
4. **DefiLlama protocol page**: If `protocolSlug` exists, check `https://defillama.com/protocol/<slug>` for TVL composition data.
99+
100+
### Step 3: Classify Risk Tiers
101+
102+
Apply these rules consistently:
103+
104+
| Risk | Criteria |
105+
|------|----------|
106+
| `low` | U.S. Treasuries (any duration ≤1yr), overnight repos, FDIC-insured deposits, regulated government MMFs, cash/cash equivalents, Chainlink-verified PoR |
107+
| `medium` | ETH, BTC, wstETH, WBTC, investment-grade corporate bonds, regulated stablecoins used as collateral (USDC, USDT), T-bills >1yr duration, tokenized treasuries (BUIDL, USYC) |
108+
| `high` | Altcoins (SOL, TRX, AVAX, etc.), perpetual futures positions, unsecured/undercollateralized loans, exotic DeFi (LP tokens, recursive strategies), anything with <1yr track record |
109+
110+
Edge cases:
111+
- **Delta-neutral positions** (spot + short perp): The spot side is `medium` (crypto), but the combined position is `high` (counterparty risk on CEX)
112+
- **Stablecoin collateral** (USDC/USDT as backing): `medium` (not low — introduces dependency risk)
113+
- **LSTs (wstETH, rETH)**: `medium` (smart contract + slashing risk on top of ETH)
114+
- **Tokenized T-bills (BUIDL, USYC, USTB)**: `medium` (the underlying is low-risk but the tokenization layer adds smart contract/custodian risk)
115+
116+
### Step 4: Present Findings
117+
118+
Format your findings as:
119+
120+
```
121+
## Reserve Composition: <Coin Name> (<SYMBOL>)
122+
123+
**Source(s):** <URLs of attestation reports, dashboards, docs used>
124+
**Source date:** <Date of the data (attestation date, dashboard access date)>
125+
**Confidence:** High / Medium / Low
126+
127+
### Proposed `reserves` array:
128+
129+
\`\`\`typescript
130+
reserves: [
131+
{ name: "<Asset Category>", pct: <number>, risk: "<tier>" },
132+
// ...
133+
],
134+
\`\`\`
135+
136+
### Notes:
137+
- <Any caveats, assumptions, or data gaps>
138+
- <Why specific risk tiers were chosen>
139+
```
140+
141+
Wait for user approval before applying.
142+
143+
### Step 5: Apply Changes
144+
145+
After approval, use the Edit tool to add the `reserves` array to the coin's entry in `src/lib/stablecoins.ts`. Place it as the last field before the closing `})`.
146+
147+
Verify: `npm run build` succeeds.
148+
149+
## Quality Standards
150+
151+
- **Percentages must sum to 95-100%** (rounding acceptable, never >100)
152+
- **Minimum 2 slices, maximum 7** (merge smaller categories into "Other" if needed)
153+
- **Slice names must be specific**: "U.S. Treasury Bills" not "Government Securities"; "ETH / wstETH" not "Crypto"
154+
- **Every percentage needs a source**: If the exact percentage is unknown, use the `collateral` field description to estimate and note confidence as "Medium" or "Low"
155+
- **When data is unavailable**: If no breakdown can be found (no attestation, no dashboard, opaque reserves), report this clearly and do NOT fabricate percentages. Skip the coin.
156+
157+
## Batch Mode
158+
159+
When asked to process multiple coins, iterate through each coin one at a time. Present findings for 3-5 coins at once, get batch approval, then continue.
160+
```
161+
162+
**Step 2: Verify skill is discoverable**
163+
164+
Run: `ls .claude/skills/reserve-research/`
165+
Expected: `SKILL.md` exists.
166+
167+
**Step 3: Commit**
168+
169+
```bash
170+
git add .claude/skills/reserve-research/SKILL.md
171+
git commit -m "feat(skills): add reserve-research skill for AI-assisted reserve data population"
172+
```
173+
174+
---
175+
176+
### Task 2: Pilot run — research 3 coins to validate the skill
177+
178+
**Files:**
179+
- Modify: `src/lib/stablecoins.ts` (3 coin entries)
180+
181+
**Step 1: Invoke the skill for a well-documented coin**
182+
183+
Use the `reserve-research` skill on **PYUSD** (ID 120) — a centralized, RWA-backed coin with a known Paxos attestation. This validates the skill works for the easy case.
184+
185+
**Step 2: Invoke for a crypto-backed coin**
186+
187+
Use the skill on **GHO** (ID 118) — a DeFi coin backed by Aave V3 collateral. This tests the skill's ability to handle multi-asset CDP-style reserves.
188+
189+
**Step 3: Invoke for a less-documented coin**
190+
191+
Use the skill on **crvUSD** (ID 110) — crypto-backed with LLAMMA. Tests handling of exotic collateral.
192+
193+
**Step 4: Review output quality**
194+
195+
Check that:
196+
- Sources are real URLs that load
197+
- Percentages come from actual data, not fabrication
198+
- Risk tiers follow the classification guide consistently
199+
- The format is clear enough for quick human review
200+
201+
**Step 5: Apply approved reserves and commit**
202+
203+
```bash
204+
git add src/lib/stablecoins.ts
205+
git commit -m "feat(reserves): add PYUSD, GHO, crvUSD reserves via AI research skill"
206+
```
207+
208+
---
209+
210+
### Task 3: Batch process RWA-backed centralized coins (~25 coins)
211+
212+
**Files:**
213+
- Modify: `src/lib/stablecoins.ts`
214+
215+
These coins have the most predictable reserve structures (cash + treasuries + repos) and the most available attestation data.
216+
217+
**Step 1: Identify targets**
218+
219+
All coins matching `rwa-backed` + `centralized` that don't yet have `reserves`:
220+
- USD1, PYUSD, USYC, USDG, RLUSD, USDY, BUIDL, USDTB, M, FDUSD, TUSD, A7A5, EURC, YLDS, AUSD, BRZ, GUSD (Gate), Gemini GUSD, USDP, MNEE, TBILL, USDH, USDO, cgUSD, EURCV, AEUR, EURI, EURS, VEUR, EURR, EUROP, EURQ, EURAU, VCHF, VGBP, tGBP, ZARP, CADC, XSGD, GYEN, AUDD, JPYC, and gold/silver coins (XAUT, PAXG, KAU, XAUm, VRO, CGO, DGLD, KAG)
221+
222+
**Step 2: Process in batches of 5**
223+
224+
Invoke the `reserve-research` skill for 5 coins at a time. Present findings, get approval, apply, commit.
225+
226+
**Step 3: Commit per batch**
227+
228+
```bash
229+
git commit -m "feat(reserves): add reserve compositions for <batch description>"
230+
```
231+
232+
---
233+
234+
### Task 4: Batch process crypto-backed coins (~20 coins)
235+
236+
**Files:**
237+
- Modify: `src/lib/stablecoins.ts`
238+
239+
These are harder — more diverse collateral, fewer formal attestations, more reliance on protocol dashboards.
240+
241+
**Step 1: Identify targets**
242+
243+
All `crypto-backed` coins without `reserves`:
244+
- USDf, USDD, GHO, USR, crvUSD, USX, USDA (Avalon), DOLA, IUSD, USDF (Astherus), DUSD, satUSD, FRXUSD, rwaUSDi, reUSD, BOLD, HYUSD, LUSD, fxUSD, MIM, HONEY, USDB, SUSD, LISUSD, REUSD, BUCK, EURA, meUSD, UTY, MSUSD, NUSD, YZUSD, ALUSD, FEUSD, OUSD, BtcUSD, USBD, etc.
245+
246+
**Step 2: Process in batches of 5**
247+
248+
Same pattern: research → present → approve → apply → commit.
249+
250+
**Step 3: Handle "no data available" cases**
251+
252+
For coins where no reserve breakdown can be found, document this in the skill output and skip them. Do not fabricate data.
253+
254+
---
255+
256+
### Task 5: Final verification
257+
258+
**Step 1: Count coverage**
259+
260+
```bash
261+
grep -c 'reserves:' src/lib/stablecoins.ts
262+
```
263+
264+
Target: 40-60 coins with reserves (5 existing + 35-55 new).
265+
266+
**Step 2: Build check**
267+
268+
Run: `npm run build`
269+
Expected: Clean build.
270+
271+
**Step 3: Spot-check treemaps**
272+
273+
Run: `npm run dev`
274+
Visit 5-10 coin detail pages and confirm treemaps render correctly.
275+
276+
**Step 4: Commit**
277+
278+
Final commit with any remaining fixes.
279+
280+
---
281+
282+
## Completion Criteria
283+
284+
- `reserve-research` skill exists and is documented at `.claude/skills/reserve-research/SKILL.md`
285+
- 40-60 coins have `reserves` data (up from 5)
286+
- Every `reserves` entry has a documented source (attestation URL, dashboard, or docs)
287+
- Coins where data was unavailable are clearly identified (not skipped silently)
288+
- `npm run build` passes
289+
- Treemaps render correctly on coin detail pages

0 commit comments

Comments
 (0)