feat: Phase 4 — /ust1 window UI, wrap-mapper wiring, secondary UST1 AMM pairs #502

Closed
opened 2026-07-29 02:07:46 +00:00 by PlasticDigits · 28 comments
PlasticDigits commented 2026-07-29 02:07:46 +00:00 (Migrated from gitlab.com)

Summary

Integrate mainnet UST1 window, treasury-backed wraps (cLUNC / cUSTC), and secondary AMM pairs into the live CL8Y DEX at https://dex.cl8y.com, including a dedicated /ust1 page for always-on oracle mint/redeem.

Phase 0 decisions (approved):

  • Wrap path = ustr-cmm treasury + wrap-mapper (not cmm-native-wrap).
  • Window = primary mint/redeem; DEX AMM = secondary (e.g. UST1/vFDUSD and/or UST1/cUSTC).
  • UI route: https://dex.cl8y.com/ust1 (dedicated page; do not overload soft-launch /mint faucet).
  • Fees/limits owned on-chain (window 1% / 1000 per tx / 10k per 24h; wrap 1%) — UI must display and respect chain state.
  • Soft launch SL5 explicitly excluded wrap; this issue is the post–soft-launch track.
  • Depends on Phase 2 (window+tokens) and Phase 3 (treasury migrate + wrap-mapper + cLUNC/cUSTC) addresses.

Live soft-launch anchors:

  • Frontend https://dex.cl8y.com, indexer https://indexer.dex.cl8y.com
  • Factory terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea
  • Router terra1e7s0h9ftxakwca5gxspyt4haeuaqxds6swr08ul3tsepq7el924sprrsrw
  • CW20 mintable whitelist code 10184 already in SL1 policy

Current codebase

Area Status
Soft launch CW20 pairs + Coolify Live; wrap out of scope (docs/runbooks/mainnet-soft-launch.md SL5)
LocalTerra wrap stack Full: scripts/deploy-dex-local.sh Phase 1b/4c, router SetWrapMapper, frontend wrap/swap
Frontend wrap frontend-dapp/src/services/terraclassic/wrapMapper.ts, utils/constants.ts NATIVE_WRAPPED_PAIRS, Swap/Pool paths
Router unwrap unwrap_output, minimum_receive post-fee (#469)
/mint Soft-launch faucet only (MintPage.tsx) — not UST1
UST1 / vFDUSD / ust1-window No code in this repo yet (no /ust1 route, no window client)
Token logos / registry Soft-launch gemstones; need UST1, vFDUSD, cLUNC, cUSTC

Why this is needed

Users on the live DEX need: (1) wrap/unwrap natives for CW20 markets, (2) a first-class UST1 mint/redeem UI against the oracle window, (3) optional AMM liquidity for price discovery around the peg. Without this phase, Phases 2–3 are operator-only and invisible at dex.cl8y.com.


Constraints / guardrails

  1. Do not reuse /mint for UST1; add /ust1 (nav label clear vs faucet Mint).
  2. Window UX must call ust1-window via CW20 Send + quote via effective_swap — not the AMM router for mint/redeem.
  3. AMM pairs are optional/secondary; never present AMM as the oracle mint/redeem path.
  4. Enable wrap only after Phase 3 addresses exist; set_wrap_mapper on production router required before native wrap swaps.
  5. Preserve SL1 whitelist policy unless governance explicitly adds code IDs; prefer code 10184 for new CW20s.
  6. Native input still goes treasury wrap → CW20 → router (no native AssetInfo pairs).
  7. Display chain fee_bps / limits / pause / oracle staleness; block submit when paused or oracle stale.
  8. Follow design-system / retail copy skills; no cognitive overload on /ust1.
  9. Coolify env: add VITE_* addresses for window, oracle (if needed), vFDUSD, UST1, wrap-mapper, cLUNC, cUSTC; redeploy frontend (+ indexer asset metadata if required).
  10. Indexer should auto-discover factory pairs when created; register asset symbols for route/slippage if needed.

Relevant files

Frontend

  • frontend-dapp/src/App.tsx (add /ust1 route)
  • frontend-dapp/src/components/common/navItems.ts
  • frontend-dapp/src/pages/SwapPage.tsx, PoolPage.tsx
  • frontend-dapp/src/services/terraclassic/wrapMapper.ts, router.ts
  • frontend-dapp/src/utils/constants.ts, tokenRegistry.ts, tokenLogoAllowlist.ts (or equivalent)
  • New: frontend-dapp/src/pages/Ust1Page.tsx (or similar) + services/terraclassic/ust1Window.ts

Contracts / deploy / docs

  • Router wrap messages (existing)
  • NATIVE_TOKEN_WRAPPING.md
  • docs/runbooks/mainnet-soft-launch.md (document post-SL5 wrap/UST1 track)
  • docs/runbooks/cw20-whitelist-policy.md
  • docs/deployment-guide.md § pair creation
  • docs/qa-templates/wrap-unwrap-test-pass.md
  • scripts/lib/mainnet-soft-launch-defaults.sh (do not silently fold economic wraps into soft-launch defaults)
  • Coolify: docker/frontend/Dockerfile, deployments env examples

Skills

  • skills/AGENTS_NATIVE_WRAP_TAX.md, AGENTS_FRONTEND_SWAP_SAFETY_CTA.md, AGENTS_FRONTEND_COPY_COGNITIVE_LOAD.md, AGENTS_FRONTEND_DESIGN_SYSTEM.md

A. On-chain / ops wiring (after Phase 2+3 addresses)

  1. Governance/deployer: set_wrap_mapper on production router.
  2. Whitelist already includes 10184 — create pairs only after tokens exist:
    • Preferred secondary: UST1/vFDUSD and/or UST1/cUSTC (seed liquidity).
    • Optional: cLUNC / cUSTC pairs vs existing quote assets as product decides.
  3. set_discount_registry on new pairs if using fee tiers.

B. Frontend — wraps

  1. Mainnet env: NATIVE_WRAPPED_PAIRS / VITE_* for cLUNC, cUSTC, wrap-mapper, treasury if needed.
  2. Reuse LocalTerra wrap/swap/pool paths; ensure 1% fee shown from chain config.
  3. Rate-limit + pause CTAs (#389 / #463 patterns) on mainnet.

C. Frontend — /ust1 window UI (new)

  1. Route /ust1 + nav item (primary or More — product choice; must be discoverable).
  2. Deposit tab: vFDUSD → UST1 (CW20 send to window); Withdraw tab: UST1 → vFDUSD.
  3. Quote from effective_swap (fee, limits, oracle age/rate); disable when paused/stale/over limit.
  4. Clear copy: this is oracle mint/redeem, not an AMM swap; link to Trade/Swap for secondary markets when pairs exist.
  5. Unit + Playwright coverage for quote/disabled states; optional strict on-chain e2e when env present.

D. Token metadata

  • Symbols, decimals, logos for UST1, vFDUSD, cLUNC, cUSTC in registry/allowlist; indexer assets as needed.

E. Ship

  • Coolify rebuild frontend (and indexer if asset tables change); smoke on production.

Acceptance criteria

  • https://dex.cl8y.com/ust1 serves UST1 ↔ vFDUSD mint/redeem UI (not the faucet).
  • UI quotes match on-chain effective_swap; respects pause, stale oracle, per-tx and 24h limits.
  • Successful deposit and withdraw from the UI (mainnet or documented staging with mainnet addresses).
  • Router has wrap-mapper set; wrap/unwrap LUNC and USTC work from Swap (and pool provide/withdraw auto-wrap paths where applicable).
  • At least one secondary AMM pair created and indexed (UST1/vFDUSD and/or UST1/cUSTC) with seeded liquidity — or explicit product waiver recorded on this issue.
  • Token metadata/logos visible; nav does not confuse /ust1 with /mint.
  • Coolify env documented/updated; soft-launch SL5 docs note post-SL5 enablement.
  • Wrap fee displayed as on-chain 1% (100 bps) unless governance changed.

Test plan (happy / functional paths)

  1. Unit: new ust1 window client + page tests (quote formatting, limit gates, pause/stale disables).
  2. Unit: wrap constants/env parsing for mainnet addresses.
  3. LocalTerra: existing wrap e2e (wrap-swap.spec.ts, wrap-pool.spec.ts) + new /ust1 Playwright against local window deploy.
  4. Mainnet QA checklist: extend docs/qa-templates/wrap-unwrap-test-pass.md; add ust1 window QA steps.
  5. Pair path: create_pair → provide liquidity → swap UST1↔vFDUSD (or cUSTC) via router; indexer shows pair/candles.
  6. Coolify: production build with new env; /ust1 and wrap paths load without wrong-Node/Aw Snap issues.

Test plan (attack / hack / abuse vectors)

Vector Expected
UI submits mint while oracle stale / window paused CTA blocks; chain would reject anyway
User exceeds per-tx or 24h limit via UI Client-side block + chain reject
Phishing AMM “mint” confusion Copy + separate /ust1 route; no router call for window mint
Wrap during mapper/treasury pause Safety CTA (#389); tx fails closed
Slippage / minimum_receive ignore on unwrap_output Router enforces post-fee min (#469); UI sets min receive
Wrong token selected for window send Client allowlist vFDUSD/UST1 only for each direction
Env pointing at LocalTerra addresses on prod Deploy checklist + verification query against columbus-5
XSS / malicious token metadata Logo allowlist; sanitize external URLs
Faucet /mint used to spoof UST1 Keep faucet tokens separate; never list UST1 in faucet set

Verification criteria

  • Production URLs: /ust1 mint+redeem smoke txs recorded.
  • Wrap smoke (both denoms) on production UI recorded.
  • Secondary pair visible on dex.cl8y.com + indexer (or waiver noted).
  • make lint-frontend / make test-frontend green for changed code.
  • Phase 5 monitoring hooks have addresses to watch.
  • Phase 2: ust1-window deploy (blocker for /ust1)
  • Phase 3: ustr-cmm treasury migrate + wrap-mapper (blocker for wraps)
  • Phase 5: ops hardening / alerting
## Summary Integrate mainnet **UST1 window**, **treasury-backed wraps (cLUNC / cUSTC)**, and **secondary AMM pairs** into the live CL8Y DEX at `https://dex.cl8y.com`, including a dedicated **`/ust1`** page for always-on oracle mint/redeem. **Phase 0 decisions (approved):** - Wrap path = ustr-cmm treasury + wrap-mapper (not `cmm-native-wrap`). - Window = primary mint/redeem; DEX AMM = secondary (e.g. UST1/vFDUSD and/or UST1/cUSTC). - **UI route:** `https://dex.cl8y.com/ust1` (dedicated page; do **not** overload soft-launch `/mint` faucet). - Fees/limits owned on-chain (window 1% / 1000 per tx / 10k per 24h; wrap 1%) — UI must display and respect chain state. - Soft launch **SL5** explicitly excluded wrap; this issue is the **post–soft-launch** track. - Depends on Phase 2 (window+tokens) and Phase 3 (treasury migrate + wrap-mapper + cLUNC/cUSTC) addresses. **Live soft-launch anchors:** - Frontend `https://dex.cl8y.com`, indexer `https://indexer.dex.cl8y.com` - Factory `terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea` - Router `terra1e7s0h9ftxakwca5gxspyt4haeuaqxds6swr08ul3tsepq7el924sprrsrw` - CW20 mintable whitelist code **10184** already in SL1 policy --- ## Current codebase | Area | Status | |------|--------| | Soft launch CW20 pairs + Coolify | Live; wrap out of scope (`docs/runbooks/mainnet-soft-launch.md` SL5) | | LocalTerra wrap stack | Full: `scripts/deploy-dex-local.sh` Phase 1b/4c, router `SetWrapMapper`, frontend wrap/swap | | Frontend wrap | `frontend-dapp/src/services/terraclassic/wrapMapper.ts`, `utils/constants.ts` `NATIVE_WRAPPED_PAIRS`, Swap/Pool paths | | Router unwrap | `unwrap_output`, `minimum_receive` post-fee (#469) | | `/mint` | Soft-launch **faucet** only (`MintPage.tsx`) — **not** UST1 | | UST1 / vFDUSD / ust1-window | **No code** in this repo yet (no `/ust1` route, no window client) | | Token logos / registry | Soft-launch gemstones; need UST1, vFDUSD, cLUNC, cUSTC | --- ## Why this is needed Users on the live DEX need: (1) wrap/unwrap natives for CW20 markets, (2) a first-class UST1 mint/redeem UI against the oracle window, (3) optional AMM liquidity for price discovery around the peg. Without this phase, Phases 2–3 are operator-only and invisible at `dex.cl8y.com`. --- ## Constraints / guardrails 1. **Do not** reuse `/mint` for UST1; add **`/ust1`** (nav label clear vs faucet Mint). 2. Window UX must call **ust1-window** via CW20 `Send` + quote via `effective_swap` — not the AMM router for mint/redeem. 3. AMM pairs are optional/secondary; never present AMM as the oracle mint/redeem path. 4. Enable wrap only after Phase 3 addresses exist; `set_wrap_mapper` on production router required before native wrap swaps. 5. Preserve SL1 whitelist policy unless governance explicitly adds code IDs; prefer code **10184** for new CW20s. 6. Native input still goes **treasury wrap → CW20 → router** (no native `AssetInfo` pairs). 7. Display chain `fee_bps` / limits / pause / oracle staleness; block submit when paused or oracle stale. 8. Follow design-system / retail copy skills; no cognitive overload on `/ust1`. 9. Coolify env: add `VITE_*` addresses for window, oracle (if needed), vFDUSD, UST1, wrap-mapper, cLUNC, cUSTC; redeploy frontend (+ indexer asset metadata if required). 10. Indexer should auto-discover factory pairs when created; register asset symbols for route/slippage if needed. --- ## Relevant files **Frontend** - `frontend-dapp/src/App.tsx` (add `/ust1` route) - `frontend-dapp/src/components/common/navItems.ts` - `frontend-dapp/src/pages/SwapPage.tsx`, `PoolPage.tsx` - `frontend-dapp/src/services/terraclassic/wrapMapper.ts`, `router.ts` - `frontend-dapp/src/utils/constants.ts`, `tokenRegistry.ts`, `tokenLogoAllowlist.ts` (or equivalent) - New: `frontend-dapp/src/pages/Ust1Page.tsx` (or similar) + `services/terraclassic/ust1Window.ts` **Contracts / deploy / docs** - Router wrap messages (existing) - `NATIVE_TOKEN_WRAPPING.md` - `docs/runbooks/mainnet-soft-launch.md` (document post-SL5 wrap/UST1 track) - `docs/runbooks/cw20-whitelist-policy.md` - `docs/deployment-guide.md` § pair creation - `docs/qa-templates/wrap-unwrap-test-pass.md` - `scripts/lib/mainnet-soft-launch-defaults.sh` (do not silently fold economic wraps into soft-launch defaults) - Coolify: `docker/frontend/Dockerfile`, deployments env examples **Skills** - `skills/AGENTS_NATIVE_WRAP_TAX.md`, `AGENTS_FRONTEND_SWAP_SAFETY_CTA.md`, `AGENTS_FRONTEND_COPY_COGNITIVE_LOAD.md`, `AGENTS_FRONTEND_DESIGN_SYSTEM.md` --- ## Recommended direction ### A. On-chain / ops wiring (after Phase 2+3 addresses) 1. Governance/deployer: `set_wrap_mapper` on production router. 2. Whitelist already includes 10184 — create pairs only after tokens exist: - Preferred secondary: **UST1/vFDUSD** and/or **UST1/cUSTC** (seed liquidity). - Optional: cLUNC / cUSTC pairs vs existing quote assets as product decides. 3. `set_discount_registry` on new pairs if using fee tiers. ### B. Frontend — wraps 1. Mainnet env: `NATIVE_WRAPPED_PAIRS` / `VITE_*` for cLUNC, cUSTC, wrap-mapper, treasury if needed. 2. Reuse LocalTerra wrap/swap/pool paths; ensure 1% fee shown from chain config. 3. Rate-limit + pause CTAs (#389 / #463 patterns) on mainnet. ### C. Frontend — `/ust1` window UI (new) 1. Route `/ust1` + nav item (primary or More — product choice; must be discoverable). 2. Deposit tab: vFDUSD → UST1 (CW20 send to window); Withdraw tab: UST1 → vFDUSD. 3. Quote from `effective_swap` (fee, limits, oracle age/rate); disable when paused/stale/over limit. 4. Clear copy: this is oracle mint/redeem, **not** an AMM swap; link to Trade/Swap for secondary markets when pairs exist. 5. Unit + Playwright coverage for quote/disabled states; optional strict on-chain e2e when env present. ### D. Token metadata - Symbols, decimals, logos for UST1, vFDUSD, cLUNC, cUSTC in registry/allowlist; indexer assets as needed. ### E. Ship - Coolify rebuild frontend (and indexer if asset tables change); smoke on production. --- ## Acceptance criteria - [ ] `https://dex.cl8y.com/ust1` serves UST1 ↔ vFDUSD mint/redeem UI (not the faucet). - [ ] UI quotes match on-chain `effective_swap`; respects pause, stale oracle, per-tx and 24h limits. - [ ] Successful deposit and withdraw from the UI (mainnet or documented staging with mainnet addresses). - [ ] Router has wrap-mapper set; wrap/unwrap LUNC and USTC work from Swap (and pool provide/withdraw auto-wrap paths where applicable). - [ ] At least one secondary AMM pair created and indexed (UST1/vFDUSD and/or UST1/cUSTC) with seeded liquidity — or explicit product waiver recorded on this issue. - [ ] Token metadata/logos visible; nav does not confuse `/ust1` with `/mint`. - [ ] Coolify env documented/updated; soft-launch SL5 docs note post-SL5 enablement. - [ ] Wrap fee displayed as on-chain 1% (100 bps) unless governance changed. --- ## Test plan (happy / functional paths) 1. **Unit:** new ust1 window client + page tests (quote formatting, limit gates, pause/stale disables). 2. **Unit:** wrap constants/env parsing for mainnet addresses. 3. **LocalTerra:** existing wrap e2e (`wrap-swap.spec.ts`, `wrap-pool.spec.ts`) + new `/ust1` Playwright against local window deploy. 4. **Mainnet QA checklist:** extend `docs/qa-templates/wrap-unwrap-test-pass.md`; add ust1 window QA steps. 5. **Pair path:** create_pair → provide liquidity → swap UST1↔vFDUSD (or cUSTC) via router; indexer shows pair/candles. 6. **Coolify:** production build with new env; `/ust1` and wrap paths load without wrong-Node/Aw Snap issues. --- ## Test plan (attack / hack / abuse vectors) | Vector | Expected | |--------|----------| | UI submits mint while oracle stale / window paused | CTA blocks; chain would reject anyway | | User exceeds per-tx or 24h limit via UI | Client-side block + chain reject | | Phishing AMM “mint” confusion | Copy + separate `/ust1` route; no router call for window mint | | Wrap during mapper/treasury pause | Safety CTA (#389); tx fails closed | | Slippage / `minimum_receive` ignore on unwrap_output | Router enforces post-fee min (#469); UI sets min receive | | Wrong token selected for window send | Client allowlist vFDUSD/UST1 only for each direction | | Env pointing at LocalTerra addresses on prod | Deploy checklist + verification query against columbus-5 | | XSS / malicious token metadata | Logo allowlist; sanitize external URLs | | Faucet `/mint` used to spoof UST1 | Keep faucet tokens separate; never list UST1 in faucet set | --- ## Verification criteria - [ ] Production URLs: `/ust1` mint+redeem smoke txs recorded. - [ ] Wrap smoke (both denoms) on production UI recorded. - [ ] Secondary pair visible on dex.cl8y.com + indexer (or waiver noted). - [ ] `make lint-frontend` / `make test-frontend` green for changed code. - [ ] Phase 5 monitoring hooks have addresses to watch. ### Related - Phase 2: ust1-window deploy (blocker for `/ust1`) - Phase 3: ustr-cmm treasury migrate + wrap-mapper (blocker for wraps) - Phase 5: ops hardening / alerting
PlasticDigits commented 2026-07-29 02:08:00 +00:00 (Migrated from gitlab.com)

mentioned in issue PlasticDigits2/ustr-cmm#5

mentioned in issue PlasticDigits2/ustr-cmm#5
PlasticDigits commented 2026-07-29 02:08:02 +00:00 (Migrated from gitlab.com)

Cross-repo tracking (Phase 0 approved)

Phase Repo Issue
2 — UST1↔vFDUSD window deploy ust1-window https://gitlab.com/PlasticDigits/ust1-window/-/work_items/19
3 — Treasury migrate + wrap-mapper ustr-cmm https://gitlab.com/PlasticDigits2/ustr-cmm/-/work_items/5
4 — /ust1 UI + wraps + secondary AMM cl8y-dex-terraclassic https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/502
5 — Ops hardening cl8y-dex-terraclassic https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/503

Approved params: window fee_bps=100, per-tx 1000 UST1, 24h 10000 UST1; wrap fee_bps=100 (1%). UI at dex.cl8y.com/ust1. Skip cmm-native-wrap. Phase 1 prerequisites confirmed.

## Cross-repo tracking (Phase 0 approved) | Phase | Repo | Issue | |-------|------|-------| | 2 — UST1↔vFDUSD window deploy | ust1-window | https://gitlab.com/PlasticDigits/ust1-window/-/work_items/19 | | 3 — Treasury migrate + wrap-mapper | ustr-cmm | https://gitlab.com/PlasticDigits2/ustr-cmm/-/work_items/5 | | 4 — `/ust1` UI + wraps + secondary AMM | cl8y-dex-terraclassic | https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/502 | | 5 — Ops hardening | cl8y-dex-terraclassic | https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/503 | **Approved params:** window `fee_bps=100`, per-tx **1000** UST1, 24h **10000** UST1; wrap `fee_bps=100` (1%). UI at `dex.cl8y.com/ust1`. Skip `cmm-native-wrap`. Phase 1 prerequisites confirmed.
PlasticDigits commented 2026-07-29 02:08:05 +00:00 (Migrated from gitlab.com)

mentioned in issue #503

mentioned in issue #503
PlasticDigits commented 2026-07-29 05:21:16 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-07-29 05:21:19 +00:00 (Migrated from gitlab.com)

Naming update

Wrapped token symbols are cLUNC and cUSTC (not LUNC-C / USTC-C).

LocalTerra / existing DEX code may still say LUNC-C/USTC-C — Phase 3–4 implementation must mint and display cLUNC / cUSTC on mainnet and align frontend registry/env naming.

## Naming update Wrapped token symbols are **cLUNC** and **cUSTC** (not `LUNC-C` / `USTC-C`). LocalTerra / existing DEX code may still say `LUNC-C`/`USTC-C` — Phase 3–4 implementation must mint and display **cLUNC** / **cUSTC** on mainnet and align frontend registry/env naming.
PlasticDigits commented 2026-08-08 00:20:09 +00:00 (Migrated from gitlab.com)

Router ↔ wrap-mapper connected (mainnet)

Status: SetWrapMapper succeeded. Production router now has wrap-mapper set (was null after soft launch SL5).

Tx EAE9C840E388946E0DF4C9E0D1F9E5E3377F79911B2B39418F029F1B3B9C0754
Height / time 29849291 / 2026-08-08T00:18:31Z
Sender 2-of-3 governance multisig terra1zlmv2xydxcusurtr6rl78wsvytdc6mfex6hep7
Router terra1e7s0h9ftxakwca5gxspyt4haeuaqxds6swr08ul3tsepq7el924sprrsrw
Wrap-mapper terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2

Verified router config:

{"factory":"terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea","wrap_mapper":"terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2"}

Auth lesson: first attempt with --from cl8y2_admin failed Unauthorized — SetWrapMapper requires factory config.governance (the multisig), not an EOA. Flow: --generate-only from multisig_2of3 → 2× tx sign --multisig → tx multisign → broadcast.

Docs: recorded in deployments/mainnet-soft-launch/deploy-trace.md + addresses.env (WRAP_MAPPER_ADDRESS) and a note on docs/reference/governance-multisig.md.

Unblocks Phase 4 wrap path wiring on the DEX; remaining #502 work is /ust1 UI, tokens/logos, and secondary AMM pairs.

## Router ↔ wrap-mapper connected (mainnet) **Status:** `SetWrapMapper` succeeded. Production router now has wrap-mapper set (was `null` after soft launch SL5). | | | |---|---| | **Tx** | [`EAE9C840E388946E0DF4C9E0D1F9E5E3377F79911B2B39418F029F1B3B9C0754`](https://finder.terraclassic.community/mainnet/tx/EAE9C840E388946E0DF4C9E0D1F9E5E3377F79911B2B39418F029F1B3B9C0754) | | **Height / time** | `29849291` / `2026-08-08T00:18:31Z` | | **Sender** | 2-of-3 governance multisig `terra1zlmv2xydxcusurtr6rl78wsvytdc6mfex6hep7` | | **Router** | `terra1e7s0h9ftxakwca5gxspyt4haeuaqxds6swr08ul3tsepq7el924sprrsrw` | | **Wrap-mapper** | `terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2` | **Verified** router `config`: ```json {"factory":"terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea","wrap_mapper":"terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2"} ``` **Auth lesson:** first attempt with `--from cl8y2_admin` failed `Unauthorized` — `SetWrapMapper` requires factory `config.governance` (the multisig), not an EOA. Flow: `--generate-only` from `multisig_2of3` → 2× `tx sign --multisig` → `tx multisign` → `broadcast`. **Docs:** recorded in `deployments/mainnet-soft-launch/deploy-trace.md` + `addresses.env` (`WRAP_MAPPER_ADDRESS`) and a note on `docs/reference/governance-multisig.md`. Unblocks Phase 4 wrap path wiring on the DEX; remaining #502 work is `/ust1` UI, tokens/logos, and secondary AMM pairs.
PlasticDigits commented 2026-08-08 00:24:30 +00:00 (Migrated from gitlab.com)

mentioned in commit 4dec7d938a

mentioned in commit 4dec7d938aa96846649b4354a234efc0423895dd
PlasticDigits commented 2026-08-08 11:17:15 +00:00 (Migrated from gitlab.com)

Progress check — next AC step (after Phase 2 complete)

Upstream: ust1-window#19 is closed/complete. Phase 3 (ustr-cmm#5) is also closed; production router already has wrap_mapper set (prior note on this issue).

Published Phase 2 addresses (for Coolify / client):

vFDUSD terra1mnl9azefrqpmu888ar2u6zrcwr80hxlt3avf4300r576cw5ar7esvxsvj3
UST1 terra1f0eqgy9w7e5e7up97vjudqwx38tesf8ylx75x2lv3nwm0clry0pqmgfy72
ust1-oracle terra1fmht0t6svq3n24zx03nkfja0m40zhfyyxkdcvlrkl6u7gfe6aagq4gch8n (code 11568)
ust1-window terra1zxwpzpzpleatqn39r00grau4yt29sld8pw78s7ktvjafnj5nsaxq0h3rh2 (code 11566)

#502 AC status: wrap-mapper-on-router is done; everything else still open. No /ust1 route or window client in this repo yet.

Next step to move AC forward: ship the dedicated /ust1 frontend (route + nav distinct from /mint, ust1Window client via CW20 Send + effective_swap quotes/gates, UST1/vFDUSD metadata/logos) and wire Coolify VITE_* to the addresses above. That unblocks the first three ACs (live mint/redeem UI, quote parity, UI deposit/withdraw smoke). Parallel/follow-on: mainnet wrap env + Swap wrap UX (AC #4/#8), then secondary AMM pair or product waiver (AC #5).

## Progress check — next AC step (after Phase 2 complete) **Upstream:** [ust1-window#19](https://gitlab.com/PlasticDigits/ust1-window/-/issues/19) is **closed/complete**. Phase 3 ([ustr-cmm#5](https://gitlab.com/PlasticDigits2/ustr-cmm/-/issues/5)) is also closed; production router already has `wrap_mapper` set (prior note on this issue). **Published Phase 2 addresses (for Coolify / client):** | | | |---|---| | vFDUSD | `terra1mnl9azefrqpmu888ar2u6zrcwr80hxlt3avf4300r576cw5ar7esvxsvj3` | | UST1 | `terra1f0eqgy9w7e5e7up97vjudqwx38tesf8ylx75x2lv3nwm0clry0pqmgfy72` | | ust1-oracle | `terra1fmht0t6svq3n24zx03nkfja0m40zhfyyxkdcvlrkl6u7gfe6aagq4gch8n` (code **11568**) | | ust1-window | `terra1zxwpzpzpleatqn39r00grau4yt29sld8pw78s7ktvjafnj5nsaxq0h3rh2` (code **11566**) | **#502 AC status:** wrap-mapper-on-router is done; everything else still open. No `/ust1` route or window client in this repo yet. **Next step to move AC forward:** ship the dedicated `/ust1` frontend (route + nav distinct from `/mint`, `ust1Window` client via CW20 `Send` + `effective_swap` quotes/gates, UST1/vFDUSD metadata/logos) and wire Coolify `VITE_*` to the addresses above. That unblocks the first three ACs (live mint/redeem UI, quote parity, UI deposit/withdraw smoke). Parallel/follow-on: mainnet wrap env + Swap wrap UX (AC #4/#8), then secondary AMM pair or product waiver (AC #5).
PlasticDigits commented 2026-08-08 11:26:05 +00:00 (Migrated from gitlab.com)

mentioned in issue #506

mentioned in issue #506
PlasticDigits commented 2026-08-08 11:26:05 +00:00 (Migrated from gitlab.com)

marked as related to #506

marked as related to #506
PlasticDigits commented 2026-08-08 11:26:46 +00:00 (Migrated from gitlab.com)

mentioned in issue #507

mentioned in issue #507
PlasticDigits commented 2026-08-08 11:26:46 +00:00 (Migrated from gitlab.com)

marked as related to #507

marked as related to #507
PlasticDigits commented 2026-08-08 11:26:48 +00:00 (Migrated from gitlab.com)

mentioned in issue #508

mentioned in issue #508
PlasticDigits commented 2026-08-08 11:26:48 +00:00 (Migrated from gitlab.com)

marked as related to #508

marked as related to #508
PlasticDigits commented 2026-08-08 11:27:02 +00:00 (Migrated from gitlab.com)

Split implementation issues (from Phase 4 AC next steps)

Track Issue
/ust1 UI (route, nav ≠ /mint, window client, UST1/vFDUSD logos) #506
Mainnet wrap env + Swap wrap UX (cLUNC/cUSTC, 1% fee) #507
Secondary UST1 AMM pair or product waiver #508

All three relate_to this issue. Prefer landing work on the child issues; keep #502 as the Phase 4 umbrella AC tracker.

## Split implementation issues (from Phase 4 AC next steps) | Track | Issue | |-------|-------| | `/ust1` UI (route, nav ≠ `/mint`, window client, UST1/vFDUSD logos) | [#506](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/506) | | Mainnet wrap env + Swap wrap UX (cLUNC/cUSTC, 1% fee) | [#507](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/507) | | Secondary UST1 AMM pair **or** product waiver | [#508](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/508) | All three relate_to this issue. Prefer landing work on the child issues; keep #502 as the Phase 4 umbrella AC tracker.
PlasticDigits commented 2026-08-08 13:51:19 +00:00 (Migrated from gitlab.com)

#508 secondary AMM — Path B interim waiver (for Phase 4 AC)

Child #508 ships Path A create/seed tooling + LocalTerra rehearsal, but defers live columbus-5 pair create/seed until UST1 inventory exists (total_supply was 0; deployer balances 0).

Canonical waiver: deployments/ust1-secondary-pair/PRODUCT_WAIVER.md

Revisit: fund LP wallet (typically after /ust1 window mint) → ./scripts/add-ust1-secondary-pair.sh → record pair/txs on #508 and flip this AC to Path A.

This satisfies #502 “secondary pair or explicit product waiver” via the waiver path until inventory unblocks Path A.

## #508 secondary AMM — Path B interim waiver (for Phase 4 AC) Child [#508](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/508) ships Path A create/seed tooling + LocalTerra rehearsal, but **defers live columbus-5 pair create/seed** until UST1 inventory exists (`total_supply` was 0; deployer balances 0). Canonical waiver: [`deployments/ust1-secondary-pair/PRODUCT_WAIVER.md`](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/blob/feat/508-ust1-secondary-amm/deployments/ust1-secondary-pair/PRODUCT_WAIVER.md) **Revisit:** fund LP wallet (typically after `/ust1` window mint) → `./scripts/add-ust1-secondary-pair.sh` → record pair/txs on #508 and flip this AC to Path A. This satisfies #502 “secondary pair **or** explicit product waiver” via the waiver path until inventory unblocks Path A.
PlasticDigits commented 2026-08-09 06:50:18 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1046

mentioned in merge request !1046
PlasticDigits commented 2026-08-09 06:51:36 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1045

mentioned in merge request !1045
PlasticDigits commented 2026-08-09 08:00:51 +00:00 (Migrated from gitlab.com)

Production smoke — /ust1 mint + redeem

Coolify rebuild with wrap + UST1 VITE_* confirmed (bundle + LCD). Window path smokes below.

Mint (deposit) Redeem (withdraw)
Tx A90EEC4DB2E03943B7504421AD889017ED62BC968B12DA8B3EDD7E1A087E6284 630BE3BE276C093DFB22671745D6E12B5D306CA431D91CDCDD66538C6479EE9A
Height / time 29868589 / 2026-08-09T07:59:38Z 29868591 / 2026-08-09T07:59:50Z
Result code=0 code=0
Sender terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l same
Path vFDUSD CW20 Send → ust1-window deposit UST1 CW20 Send → ust1-window withdraw (min_vfdusd_out)
Amounts in 2.437446 vFDUSD → mint 2.956591 UST1 burn 2.956591 UST1 → out 2.388940 vFDUSD

Window contract: terra1zxwpzpzpleatqn39r00grau4yt29sld8pw78s7ktvjafnj5nsaxq0h3rh2.

AC progress (window track)

  • https://dex.cl8y.com/ust1 mint/redeem UI live (post Coolify)
  • Successful deposit + withdraw from UI (hashes above)
  • Side-by-side LCD effective_swap vs UI quote (optional note if captured)
  • Wrap/unwrap LUNC + USTC smoke + fee display (on-chain mapper fee_bps=200)
  • Secondary AMM: Path B waiver until inventory (#508)
  • Nav UST1 ≠ Mint (visual confirm if not already)

Still open for #502: wrap smokes (both denoms), then remaining checklist / close umbrella when wrap ACs done.

## Production smoke — `/ust1` mint + redeem Coolify rebuild with wrap + UST1 `VITE_*` confirmed (bundle + LCD). Window path smokes below. | | Mint (deposit) | Redeem (withdraw) | |---|---|---| | **Tx** | [`A90EEC4DB2E03943B7504421AD889017ED62BC968B12DA8B3EDD7E1A087E6284`](https://finder.terraclassic.community/mainnet/tx/A90EEC4DB2E03943B7504421AD889017ED62BC968B12DA8B3EDD7E1A087E6284) | [`630BE3BE276C093DFB22671745D6E12B5D306CA431D91CDCDD66538C6479EE9A`](https://finder.terraclassic.community/mainnet/tx/630BE3BE276C093DFB22671745D6E12B5D306CA431D91CDCDD66538C6479EE9A) | | **Height / time** | `29868589` / `2026-08-09T07:59:38Z` | `29868591` / `2026-08-09T07:59:50Z` | | **Result** | `code=0` | `code=0` | | **Sender** | `terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l` | same | | **Path** | vFDUSD CW20 `Send` → ust1-window `deposit` | UST1 CW20 `Send` → ust1-window `withdraw` (`min_vfdusd_out`) | | **Amounts** | in **2.437446** vFDUSD → mint **2.956591** UST1 | burn **2.956591** UST1 → out **2.388940** vFDUSD | Window contract: `terra1zxwpzpzpleatqn39r00grau4yt29sld8pw78s7ktvjafnj5nsaxq0h3rh2`. ### AC progress (window track) - [x] `https://dex.cl8y.com/ust1` mint/redeem UI live (post Coolify) - [x] Successful deposit + withdraw from UI (hashes above) - [ ] Side-by-side LCD `effective_swap` vs UI quote (optional note if captured) - [ ] Wrap/unwrap LUNC + USTC smoke + fee display (on-chain mapper `fee_bps=200`) - [x] Secondary AMM: Path B waiver until inventory (#508) - [ ] Nav UST1 ≠ Mint (visual confirm if not already) **Still open for #502:** wrap smokes (both denoms), then remaining checklist / close umbrella when wrap ACs done.
PlasticDigits commented 2026-08-09 09:02:42 +00:00 (Migrated from gitlab.com)

Production smoke — wrap / unwrap (LUNC ↔ cLUNC)

Verified on columbus-5 after Coolify wrap env + UNWRAP_GAS_LIMIT=800k fix.

Wrap (LUNC → cLUNC) Unwrap (cLUNC → LUNC)
Tx 8221906F421B4E50E7AB5AC9D1651BBE9318FEACB9E5127BBC803DA06D2CEF0C A5786E3FC231E06C27960E3417D9ABDE85294BA087E6C30E3D0D8584678D7640
Height / time 29868881 29869214 / 2026-08-09T09:01:44Z
Result code=0 code=0
Sender terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l same
Path treasury wrap_deposit cLUNC CW20 Send → wrap-mapper unwrap → treasury instant_withdraw
Gas wanted 400000 / used 307155 wanted 800000 / used 566802 (~29% headroom; matches LCD sim ~562k)
Amounts (prior wrap smoke) burn 400 cLUNC → 392 LUNC out (2% = fee_bps=200)

Checks

  • Router wrap_mapper set; wrap env baked in Coolify
  • On-chain mapper fee_bps=200 (UI should show 2%, not legacy 1% docs)
  • Unwrap no longer OOG after ceiling bump (prior fails at 400k / 550k)
  • USTC ↔ cUSTC wrap/unwrap smoke still open (optional for parity)

AC progress (wrap track)

  • Successful LUNC wrap + unwrap from production UI (hashes above)
  • Wrap fee displayed/applied from chain (fee_bps=200)
  • USTC denom smoke (optional)
## Production smoke — wrap / unwrap (LUNC ↔ cLUNC) Verified on columbus-5 after Coolify wrap env + `UNWRAP_GAS_LIMIT=800k` fix. | | Wrap (LUNC → cLUNC) | Unwrap (cLUNC → LUNC) | |---|---|---| | **Tx** | [`8221906F421B4E50E7AB5AC9D1651BBE9318FEACB9E5127BBC803DA06D2CEF0C`](https://finder.terraclassic.community/mainnet/tx/8221906F421B4E50E7AB5AC9D1651BBE9318FEACB9E5127BBC803DA06D2CEF0C) | [`A5786E3FC231E06C27960E3417D9ABDE85294BA087E6C30E3D0D8584678D7640`](https://finder.terraclassic.community/mainnet/tx/A5786E3FC231E06C27960E3417D9ABDE85294BA087E6C30E3D0D8584678D7640) | | **Height / time** | `29868881` | `29869214` / `2026-08-09T09:01:44Z` | | **Result** | `code=0` | `code=0` | | **Sender** | `terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l` | same | | **Path** | treasury `wrap_deposit` | cLUNC CW20 `Send` → wrap-mapper `unwrap` → treasury `instant_withdraw` | | **Gas** | wanted `400000` / used `307155` | wanted `800000` / used `566802` (~29% headroom; matches LCD sim ~562k) | | **Amounts** | (prior wrap smoke) | burn **400** cLUNC → **392** LUNC out (2% = `fee_bps=200`) | **Checks** - [x] Router `wrap_mapper` set; wrap env baked in Coolify - [x] On-chain mapper `fee_bps=200` (UI should show 2%, not legacy 1% docs) - [x] Unwrap no longer OOG after ceiling bump (prior fails at 400k / 550k) - [ ] USTC ↔ cUSTC wrap/unwrap smoke still open (optional for parity) ### AC progress (wrap track) - [x] Successful LUNC wrap + unwrap from production UI (hashes above) - [x] Wrap fee displayed/applied from chain (`fee_bps=200`) - [ ] USTC denom smoke (optional)
PlasticDigits commented 2026-08-09 09:06:13 +00:00 (Migrated from gitlab.com)

Production smoke — wrap / unwrap (USTC ↔ cUSTC)

Wrap (USTC → cUSTC) Unwrap (cUSTC → USTC)
Tx 9F74FD84628C0885F9D95D1290B486C07EFAC56DAAF305E745D44F723945D403 2C76F19AF74292734648D752E12C5305895758418CAE0616D2A2C5C52DE20225
Height / time 29869249 / 2026-08-09T09:05:15Z 29869252 / 2026-08-09T09:05:33Z
Result code=0 code=0
Sender terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l same
Path treasury wrap_deposit (uusd) cUSTC CW20 Send → mapper unwrap → treasury instant_withdraw (uusd)
Amounts 125 USTC → mint 122.5 cUSTC burn 50 cUSTC → 49 USTC
Fee 2% (fee_bps=200) 2%
Gas wanted 400000 / used 305527 wanted 800000 / used 560330 (~30% headroom)

Together with prior LUNC wrap/unwrap smokes, both denoms are covered for #502 wrap ACs.

## Production smoke — wrap / unwrap (USTC ↔ cUSTC) | | Wrap (USTC → cUSTC) | Unwrap (cUSTC → USTC) | |---|---|---| | **Tx** | [`9F74FD84628C0885F9D95D1290B486C07EFAC56DAAF305E745D44F723945D403`](https://finder.terraclassic.community/mainnet/tx/9F74FD84628C0885F9D95D1290B486C07EFAC56DAAF305E745D44F723945D403) | [`2C76F19AF74292734648D752E12C5305895758418CAE0616D2A2C5C52DE20225`](https://finder.terraclassic.community/mainnet/tx/2C76F19AF74292734648D752E12C5305895758418CAE0616D2A2C5C52DE20225) | | **Height / time** | `29869249` / `2026-08-09T09:05:15Z` | `29869252` / `2026-08-09T09:05:33Z` | | **Result** | `code=0` | `code=0` | | **Sender** | `terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l` | same | | **Path** | treasury `wrap_deposit` (`uusd`) | cUSTC CW20 `Send` → mapper `unwrap` → treasury `instant_withdraw` (`uusd`) | | **Amounts** | **125** USTC → mint **122.5** cUSTC | burn **50** cUSTC → **49** USTC | | **Fee** | 2% (`fee_bps=200`) | 2% | | **Gas** | wanted `400000` / used `305527` | wanted `800000` / used `560330` (~30% headroom) | Together with prior LUNC wrap/unwrap smokes, **both denoms** are covered for #502 wrap ACs.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-08-09 09:16:13 +00:00
PlasticDigits commented 2026-08-09 09:16:14 +00:00 (Migrated from gitlab.com)

AC met, wrap fee onchain 2% due to 1.5% tax raise by terraclassic validator govenrnace (not us), closing. Note that ust1 apirs are not yet created.

AC met, wrap fee onchain 2% due to 1.5% tax raise by terraclassic validator govenrnace (not us), closing. Note that ust1 apirs are not yet created.
PlasticDigits commented 2026-08-09 09:30:43 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1048

mentioned in merge request !1048
PlasticDigits commented 2026-08-19 11:49:48 +00:00 (Migrated from gitlab.com)

mentioned in issue #574

mentioned in issue #574
PlasticDigits commented 2026-08-19 11:49:49 +00:00 (Migrated from gitlab.com)

marked as related to #574

marked as related to #574
PlasticDigits commented 2026-08-19 11:49:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #575

mentioned in issue #575
PlasticDigits commented 2026-08-19 11:49:57 +00:00 (Migrated from gitlab.com)

marked as related to #575

marked as related to #575
PlasticDigits commented 2026-08-23 03:05:42 +00:00 (Migrated from gitlab.com)

mentioned in issue #599

mentioned in issue #599
Sign in to join this conversation.
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/cl8y-dex-terraclassic#502
No description provided.