ops(wrap-mapper): mainnet migrate + SetFees 200/51 and DEX #516 Coolify rollout #13

Closed
opened 2026-08-15 09:57:07 +00:00 by PlasticDigits · 13 comments
PlasticDigits commented 2026-08-15 09:57:07 +00:00 (Migrated from gitlab.com)

Summary

Finish the bundled #9 / DEX #516 mainnet rollout: store+migrate wrap-mapper to cw2 0.3.0, gov-set fee_wrap_bps=200 / fee_unwrap_bps=51, run tiny live wrap/unwrap probes, then ship cl8y-dex-terraclassic#516 + Coolify frontend redeploy so unwrap user all-in is ≈2% (no InstantWithdraw gross-up).

Upstream code is done. #9 closed after MR !31 (origin/master 1939449). This issue tracks human ops + consumer release only.

Companion: cl8y-dex-terraclassic#516 (open, no MR as of 2026-08-15). Disclosure from DEX #512 stays.

Related: wrap-mapper terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2, skill skills/wrap-mapper-asymmetric-fees, runbook docs/DEPLOYMENT.md § asymmetric fees.


Current codebase / live state (verified 2026-08-15)

On-chain (columbus-5)

Param Live Target
wrap-mapper code ID 11565 (pre-#9) new store of cw2 0.3.0
Config { fee_bps: 200 } { fee_wrap_bps: 200, fee_unwrap_bps: 51 } — no fee_bps
Unwrap all-in @ 1.5% tax ~3.47% (10 000 → ~9 653) ≈2.00% (10 000 → ~9 799–9 800)
Governance / admin terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l unchanged
Paused false unchanged

Config migrate is breaking. Live DEX still types/reads fee_bps only (frontend-dapp/src/services/terraclassic/wrapMapper.ts). Migrating before a #516 Coolify deploy will fail-close Wrap/Swap quotes.

Repos

Repo Status
PlasticDigits2/ustr-cmm !31 merged; local checkouts may still be behind origin/master
PlasticDigits/cl8y-dex-terraclassic #516 open; no implementation MR; W8–W11 from #512 already live

Why this is needed

  • Closing #9 closed the code tracker; store/migrate/SetFees/probes were explicitly out of that MR.
  • Product marketed unwrap ~2%; live stacked fee+tax is still ~3.47% until 51 is on-chain.
  • Contract change alone does not update DEX quotes, QA templates, health probes, or Coolify assets that assume a single fee_bps.
  • No dual-read window: consumers must ship in the same window as migrate.

Constraints / guardrails

  1. Agents must not broadcast mainnet gov txs (store / migrate / SetFees). Provide exact msgs only; human cl8y2_admin signs.
  2. No InstantWithdraw gross-up. Tax stays on the unwrap receiver; unwrap fee is tuned so all-in ≈ 2%.
  3. Do not lower wrap below 200. Wrap path is untaxed.
  4. Same gov window: migrate maps legacy fee_bps=200 → 200/200. Never leave unwrap at 200 after advertising the fix — SetFees 200/51 immediately after.
  5. Coordinate DEX #516 before or in the same window as migrate (breaking ConfigResponse).
  6. Do not hardcode 200/51 in the UI — always query on-chain config; fail closed if a fee field is missing.
  7. Governance only (terra1xsecn…); not DEX factory multisig.
  8. Pause / rate-limit / mapping / treasury InstantWithdraw ABI unchanged.
  9. Do not change ust1-window fee_bps (different contract).
  10. Prefer --gas auto --gas-prices 28.325uluna (store adj 1.5, migrate/execute adj 1.4). Fixed --fees 100000000uluna is insufficient for wasm store.

Relevant files

ustr-cmm (ops / already on origin/master)

Path Role
contracts/contracts/wrap-mapper/ cw2 0.3.0 asymmetric fees + migrate
docs/DEPLOYMENT.md Mainnet migrate plan + set_fees JSON
docs/CONTRACTS.md Target 200/51 narrative
skills/wrap-mapper-asymmetric-fees/SKILL.md Agent/operator skill
contracts/scripts/treasury-migrate-wrap-20260808-090524.json Prior Phase 3 artifact (code 11565)

cl8y-dex-terraclassic (#516 — not started)

Path Role
frontend-dapp/src/services/terraclassic/wrapMapper.ts queryWrapMapperConfig still fee_bps
frontend-dapp/src/services/terraclassic/router.ts wrap/unwrap net helpers
frontend-dapp/src/pages/WrapPage.tsx, SwapPage.tsx Quotes + fee notes
frontend-dapp/src/utils/poolProvideCounterpart.ts Provide auto-fill wrap fee
skills/AGENTS_WRAP_UNWRAP_BURN_TAX.md W8–W11; still points at gross-up follow-up
docs/qa-templates/wrap-unwrap-test-pass.md Still 9653-era unwrap expectation
scripts/check-ust1-wrap-ops-health.sh, deployments/mainnet-ust1-wrap/REGISTRY.md Health / registry fee_bps=200

Order matters (breaking ABI):

  1. Implement and merge DEX #516 (or have the Coolify artifact ready) so UI reads fee_wrap_bps / fee_unwrap_bps and fails closed on legacy-only JSON.
  2. Human ops (same window):
    • Store new wrap-mapper wasm from origin/master.
    • Migrate in place terra1xuuuh…nmd2 with {}.
    • Immediately:
export WRAP_MAPPER=terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2

terrad tx wasm execute $WRAP_MAPPER \
  '{"set_fees":{"fee_wrap_bps":200,"fee_unwrap_bps":51}}' \
  --from cl8y2_admin --chain-id columbus-5 --node $RPC \
  --gas auto --gas-adjustment 1.4 --gas-prices 28.325uluna -y
  • Query Config {}: expect fee_wrap_bps=200, fee_unwrap_bps=51.
  1. Tiny live probes both denoms (uluna/cLUNC and uusd/cUSTC); record tx hashes; confirm treasury native ≥ CW20 supply.
  2. Coolify frontend redeploy (assets newer than chain migrate) + Wrap/Swap smoke vs LCD.
  3. Update this repo’s address/code-id docs + DEPLOYMENT checklist; close DEX #516 when its verification table passes.

Retune rule (already documented; do not invent a new one)

fee_unwrap_bps = round(10000 - 9800 / (1 - burn_tax_rate))

burn_tax_rate=0.015 → 51. Prefer ≤ 2% all-in when rounding. If tax ≥ ~2%, escalate — cannot hit 2% all-in without subsidy/gross-up.


Acceptance criteria

  • DEX #516 merged (or equivalent consumer) understands split fees; no reliance on fee_bps.
  • Mainnet wrap-mapper code ID ≠ 11565; cw2 0.3.0.
  • Config {} on columbus-5: fee_wrap_bps=200, fee_unwrap_bps=51 (no fee_bps).
  • Tiny wrap 10 000 → CW20 net 9 800 at 200 bps (both denoms); no burn tax on wrap.
  • Tiny unwrap 10 000 → user native receive ≈ 9 800 under 1.5% tax (integer tolerance: 9 799 OK); not 9 653. Record tx hashes.
  • After probes: treasury uluna ≥ cLUNC supply and uusd ≥ cUSTC supply.
  • Coolify frontend redeployed after migrate; Wrap + Swap wrap_input/unwrap_output quotes match LCD.
  • docs/DEPLOYMENT.md / docs/CONTRACTS.md / README code ID + fee table updated from “pending #9” to the new code ID + 200/51.
  • DEX #516 verification table green; that issue closed.
  • No gross-up added to treasury InstantWithdraw.

Test plan (all paths)

Pre-broadcast (read-only / CI)

  • cd contracts && cargo test --package wrap-mapper --lib green on the wasm that will be stored.
  • DEX #516 unit tests + verify target green before migrate (quotes must not assume live 51 until config is live — show truthful stack).

Mainnet ops (human)

  • Dry-run / gas check store (adj 1.5) and migrate/execute (adj 1.4).
  • Post-migrate, before SetFees: config is 200/200 (legacy map). Do not stop here.
  • Post-SetFees: config 200/51.
  • Mappings, pause, treasury, governance unchanged.
  • Tiny wrap LUNC→cLUNC and USTC→cUSTC.
  • Tiny unwrap cLUNC→LUNC and cUSTC→USTC (wallet delta = quote).
  • Solvency query after each unwrap.

DEX / Coolify

  • Direct wrap/unwrap + Swap wrap_input / unwrap_output / both.
  • Fee notes + exchange-deposit warning on unwrap (not “2% flat” implying tax-free).
  • Health script / REGISTRY display both fees.
  • Stale config cache TTL still short enough after gov retune.

Test plan (attack / hack / abuse)

  • Unauthorized SetFees* — non-gov rejected (already unit-tested; confirm live admin is still terra1xsecn…).
  • Migrate-then-forget — unwrap left at 200 after advertising 2% all-in. Gate: SetFees in the same window; do not announce until 51 is live.
  • Breaking Config vs old UI — old Coolify hitting new contract must fail closed (no quote), not silent 0% or fee_bps undefined → 0.
  • Field confusion / malformed LCD — missing one fee → no quote.
  • Hardcoded 200/51 in UI math — grep/tests forbid constants driving quotes.
  • Wrong-path fee — wrap cannot be charged unwrap fee and vice versa.
  • Solvency myth — fee_unwrap=51 << tax does not erode native ≥ supply (surplus ≈ +unwrap fee). Confirm after live probes.
  • Paused unwrap still fail-closed; fee split must not bypass pause.
  • Exchange-deposit recipient — warning retained; contract still sends to specified recipient.

Verification criteria

Check Pass
LCD config fee_wrap_bps=200, fee_unwrap_bps=51 on columbus-5
Code ID wrap-mapper ≠ 11565; documented
Unwrap all-in Empirical receive/A ∈ [0.979, 0.981] for a sizeable test amount under tax 1.5%
Wrap fee receive/A = 0.98 at 200 bps
Treasury uluna/uusd ≥ cLUNC/cUSTC supply after probes
DEX UI Unwrap 10 000 quote ≈ 9 800 (not 9 653); wrap 10 000 = 9 800 CW20
Coolify Frontend assets newer than chain migrate; Wrap page smoke OK
Gross-up Absent from unwrap/treasury send path
DEX companion #516 closed

Done when live fees are 200/51, probes recorded, Coolify matches chain, and DEX #516 is closed.

## Summary Finish the **bundled #9 / DEX #516 mainnet rollout**: store+migrate wrap-mapper to cw2 `0.3.0`, gov-set **`fee_wrap_bps=200` / `fee_unwrap_bps=51`**, run tiny live wrap/unwrap probes, then ship [cl8y-dex-terraclassic#516](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/516) + Coolify frontend redeploy so unwrap user all-in is **≈2%** (no InstantWithdraw gross-up). **Upstream code is done.** [#9](https://gitlab.com/PlasticDigits2/ustr-cmm/-/issues/9) closed after [MR !31](https://gitlab.com/PlasticDigits2/ustr-cmm/-/merge_requests/9) (`origin/master` `1939449`). This issue tracks **human ops + consumer release** only. **Companion:** [cl8y-dex-terraclassic#516](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/516) (open, no MR as of 2026-08-15). Disclosure from [DEX #512](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/512) stays. Related: wrap-mapper `terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2`, skill [`skills/wrap-mapper-asymmetric-fees`](../skills/wrap-mapper-asymmetric-fees/SKILL.md), runbook [docs/DEPLOYMENT.md § asymmetric fees](../docs/DEPLOYMENT.md#asymmetric-wrapunwrap-fees-vs-burn-tax). --- ## Current codebase / live state (verified 2026-08-15) ### On-chain (columbus-5) | Param | Live | Target | |-------|------|--------| | wrap-mapper code ID | **`11565`** (pre-#9) | new store of cw2 `0.3.0` | | `Config` | **`{ fee_bps: 200 }`** | `{ fee_wrap_bps: 200, fee_unwrap_bps: 51 }` — **no** `fee_bps` | | Unwrap all-in @ 1.5% tax | **~3.47%** (10 000 → ~9 653) | **≈2.00%** (10 000 → ~9 799–9 800) | | Governance / admin | `terra1xsecn4snv94ezcez0z3vq8an9j4h4kxxcydp8l` | unchanged | | Paused | `false` | unchanged | `Config` migrate is **breaking**. Live DEX still types/reads `fee_bps` only (`frontend-dapp/src/services/terraclassic/wrapMapper.ts`). Migrating before a #516 Coolify deploy will fail-close Wrap/Swap quotes. ### Repos | Repo | Status | |------|--------| | `PlasticDigits2/ustr-cmm` | !31 merged; local checkouts may still be behind `origin/master` | | `PlasticDigits/cl8y-dex-terraclassic` | #516 open; no implementation MR; W8–W11 from #512 already live | --- ## Why this is needed - Closing #9 closed the **code** tracker; store/migrate/`SetFees`/probes were explicitly out of that MR. - Product marketed unwrap ~2%; live stacked fee+tax is still ~3.47% until **51** is on-chain. - Contract change alone does not update DEX quotes, QA templates, health probes, or Coolify assets that assume a single `fee_bps`. - No dual-read window: consumers **must** ship in the same window as migrate. --- ## Constraints / guardrails 1. **Agents must not broadcast** mainnet gov txs (`store` / `migrate` / `SetFees`). Provide exact msgs only; human `cl8y2_admin` signs. 2. **No InstantWithdraw gross-up.** Tax stays on the unwrap receiver; unwrap fee is tuned so all-in ≈ 2%. 3. **Do not lower wrap** below 200. Wrap path is untaxed. 4. **Same gov window:** migrate maps legacy `fee_bps=200` → **200/200**. Never leave unwrap at 200 after advertising the fix — `SetFees` 200/51 immediately after. 5. **Coordinate DEX #516** before or in the same window as migrate (breaking `ConfigResponse`). 6. **Do not hardcode 200/51 in the UI** — always query on-chain config; fail closed if a fee field is missing. 7. **Governance only** (`terra1xsecn…`); not DEX factory multisig. 8. Pause / rate-limit / mapping / treasury InstantWithdraw ABI unchanged. 9. Do not change ust1-window `fee_bps` (different contract). 10. Prefer `--gas auto --gas-prices 28.325uluna` (store adj **1.5**, migrate/execute adj **1.4**). Fixed `--fees 100000000uluna` is insufficient for wasm store. --- ## Relevant files ### ustr-cmm (ops / already on `origin/master`) | Path | Role | |------|------| | `contracts/contracts/wrap-mapper/` | cw2 `0.3.0` asymmetric fees + migrate | | `docs/DEPLOYMENT.md` | Mainnet migrate plan + `set_fees` JSON | | `docs/CONTRACTS.md` | Target 200/51 narrative | | `skills/wrap-mapper-asymmetric-fees/SKILL.md` | Agent/operator skill | | `contracts/scripts/treasury-migrate-wrap-20260808-090524.json` | Prior Phase 3 artifact (code `11565`) | ### cl8y-dex-terraclassic (#516 — not started) | Path | Role | |------|------| | `frontend-dapp/src/services/terraclassic/wrapMapper.ts` | `queryWrapMapperConfig` still `fee_bps` | | `frontend-dapp/src/services/terraclassic/router.ts` | wrap/unwrap net helpers | | `frontend-dapp/src/pages/WrapPage.tsx`, `SwapPage.tsx` | Quotes + fee notes | | `frontend-dapp/src/utils/poolProvideCounterpart.ts` | Provide auto-fill wrap fee | | `skills/AGENTS_WRAP_UNWRAP_BURN_TAX.md` | W8–W11; still points at gross-up follow-up | | `docs/qa-templates/wrap-unwrap-test-pass.md` | Still 9653-era unwrap expectation | | `scripts/check-ust1-wrap-ops-health.sh`, `deployments/mainnet-ust1-wrap/REGISTRY.md` | Health / registry `fee_bps=200` | --- ## Recommended direction **Order matters** (breaking ABI): 1. **Implement and merge DEX #516** (or have the Coolify artifact ready) so UI reads `fee_wrap_bps` / `fee_unwrap_bps` and fails closed on legacy-only JSON. 2. **Human ops (same window):** - Store new wrap-mapper wasm from `origin/master`. - Migrate in place `terra1xuuuh…nmd2` with `{}`. - Immediately: ```bash export WRAP_MAPPER=terra1xuuuhpmyd5t29ry7mydg7ra2q2phrwhx7j28nx7x9sjw6zznkumsz0nmd2 terrad tx wasm execute $WRAP_MAPPER \ '{"set_fees":{"fee_wrap_bps":200,"fee_unwrap_bps":51}}' \ --from cl8y2_admin --chain-id columbus-5 --node $RPC \ --gas auto --gas-adjustment 1.4 --gas-prices 28.325uluna -y ``` - Query `Config {}`: expect `fee_wrap_bps=200`, `fee_unwrap_bps=51`. 3. **Tiny live probes** both denoms (`uluna`/cLUNC and `uusd`/cUSTC); record tx hashes; confirm treasury native ≥ CW20 supply. 4. **Coolify frontend redeploy** (assets newer than chain migrate) + Wrap/Swap smoke vs LCD. 5. Update this repo’s address/code-id docs + DEPLOYMENT checklist; close DEX #516 when its verification table passes. ### Retune rule (already documented; do not invent a new one) ```text fee_unwrap_bps = round(10000 - 9800 / (1 - burn_tax_rate)) ``` `burn_tax_rate=0.015` → **51**. Prefer ≤ 2% all-in when rounding. If tax ≥ ~2%, escalate — cannot hit 2% all-in without subsidy/gross-up. --- ## Acceptance criteria - [ ] DEX #516 merged (or equivalent consumer) understands split fees; no reliance on `fee_bps`. - [ ] Mainnet wrap-mapper code ID **≠ `11565`**; cw2 `0.3.0`. - [ ] `Config {}` on columbus-5: `fee_wrap_bps=200`, `fee_unwrap_bps=51` (no `fee_bps`). - [ ] Tiny wrap 10 000 → CW20 net **9 800** at 200 bps (both denoms); no burn tax on wrap. - [ ] Tiny unwrap 10 000 → user native receive ≈ **9 800** under 1.5% tax (integer tolerance: 9 799 OK); **not** 9 653. Record tx hashes. - [ ] After probes: treasury `uluna` ≥ cLUNC supply and `uusd` ≥ cUSTC supply. - [ ] Coolify frontend redeployed after migrate; Wrap + Swap wrap_input/unwrap_output quotes match LCD. - [ ] `docs/DEPLOYMENT.md` / `docs/CONTRACTS.md` / README code ID + fee table updated from “pending #9” to the new code ID + 200/51. - [ ] DEX #516 verification table green; that issue closed. - [ ] No gross-up added to treasury InstantWithdraw. --- ## Test plan (all paths) ### Pre-broadcast (read-only / CI) - [ ] `cd contracts && cargo test --package wrap-mapper --lib` green on the wasm that will be stored. - [ ] DEX #516 unit tests + verify target green **before** migrate (quotes must not assume live 51 until config is live — show truthful stack). ### Mainnet ops (human) - [ ] Dry-run / gas check store (adj 1.5) and migrate/execute (adj 1.4). - [ ] Post-migrate, **before** `SetFees`: config is 200/200 (legacy map). Do not stop here. - [ ] Post-`SetFees`: config 200/51. - [ ] Mappings, pause, treasury, governance unchanged. - [ ] Tiny wrap LUNC→cLUNC and USTC→cUSTC. - [ ] Tiny unwrap cLUNC→LUNC and cUSTC→USTC (wallet delta = quote). - [ ] Solvency query after each unwrap. ### DEX / Coolify - [ ] Direct wrap/unwrap + Swap `wrap_input` / `unwrap_output` / both. - [ ] Fee notes + exchange-deposit warning on unwrap (not “2% flat” implying tax-free). - [ ] Health script / REGISTRY display both fees. - [ ] Stale config cache TTL still short enough after gov retune. --- ## Test plan (attack / hack / abuse) - [ ] **Unauthorized `SetFees*`** — non-gov rejected (already unit-tested; confirm live admin is still `terra1xsecn…`). - [ ] **Migrate-then-forget** — unwrap left at 200 after advertising 2% all-in. Gate: `SetFees` in the same window; do not announce until 51 is live. - [ ] **Breaking Config vs old UI** — old Coolify hitting new contract must fail closed (no quote), not silent 0% or `fee_bps` undefined → 0. - [ ] **Field confusion / malformed LCD** — missing one fee → no quote. - [ ] **Hardcoded 200/51 in UI math** — grep/tests forbid constants driving quotes. - [ ] **Wrong-path fee** — wrap cannot be charged unwrap fee and vice versa. - [ ] **Solvency myth** — `fee_unwrap=51` << tax does not erode `native ≥ supply` (surplus ≈ +unwrap fee). Confirm after live probes. - [ ] **Paused unwrap** still fail-closed; fee split must not bypass pause. - [ ] **Exchange-deposit recipient** — warning retained; contract still sends to specified recipient. --- ## Verification criteria | Check | Pass | |-------|------| | LCD config | `fee_wrap_bps=200`, `fee_unwrap_bps=51` on columbus-5 | | Code ID | wrap-mapper ≠ `11565`; documented | | Unwrap all-in | Empirical receive/A ∈ [0.979, 0.981] for a sizeable test amount under tax 1.5% | | Wrap fee | receive/A = 0.98 at 200 bps | | Treasury | `uluna`/`uusd` ≥ cLUNC/cUSTC supply after probes | | DEX UI | Unwrap 10 000 quote ≈ 9 800 (not 9 653); wrap 10 000 = 9 800 CW20 | | Coolify | Frontend assets newer than chain migrate; Wrap page smoke OK | | Gross-up | Absent from unwrap/treasury send path | | DEX companion | #516 closed | **Done when** live fees are 200/51, probes recorded, Coolify matches chain, and DEX #516 is closed.
PlasticDigits commented 2026-08-15 09:57:08 +00:00 (Migrated from gitlab.com)

marked as related to #9

marked as related to #9
PlasticDigits commented 2026-08-15 09:57:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #9

mentioned in issue #9
PlasticDigits commented 2026-08-15 09:57:16 +00:00 (Migrated from gitlab.com)
mentioned in issue PlasticDigits/cl8y-dex-terraclassic#516
PlasticDigits commented 2026-08-15 10:19:47 +00:00 (Migrated from gitlab.com)
mentioned in issue PlasticDigits/cl8y-dex-terraclassic#521
PlasticDigits commented 2026-08-15 10:31:09 +00:00 (Migrated from gitlab.com)

mentioned in merge request PlasticDigits/cl8y-dex-terraclassic!358

mentioned in merge request PlasticDigits/cl8y-dex-terraclassic!358
PlasticDigits commented 2026-08-15 11:51:28 +00:00 (Migrated from gitlab.com)
mentioned in issue PlasticDigits/cl8y-dex-terraclassic#523
PlasticDigits commented 2026-08-15 11:54:29 +00:00 (Migrated from gitlab.com)

mentioned in merge request PlasticDigits/cl8y-dex-terraclassic!360

mentioned in merge request PlasticDigits/cl8y-dex-terraclassic!360
PlasticDigits commented 2026-08-15 12:01:22 +00:00 (Migrated from gitlab.com)

On-chain (#13 store / migrate / SetFees) — verified 2026-08-15

Both operator txs code 0. Live wrap-mapper terra1xuuuh…nmd2:

Check Result
Code ID 11574 (was 11565)
cw2 0.2.1 → 0.3.0 (from_legacy_fee_bps=true, migrate mapped 200/200)
Config fee_wrap_bps=200, fee_unwrap_bps=51 (no fee_bps)
Paused / admin unchanged (false / terra1xsecn…)
Step Height Tx
Store 29958794 9B305800…DA40
Migrate {} 29958809 8F05225E…D107
SetFees 200/51 29958810 740CB152…BDF3

Docs updated in-repo (DEPLOYMENT / CONTRACTS / README / skill / artifact JSON). Still open on this issue: tiny wrap/unwrap probes, Coolify #516 rebuild, DEX router fee_bps upgrade if unwrap_output is still live.

## On-chain (#13 store / migrate / SetFees) — verified 2026-08-15 Both operator txs **code 0**. Live wrap-mapper `terra1xuuuh…nmd2`: | Check | Result | |-------|--------| | Code ID | **`11574`** (was `11565`) | | cw2 | `0.2.1` → **`0.3.0`** (`from_legacy_fee_bps=true`, migrate mapped 200/200) | | `Config` | **`fee_wrap_bps=200`, `fee_unwrap_bps=51`** (no `fee_bps`) | | Paused / admin | unchanged (`false` / `terra1xsecn…`) | | Step | Height | Tx | |------|--------|----| | Store | `29958794` | [`9B305800…DA40`](https://finder.terraclassic.community/columbus-5/tx/9B30580007763DB44DA215975D25B8046C134A46436217D462354655B5B9DA40) | | Migrate `{}` | `29958809` | [`8F05225E…D107`](https://finder.terraclassic.community/columbus-5/tx/8F05225E53D67C3666C1E9B0929EB69A172FA3EDD2F1B750F456995820ACD107) | | `SetFees` 200/51 | `29958810` | [`740CB152…BDF3`](https://finder.terraclassic.community/columbus-5/tx/740CB152259CE5D02E225064CEEFB09870FD1D07779926391B2E81FA4B5FBDF3) | Docs updated in-repo (DEPLOYMENT / CONTRACTS / README / skill / artifact JSON). Still open on this issue: tiny wrap/unwrap probes, Coolify #516 rebuild, DEX router `fee_bps` upgrade if unwrap_output is still live.
PlasticDigits commented 2026-08-15 12:02:14 +00:00 (Migrated from gitlab.com)

Re-queried columbus-5 wrap-mapper terra1xuuuh…nmd2: code 11574, Config { fee_wrap_bps: 200, fee_unwrap_bps: 51 } (no fee_bps). Store / migrate / SetFees txs in the previous note.

This issue’s AC

AC Status
DEX #516 merged (split-fee consumer) Done — !358, #516 closed
wrap-mapper code ≠ 11565; cw2 0.3.0 Done — 11574
Live Config 200/51, no fee_bps Done
Docs DEPLOYMENT / CONTRACTS / README / skill / artifact JSON Done locally (working tree; not necessarily on origin/master yet)
No InstantWithdraw gross-up Done (unchanged)
Tiny wrap 10 000 → 9 800 both denoms Open
Tiny unwrap 10 000 → ≈9 800 (not 9 653); record hashes Open
Treasury native ≥ CW20 supply after probes Open
Coolify frontend rebuild + Wrap/Swap smoke Open
DEX #516 verification table green on prod Open (code yes; Coolify no)
Issue State Action
ustr-cmm#9 closed (code) Comment: chain 200/51 now live; leftover probes/Coolify stay here
DEX #516 closed (!358) Comment: LCD unblocked; Coolify still required
DEX #523 closed (!360 code) Comment: router wasm store+migrate still required — mapper already dropped fee_bps, so live unwrap_output can revert until router 1.1.0 is on-chain
DEX #512 closed (disclosure) Comment: on-chain all-in target is now 200/51; empirical unwrap still this issue’s probes

Keep open until probes + Coolify (+ router migrate on #523) are done. Do not announce ≈2% unwrap until those land.

## Related-issue sweep (2026-08-15) — **not closing** Re-queried columbus-5 wrap-mapper `terra1xuuuh…nmd2`: code **`11574`**, `Config { fee_wrap_bps: 200, fee_unwrap_bps: 51 }` (no `fee_bps`). Store / migrate / `SetFees` txs in the previous note. ### This issue’s AC | AC | Status | |----|--------| | DEX #516 merged (split-fee consumer) | **Done** — [!358](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/336), #516 closed | | wrap-mapper code ≠ `11565`; cw2 `0.3.0` | **Done** — `11574` | | Live `Config` 200/51, no `fee_bps` | **Done** | | Docs DEPLOYMENT / CONTRACTS / README / skill / artifact JSON | **Done locally** (working tree; not necessarily on `origin/master` yet) | | No InstantWithdraw gross-up | **Done** (unchanged) | | Tiny wrap 10 000 → 9 800 both denoms | **Open** | | Tiny unwrap 10 000 → ≈9 800 (not 9 653); record hashes | **Open** | | Treasury native ≥ CW20 supply after probes | **Open** | | Coolify frontend rebuild + Wrap/Swap smoke | **Open** | | DEX #516 verification table green on prod | **Open** (code yes; Coolify no) | ### Related | Issue | State | Action | |-------|-------|--------| | [ustr-cmm#9](https://gitlab.com/PlasticDigits2/ustr-cmm/-/issues/9) | closed (code) | Comment: chain 200/51 now live; leftover probes/Coolify stay here | | [DEX #516](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/516) | closed (!358) | Comment: LCD unblocked; Coolify still required | | [DEX #523](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/523) | closed (!360 code) | Comment: **router wasm store+migrate still required** — mapper already dropped `fee_bps`, so live `unwrap_output` can revert until router 1.1.0 is on-chain | | [DEX #512](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/512) | closed (disclosure) | Comment: on-chain all-in target is now 200/51; empirical unwrap still this issue’s probes | **Keep open** until probes + Coolify (+ router migrate on #523) are done. Do not announce ≈2% unwrap until those land.
PlasticDigits commented 2026-08-15 12:03:19 +00:00 (Migrated from gitlab.com)

mentioned in commit e7a26f2ba2

mentioned in commit e7a26f2ba24974818494d2f2e469d44a3ba54a3a
PlasticDigits commented 2026-08-15 12:20:35 +00:00 (Migrated from gitlab.com)

Status refresh — DEX companions + Coolify (2026-08-15)

Operator: DEX frontend has been redeployed. Re-queried chain:

Surface Live
wrap-mapper code 11574, { fee_wrap_bps: 200, fee_unwrap_bps: 51 }, not paused
DEX router code 11576 (was 11507; #523 store+migrate done)

DEX issues connected to this one

Issue State Leftover
#516 closed Code + Coolify (now redeployed). Prod Wrap/Swap smoke still useful.
#523 closed Router 1.1.0 on-chain. Smoke native-out unwrap_output still called out there.
#512 closed Disclosure stays; 3.47% retuned on-chain.
#522 closed Unrelated (USD price scale). Not a #13 blocker.

Still open on this issue (ustr-cmm)

  • Tiny wrap 10 000 → 9 800 CW20 both denoms (uluna/cLUNC, uusd/cUSTC); record hashes
  • Tiny unwrap 10 000 → ≈9 800 native (not 9 653); record hashes
  • After probes: treasury uluna ≥ cLUNC supply and uusd ≥ cUSTC supply
  • Optional: /wrap + Swap wrap_input/unwrap_output quote smoke vs LCD (DEX, now that Coolify is up)

Docs for 11574 / 200/51 are on origin/master. No further ustr-cmm contract work. Do not close until probes are recorded.

## Status refresh — DEX companions + Coolify (2026-08-15) Operator: DEX frontend has been redeployed. Re-queried chain: | Surface | Live | |---------|------| | wrap-mapper | code **`11574`**, `{ fee_wrap_bps: 200, fee_unwrap_bps: 51 }`, not paused | | DEX router | code **`11576`** (was `11507`; [#523](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/523) store+migrate done) | ### DEX issues connected to this one | Issue | State | Leftover | |-------|-------|----------| | [#516](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/516) | closed | Code + Coolify (now redeployed). Prod Wrap/Swap smoke still useful. | | [#523](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/523) | closed | Router 1.1.0 **on-chain**. Smoke native-out `unwrap_output` still called out there. | | [#512](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/512) | closed | Disclosure stays; 3.47% retuned on-chain. | | [#522](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/522) | closed | Unrelated (USD price scale). Not a #13 blocker. | ### Still open on **this** issue (ustr-cmm) - [ ] Tiny wrap 10 000 → 9 800 CW20 both denoms (`uluna`/cLUNC, `uusd`/cUSTC); record hashes - [ ] Tiny unwrap 10 000 → ≈9 800 native (not 9 653); record hashes - [ ] After probes: treasury `uluna` ≥ cLUNC supply and `uusd` ≥ cUSTC supply - [ ] Optional: `/wrap` + Swap wrap_input/unwrap_output quote smoke vs LCD (DEX, now that Coolify is up) Docs for `11574` / 200/51 are on `origin/master`. No further ustr-cmm contract work. **Do not close** until probes are recorded.
PlasticDigits commented 2026-08-15 12:23:26 +00:00 (Migrated from gitlab.com)

LUNC probes recorded (2026-08-15) — USTC still open

Wallet terra1hu4zggf3f8yw6jw3rxrjxn2drwad675gq5k2lv (cl8ydeploy). Both txs code 0. Local bal after each broadcast raced inclusion (--broadcast-mode sync); on-chain events are the source of truth. Wallet now holds 0 cLUNC / 0 cUSTC.

Wrap uluna 10 000 → cLUNC 9 800

Tx C5DDA278…93B7
Height 29959037
Events treasury wrap_deposit 10000 → mapper notify_deposit fee=200 fee_wrap_bps=200 → cLUNC mint 9800
Tax none (untaxed execute)

Pass (wrap receive/A = 0.98).

Unwrap cLUNC 9 800 (the mint, not 10 000)

Tx 58FEE7CE…8526
Height 29959038
Events mapper unwrap fee=49 fee_unwrap_bps=51 → burn 9800 → InstantWithdraw 9751 → user received 9605 uluna

Math: 9800 × 51 / 10_000 = 49 → withdraw 9751; tax floor(9751 × 0.015) = 146; 9751 − 146 = 9605. All-in 9605/9800 ≈ 0.9801 (in [0.979, 0.981]). Not the old 200 bps path (10 000 → 9 653).

AC example unwrap 10 000 → ~9 800 was not this size; 9 800-in is still a valid 51 bps proof. Optional follow-up: unwrap 10 000 for the exact 9 799–9 800 number.

Solvency (after these txs)

Native CW20 supply OK
LUNC treasury uluna 7369565161795 cLUNC 7220551050316 yes
USTC treasury uusd 41103185380797 cUSTC 208967371886 yes (no USTC probe yet)

Still open

  • Tiny wrap + unwrap uusd / cUSTC (same sizes, record hashes)
  • Optional: unwrap 10 000 cLUNC for the AC 9 800 receive
  • DEX /wrap quote smoke vs LCD (Coolify already redeployed)

Do not close until cUSTC probes are on-chain.

## LUNC probes recorded (2026-08-15) — USTC still open Wallet `terra1hu4zggf3f8yw6jw3rxrjxn2drwad675gq5k2lv` (`cl8ydeploy`). Both txs **code 0**. Local `bal` after each broadcast raced inclusion (`--broadcast-mode sync`); on-chain events are the source of truth. Wallet now holds **0** cLUNC / 0 cUSTC. ### Wrap `uluna` 10 000 → cLUNC **9 800** | | | |--|--| | Tx | [`C5DDA278…93B7`](https://finder.terraclassic.community/columbus-5/tx/C5DDA278F953B54EB7912FC9DFAF021EB056E28EB48411290F065012D9D493B7) | | Height | `29959037` | | Events | treasury `wrap_deposit` 10000 → mapper `notify_deposit` `fee=200` `fee_wrap_bps=200` → cLUNC `mint` **9800** | | Tax | none (untaxed execute) | **Pass** (wrap receive/A = 0.98). ### Unwrap cLUNC **9 800** (the mint, not 10 000) | | | |--|--| | Tx | [`58FEE7CE…8526`](https://finder.terraclassic.community/columbus-5/tx/58FEE7CEA9B1B0FB63CDF85F7F10C2578BB0D85ADBF0AC3D0F6D23FED2F08526) | | Height | `29959038` | | Events | mapper `unwrap` `fee=49` `fee_unwrap_bps=51` → burn 9800 → `InstantWithdraw` **9751** → user received **9605 uluna** | Math: `9800 × 51 / 10_000 = 49` → withdraw `9751`; tax `floor(9751 × 0.015) = 146`; `9751 − 146 = 9605`. All-in `9605/9800 ≈ 0.9801` (in [0.979, 0.981]). **Not** the old 200 bps path (10 000 → 9 653). AC example unwrap 10 000 → ~9 800 was not this size; 9 800-in is still a valid 51 bps proof. Optional follow-up: unwrap **10 000** for the exact 9 799–9 800 number. ### Solvency (after these txs) | | Native | CW20 supply | OK | |--|--------|-------------|----| | LUNC | treasury `uluna` `7369565161795` | cLUNC `7220551050316` | yes | | USTC | treasury `uusd` `41103185380797` | cUSTC `208967371886` | yes (no USTC probe yet) | ### Still open - [ ] Tiny wrap + unwrap `uusd` / cUSTC (same sizes, record hashes) - [ ] Optional: unwrap 10 000 cLUNC for the AC 9 800 receive - [ ] DEX `/wrap` quote smoke vs LCD (Coolify already redeployed) Do not close until cUSTC probes are on-chain.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-08-15 12:24:15 +00:00
PlasticDigits commented 2026-08-15 12:24:16 +00:00 (Migrated from gitlab.com)

cUSTC is fine, closing

cUSTC is fine, closing
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/ustr-cmm#13
No description provided.