fix(#512): quote unwrap after burn tax; wrap mint fee-only #1049

Merged
PlasticDigits merged 1 commit from fix/issue-512-unwrap-burn-tax into main 2026-08-11 01:06:11 +00:00
PlasticDigits commented 2026-08-11 00:49:19 +00:00 (Migrated from gitlab.com)

Summary

  • Fix unwrap You Receive to net Classic InstantWithdraw burn tax after wrap-mapper fee_bps (10 000 @ 200 bps + 1.5% → 9 653, matching mainnet evidence).
  • Fix wrap display over-deduction: wrap_deposit is untaxed MsgExecuteContract — quote mapper fee only (10 000 → 9 800, not ~9 751).
  • Disclose unwrap burn tax on the fee line; warn against exchange deposit recipients.
  • Keep router minimum_receive on post-fee pre-tax (routerMinReceiveBase / R3).
  • Document invariants W8–W11; add skills/AGENTS_WRAP_UNWRAP_BURN_TAX.md + make verify-issue-512.

Closes #512 (UI/disclosure + accurate quotes). On-chain InstantWithdraw gross-up remains a ustr-cmm follow-up.

Test plan

  • make verify-issue-512 (unit + docs) — passed twice
  • Manual mainnet: wrap 10 000 LUNC → quote 9 800 cLUNC
  • Manual mainnet: unwrap 10 000 cLUNC → quote ~9 653 LUNC; fee note mentions burn tax
  • Unwrap UI shows exchange-deposit warning on Swap + /wrap
  • Native-output swap still submits minimum_receive from post-fee base (no false R3 reverts)
## Summary - Fix unwrap **You Receive** to net Classic InstantWithdraw burn tax after wrap-mapper `fee_bps` (10 000 @ 200 bps + 1.5% → **9 653**, matching mainnet evidence). - Fix wrap display over-deduction: `wrap_deposit` is untaxed `MsgExecuteContract` — quote mapper fee only (10 000 → **9 800**, not ~9 751). - Disclose unwrap burn tax on the fee line; warn against exchange deposit recipients. - Keep router `minimum_receive` on post-fee pre-tax (`routerMinReceiveBase` / **R3**). - Document invariants **W8–W11**; add `skills/AGENTS_WRAP_UNWRAP_BURN_TAX.md` + `make verify-issue-512`. Closes #512 (UI/disclosure + accurate quotes). On-chain InstantWithdraw **gross-up** remains a ustr-cmm follow-up. ## Test plan - [x] `make verify-issue-512` (unit + docs) — passed twice - [ ] Manual mainnet: wrap 10 000 LUNC → quote **9 800** cLUNC - [ ] Manual mainnet: unwrap 10 000 cLUNC → quote **~9 653** LUNC; fee note mentions burn tax - [ ] Unwrap UI shows exchange-deposit warning on Swap + `/wrap` - [ ] Native-output swap still submits `minimum_receive` from post-fee base (no false R3 reverts)
PlasticDigits commented 2026-08-11 00:49:33 +00:00 (Migrated from gitlab.com)

mentioned in issue #512

mentioned in issue #512
PlasticDigits commented 2026-08-11 01:06:11 +00:00 (Migrated from gitlab.com)

mentioned in commit 3d950c52d5

mentioned in commit 3d950c52d597d259d92399e52f8293251cb91a2e
PlasticDigits (Migrated from gitlab.com) merged commit 3d950c52d5 into main 2026-08-11 01:06:11 +00:00
PlasticDigits commented 2026-08-11 01:07:02 +00:00 (Migrated from gitlab.com)

mentioned in commit af43838850

mentioned in commit af4383885042493bea88eaabcedb0c5cf463f452
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!1049
No description provided.