feat(wrap-mapper): asymmetric fee_wrap_bps / fee_unwrap_bps for ≈2% unwrap all-in (#9) #31

Merged
PlasticDigits merged 1 commit from 9-feat-wrap-mapper-split-fee-wrap-bps-fee-unwrap-bps-for-2-unwrap-all-in-no-gross-up- into master 2026-08-15 09:28:56 +00:00
PlasticDigits commented 2026-08-11 01:43:41 +00:00 (Migrated from gitlab.com)

Summary

  • Split wrap-mapper fee_bps into independent fee_wrap_bps / fee_unwrap_bps (wrap path / unwrap path), with gov SetFees / single-side setters and cw2 0.3.0 migrate from legacy {fee_bps} → both fields.
  • Product policy: no InstantWithdraw gross-up; target mainnet 200 / 51 so unwrap all-in ≈ 2% under 1.5% burn tax; solvency surplus Δ ≈ +fee_unwrap (unwrap fee need not cover tax).
  • Docs, ops runbook, audit M-4/MB-2 supersession notes, and agent skill skills/wrap-mapper-asymmetric-fees with retune rule + crosslinks. DEX companion: PlasticDigits/cl8y-dex-terraclassic#516.

Compat

  • Breaking ConfigResponse / execute: fee_bps / SetFeeBps removed (no dual-read window). Coordinate DEX #516 before declaring production done.

Test plan

  • cd contracts && cargo test --package wrap-mapper --lib (107 passed, run twice)
  • Instantiate distinct fees; wrap uses only wrap fee; unwrap uses only unwrap fee
  • Migrate legacy fee_bps=200 → both 200; migrate idempotent on new shape
  • SetFees auth/bounds; solvency surplus with unwrap fee below tax; pause + dust
  • Human ops (not in this MR): store/migrate mainnet, SetFees 200/51, tiny wrap/unwrap probes, treasury native ≥ supply
  • DEX #516 consumer update + Coolify redeploy (bundled rollout after this lands)

Closes #9

## Summary - Split wrap-mapper `fee_bps` into independent `fee_wrap_bps` / `fee_unwrap_bps` (wrap path / unwrap path), with gov `SetFees` / single-side setters and cw2 `0.3.0` migrate from legacy `{fee_bps}` → both fields. - Product policy: **no InstantWithdraw gross-up**; target mainnet `200` / `51` so unwrap all-in ≈ 2% under 1.5% burn tax; solvency surplus Δ ≈ `+fee_unwrap` (unwrap fee need not cover tax). - Docs, ops runbook, audit M-4/MB-2 supersession notes, and agent skill [`skills/wrap-mapper-asymmetric-fees`](../blob/9-feat-wrap-mapper-split-fee-wrap-bps-fee-unwrap-bps-for-2-unwrap-all-in-no-gross-up-/skills/wrap-mapper-asymmetric-fees/SKILL.md) with retune rule + crosslinks. DEX companion: PlasticDigits/cl8y-dex-terraclassic#516. ## Compat - **Breaking** `ConfigResponse` / execute: `fee_bps` / `SetFeeBps` removed (no dual-read window). Coordinate DEX #516 before declaring production done. ## Test plan - [x] `cd contracts && cargo test --package wrap-mapper --lib` (107 passed, run twice) - [x] Instantiate distinct fees; wrap uses only wrap fee; unwrap uses only unwrap fee - [x] Migrate legacy `fee_bps=200` → both 200; migrate idempotent on new shape - [x] SetFees auth/bounds; solvency surplus with unwrap fee below tax; pause + dust - [ ] Human ops (not in this MR): store/migrate mainnet, `SetFees` 200/51, tiny wrap/unwrap probes, treasury native ≥ supply - [ ] DEX #516 consumer update + Coolify redeploy (bundled rollout after this lands) Closes #9
PlasticDigits commented 2026-08-11 01:45:01 +00:00 (Migrated from gitlab.com)

added 1 commit

  • b3fc79cb - feat(wrap-mapper): split fee_wrap_bps / fee_unwrap_bps for ≈2% unwrap all-in (#9)

Compare with previous version

added 1 commit <ul><li>b3fc79cb - feat(wrap-mapper): split fee_wrap_bps / fee_unwrap_bps for ≈2% unwrap all-in (#9)</li></ul> [Compare with previous version](/PlasticDigits2/ustr-cmm/-/merge_requests/9/diffs?diff_id=1953695455&start_sha=81b638f5df978237e4c64bfecab4f653ef0a1cd6)
PlasticDigits commented 2026-08-11 01:45:05 +00:00 (Migrated from gitlab.com)

marked this merge request as ready

marked this merge request as **ready**
PlasticDigits commented 2026-08-11 01:45:15 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-11 01:45:17 +00:00 (Migrated from gitlab.com)

mentioned in issue #9

mentioned in issue #9
PlasticDigits commented 2026-08-15 09:28:56 +00:00 (Migrated from gitlab.com)

mentioned in commit 1939449360

mentioned in commit 1939449360565cc2fa8b860869d38cc883f1015f
PlasticDigits (Migrated from gitlab.com) merged commit 1939449360 into master 2026-08-15 09:28:56 +00:00
PlasticDigits commented 2026-08-15 09:57:08 +00:00 (Migrated from gitlab.com)

mentioned in issue #13

mentioned in issue #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/ustr-cmm!31
No description provided.