WIP: Draft: feat(window): emit fee_amount + fee_asset on deposit/withdraw (#33) #47

Closed
PlasticDigits wants to merge 0 commits from 33-feat-emit-fee-amount-ust1-token-on-deposit-withdraw-wasm-dex-614-ingest- into main
PlasticDigits commented 2026-08-24 02:44:26 +00:00 (Migrated from gitlab.com)

Summary

  • Emit additive wasm fee_amount (raw UST1 withheld) and fee_asset (UST1 CW20) on window deposit and withdraw so DEX ingest can census CMM window fees (#33; DEX #614).
  • Fee math is unchanged (INV-SWAP-001/002). New INV-FEE-EVENT-001 documents that indexers must not reconstruct the fee from ust1_out × bps or vFDUSD.
  • Docs + agent skill: docs/DEPLOYMENT.md event table, skills/window-fee-amount-events.

Test plan

  • cargo test -p ust1-common --lib inv_ (INV-SWAP-001/002 + fee_amount_ust1 vectors)
  • cargo test -p ust1-window --lib (inv_fee_event_001_*: deposit 1% of pre-fee UST1, withdraw 1% of gross UST1, fee_bps=0 → 0, fee_asset is UST1)
  • cargo test -p ust1-integration-tests --lib inv_fee_event_001
  • make test-contracts
  • Confirm existing attrs still present: action, ust1_out / vfdusd_out, fee_*_bps, vfdusd_to_treasury
  • After columbus-5 store + migrate of the same terra1zxwp… address: record new code id in DEPLOYMENT.md; notify DEX so UST1_WINDOW_ADDRESS pin stays; capture one deposit and one withdraw for protocol_fee_events ust1_mint / ust1_redeem

Does not close live ingest: that last #33 AC needs the migrate. Implementation, tests, and docs are in this MR.

Closes #33

## Summary - Emit additive wasm `fee_amount` (raw UST1 withheld) and `fee_asset` (UST1 CW20) on window **deposit** and **withdraw** so DEX ingest can census CMM window fees ([#33](https://gitlab.com/PlasticDigits/ust1-window/-/issues/33); DEX [#614](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/614)). - Fee math is unchanged (**INV-SWAP-001/002**). New **INV-FEE-EVENT-001** documents that indexers must not reconstruct the fee from `ust1_out × bps` or vFDUSD. - Docs + agent skill: [`docs/DEPLOYMENT.md`](docs/DEPLOYMENT.md) event table, [`skills/window-fee-amount-events`](skills/window-fee-amount-events/SKILL.md). ## Test plan - [ ] `cargo test -p ust1-common --lib inv_` (INV-SWAP-001/002 + `fee_amount_ust1` vectors) - [ ] `cargo test -p ust1-window --lib` (`inv_fee_event_001_*`: deposit 1% of pre-fee UST1, withdraw 1% of gross UST1, `fee_bps=0` → `0`, `fee_asset` is UST1) - [ ] `cargo test -p ust1-integration-tests --lib inv_fee_event_001` - [ ] `make test-contracts` - [ ] Confirm existing attrs still present: `action`, `ust1_out` / `vfdusd_out`, `fee_*_bps`, `vfdusd_to_treasury` - [ ] After columbus-5 **store + migrate of the same** `terra1zxwp…` address: record new code id in `DEPLOYMENT.md`; notify DEX so `UST1_WINDOW_ADDRESS` pin stays; capture one deposit and one withdraw for `protocol_fee_events` `ust1_mint` / `ust1_redeem` Does **not** close live ingest: that last #33 AC needs the migrate. Implementation, tests, and docs are in this MR. Closes #33
PlasticDigits commented 2026-08-24 02:45:06 +00:00 (Migrated from gitlab.com)

Closing: this MR targeted GitLab's empty issue branch (no commits). Replacing with an MR from feat/issue-33-window-fee-events.

Closing: this MR targeted GitLab's empty issue branch (no commits). Replacing with an MR from feat/issue-33-window-fee-events.
PlasticDigits (Migrated from gitlab.com) closed this pull request 2026-08-24 02:45:07 +00:00

Pull request closed

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/ust1-window!47
No description provided.