feat(#516): consume wrap-mapper fee_wrap_bps / fee_unwrap_bps #1054

Merged
PlasticDigits merged 1 commit from feat/516-wrap-mapper-split-fees into main 2026-08-15 11:16:14 +00:00
PlasticDigits commented 2026-08-15 10:31:08 +00:00 (Migrated from gitlab.com)

Closes #516

Summary

  • Frontend wrap/unwrap quotes now use on-chain fee_wrap_bps / fee_unwrap_bps (Wrap, Swap native in/out, pool provide wrap auto-fill).
  • Parser fails closed on partial/invalid fees; maps pre-migrate { fee_bps } to both sides so live columbus-5 stays truthful until ustr-cmm#9 migrate.
  • Unwrap 10 000 @ 51 bps + 1.5% tax → 9 800; wrap 10 000 @ 200 → 9 800 (no burn tax). No InstantWithdraw gross-up; no hardcoded 200/51 in quote math.
  • Skills/docs/QA/registry/health updated with split fees + retune rule (fee_unwrap_bps = round(10000 − 9800 / (1 − burn_tax_rate))). New playbook skills/AGENTS_WRAP_MAPPER_SPLIT_FEES.md (W12–W15).

Test plan

  • make verify-issue-516 (run twice; 15/15)
  • make verify-issue-512 (no W8–W11 regression)
  • Coolify frontend rebuild before or with wrap-mapper migrate + set_fees 200/51 (ustr-cmm#13)
  • After migrate: LCD fee_wrap_bps=200 / fee_unwrap_bps=51; /wrap smoke wrap 10 000 → 9 800 CW20, unwrap → ≈9 800 native
  • Manual QA: docs/qa-templates/wrap-unwrap-test-pass.md (fee notes + exchange-deposit warning)

Follow-up (not this MR)

DEX router ConfigResponse still requires fee_bps for on-chain unwrap_output R3. Upgrade router wasm to read fee_unwrap_bps in the same migrate window or unwrap_output settlement will fail after Config drops fee_bps.

Closes #516 ## Summary - Frontend wrap/unwrap quotes now use on-chain `fee_wrap_bps` / `fee_unwrap_bps` (Wrap, Swap native in/out, pool provide wrap auto-fill). - Parser fails closed on partial/invalid fees; maps pre-migrate `{ fee_bps }` to both sides so live columbus-5 stays truthful until ustr-cmm#9 migrate. - Unwrap 10 000 @ 51 bps + 1.5% tax → **9 800**; wrap 10 000 @ 200 → **9 800** (no burn tax). No InstantWithdraw gross-up; no hardcoded 200/51 in quote math. - Skills/docs/QA/registry/health updated with split fees + retune rule (`fee_unwrap_bps = round(10000 − 9800 / (1 − burn_tax_rate))`). New playbook `skills/AGENTS_WRAP_MAPPER_SPLIT_FEES.md` (W12–W15). ## Test plan - [x] `make verify-issue-516` (run twice; 15/15) - [x] `make verify-issue-512` (no W8–W11 regression) - [ ] Coolify frontend rebuild **before or with** wrap-mapper migrate + `set_fees` 200/51 ([ustr-cmm#13](https://gitlab.com/PlasticDigits2/ustr-cmm/-/work_items/13)) - [ ] After migrate: LCD `fee_wrap_bps=200` / `fee_unwrap_bps=51`; `/wrap` smoke wrap 10 000 → 9 800 CW20, unwrap → ≈9 800 native - [ ] Manual QA: `docs/qa-templates/wrap-unwrap-test-pass.md` (fee notes + exchange-deposit warning) ## Follow-up (not this MR) DEX router `ConfigResponse` still requires `fee_bps` for on-chain `unwrap_output` R3. Upgrade router wasm to read `fee_unwrap_bps` in the same migrate window or unwrap_output settlement will fail after `Config` drops `fee_bps`.
PlasticDigits commented 2026-08-15 10:31:24 +00:00 (Migrated from gitlab.com)

mentioned in issue #516

mentioned in issue #516
PlasticDigits commented 2026-08-15 11:16:15 +00:00 (Migrated from gitlab.com)

mentioned in commit 248b144a67

mentioned in commit 248b144a67bede2f503417df5b80f670d017dcdb
PlasticDigits (Migrated from gitlab.com) merged commit 248b144a67 into main 2026-08-15 11:16:15 +00:00
PlasticDigits commented 2026-08-15 11:51:28 +00:00 (Migrated from gitlab.com)

mentioned in issue #523

mentioned in issue #523
PlasticDigits commented 2026-08-15 11:54:29 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1056

mentioned in merge request !1056
PlasticDigits commented 2026-08-15 12:02:15 +00:00 (Migrated from gitlab.com)

mentioned in issue PlasticDigits2/ustr-cmm#13

mentioned in issue PlasticDigits2/ustr-cmm#13
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/cl8y-dex-terraclassic!1054
No description provided.