feat(frontend): pin CL8Y/cUSTC LP so treasury assets and CR include CMM’s position #39

Merged
PlasticDigits merged 1 commit from 20-feat-pin-cl8y-custc-lp into master 2026-08-27 10:29:46 +00:00
PlasticDigits commented 2026-08-27 10:22:13 +00:00 (Migrated from gitlab.com)

Closes #20.

Summary

  • Tokenlist 1.3.3 allowlists the live CL8Y DEX CL8Y-cb/cUSTC LP (terra1u277x…jen2c / pair terra1tz5vw…89upc) plus a CL8Y-cb spot CW20 so the other-leg classifies as other.
  • /treasury shows the LP row when CMM balance > 0. Display USD is share × (CL8Y reserve × CL8Y USD + cUSTC reserve × USTC USD). CR counts only the CL8Y leg; cUSTC wrap is haircut (native USTC already in the numerator).
  • CL8Y-cb is 18dp. Spot USD uses LCD { pool: {} } reserve ratio (CL8Y has hybrid_simulation, not Terraswap simulation) and never the historical 1e6 Garuda fallback.
  • LCD-held CL8Y-cb/ALPHA and UST1/ALPHA were pinned in the same pass (not factory-invented). Catalog-only pairs stay out.

Test plan

  • cd frontend && npm test && npm run check (96 unit tests)
  • npm run test:e2e (Playwright, 5 workers) — LP row treasury-asset-CL8Y-cb-cUSTC visible; raw UST1/USTR/cLUNC/cUSTC absent
  • node scripts/verify-treasury-cr.mjs matches Key Ratios when prices are complete
  • node scripts/discover-cl8y-holdings.mjs — heldUnpinned empty; CL8Y-cb/cUSTC in heldPinned
  • /treasury shows LP CL8Y-cb/cUSTC, 100% of pool, display NAV both legs, CR counts $… (cUSTC omitted)
  • cUSTC issuance Available is reduced by the LP cUSTC claim; cUSTC is not a CR asset
  • If CL8Y USD is missing and wrap USTC is also missing: LP NAV incomplete · CL8Y-cb; Key Ratios stays prices not loaded…
  • After Coolify deploy: independent LCD balance + { pool: {} } matches the production row

Acceptance (#20)

  • Production /treasury shows a CL8Y/cUSTC LP row when CMM balance > 0 (local Vite + e2e; production after Coolify)
  • Row USD = share × (CL8Y reserve × CL8Y USD + cUSTC reserve × USTC USD)
  • CR numerator includes only the CL8Y leg (plus existing non-protocol spots / other-leg NAV). Unpriced CL8Y is listed on the LP NAV incomplete line; Key Ratios stays gated per #16
  • Independent LCD check of CMM LP + pair pool matches the local row (post-deploy re-check still needed)

Not done

  • Governance AddCw20 of the new LP CW20s (Cw20Whitelist is still empty; UI queries pins directly). Optional ops checklist.
  • On-chain CR contract (out of scope).
  • Garuda CL8Y/USTC native pair (CMM does not hold that LP).
  • Production Coolify re-check after merge (issue close criterion).

Closes #20

Closes #20. ## Summary - Tokenlist `1.3.3` allowlists the live CL8Y DEX **CL8Y-cb/cUSTC** LP (`terra1u277x…jen2c` / pair `terra1tz5vw…89upc`) plus a CL8Y-cb spot CW20 so the other-leg classifies as `other`. - `/treasury` shows the LP row when CMM `balance > 0`. Display USD is share × (CL8Y reserve × CL8Y USD + cUSTC reserve × USTC USD). **CR counts only the CL8Y leg**; cUSTC wrap is haircut (native USTC already in the numerator). - CL8Y-cb is 18dp. Spot USD uses LCD `{ pool: {} }` reserve ratio (CL8Y has `hybrid_simulation`, not Terraswap `simulation`) and never the historical 1e6 Garuda fallback. - LCD-held **CL8Y-cb/ALPHA** and **UST1/ALPHA** were pinned in the same pass (not factory-invented). Catalog-only pairs stay out. ## Test plan - [ ] `cd frontend && npm test && npm run check` (96 unit tests) - [ ] `npm run test:e2e` (Playwright, 5 workers) — LP row `treasury-asset-CL8Y-cb-cUSTC` visible; raw UST1/USTR/cLUNC/cUSTC absent - [ ] `node scripts/verify-treasury-cr.mjs` matches Key Ratios when prices are complete - [ ] `node scripts/discover-cl8y-holdings.mjs` — `heldUnpinned` empty; CL8Y-cb/cUSTC in `heldPinned` - [ ] `/treasury` shows `LP CL8Y-cb/cUSTC`, `100% of pool`, display NAV both legs, `CR counts $… (cUSTC omitted)` - [ ] cUSTC issuance **Available** is reduced by the LP cUSTC claim; cUSTC is not a CR asset - [ ] If CL8Y USD is missing and wrap USTC is also missing: LP `NAV incomplete · CL8Y-cb`; Key Ratios stays `prices not loaded…` - [ ] After Coolify deploy: independent LCD `balance` + `{ pool: {} }` matches the production row ## Acceptance (#20) - [x] Production `/treasury` shows a CL8Y/cUSTC LP row when CMM `balance > 0` (local Vite + e2e; production after Coolify) - [x] Row USD = share × (CL8Y reserve × CL8Y USD + cUSTC reserve × USTC USD) - [x] CR numerator includes only the CL8Y leg (plus existing non-protocol spots / other-leg NAV). Unpriced CL8Y is listed on the LP `NAV incomplete` line; Key Ratios stays gated per #16 - [x] Independent LCD check of CMM LP + pair `pool` matches the local row (post-deploy re-check still needed) ## Not done - Governance `AddCw20` of the new LP CW20s (`Cw20Whitelist` is still empty; UI queries pins directly). Optional ops checklist. - On-chain CR contract (out of scope). - Garuda CL8Y/USTC native pair (CMM does not hold that LP). - Production Coolify re-check after merge (issue close criterion). Closes #20
PlasticDigits commented 2026-08-27 10:29:46 +00:00 (Migrated from gitlab.com)

mentioned in commit ff98806a1b

mentioned in commit ff98806a1b6504bbf7f61cacb3397a17dfed4c1f
PlasticDigits (Migrated from gitlab.com) merged commit ff98806a1b into master 2026-08-27 10:29:46 +00:00
PlasticDigits commented 2026-08-27 10:45:36 +00:00 (Migrated from gitlab.com)

mentioned in issue #21

mentioned in issue #21
PlasticDigits commented 2026-08-27 10:45:36 +00:00 (Migrated from gitlab.com)

mentioned in issue #20

mentioned in issue #20
PlasticDigits commented 2026-08-27 10:46:27 +00:00 (Migrated from gitlab.com)

mentioned in issue #18

mentioned in issue #18
PlasticDigits commented 2026-08-27 10:46:29 +00:00 (Migrated from gitlab.com)

mentioned in issue #22

mentioned in issue #22
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/ustr-cmm!39
No description provided.