feat(window): emit fee_amount + fee_asset on deposit/withdraw (#33) #48

Merged
PlasticDigits merged 1 commit from feat/issue-33-window-fee-events into main 2026-08-24 02:56:24 +00:00
PlasticDigits commented 2026-08-24 02:45:09 +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.

Related to #33. Does not close the issue: columbus-5 store+migrate + live DEX ingest remain ops (last acceptance criterion).

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 + clippy on changed crates
  • Confirm existing attrs still present on a local or staging execute: 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
## 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). Related to #33. Does **not** close the issue: columbus-5 store+migrate + live DEX ingest remain ops (last acceptance criterion). ## Test plan - [x] `cargo test -p ust1-common --lib inv_` (INV-SWAP-001/002 + `fee_amount_ust1` vectors) - [x] `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) - [x] `cargo test -p ust1-integration-tests --lib inv_fee_event_001` - [x] `make test-contracts` + clippy on changed crates - [ ] Confirm existing attrs still present on a local or staging execute: `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`
PlasticDigits commented 2026-08-24 02:45:21 +00:00 (Migrated from gitlab.com)

mentioned in issue #33

mentioned in issue #33
PlasticDigits commented 2026-08-24 02:56:25 +00:00 (Migrated from gitlab.com)

mentioned in commit e48311ff3d

mentioned in commit e48311ff3d3260c00d65f0cd1991c9a04a051d39
PlasticDigits (Migrated from gitlab.com) merged commit e48311ff3d into main 2026-08-24 02:56:25 +00:00
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!48
No description provided.