feat: /protocol UST1 window mint/redeem treasury fees (#614) #1129

Merged
PlasticDigits merged 2 commits from issue/614-ust1-window-protocol-fees into main 2026-08-24 02:48:11 +00:00
PlasticDigits commented 2026-08-24 00:48:26 +00:00 (Migrated from gitlab.com)

Summary

  • Add indexer pin UST1_WINDOW_ADDRESS and FeeSource keys ust1_mint / ust1_redeem so /protocol can census UST1 window treasury fees beside wrap/unwrap and AMM.
  • Fail closed: ingest only when wasm emits a positive fee_amount plus token identity on the reserved window _contract_address. Never infer ust1_notional × fee_bps. Empty/invalid pin omits window sources (no fake $0).
  • dApp labels UST1 mint / UST1 redeem, hides idle $0, and omits rows when ust1_window_configured is missing or false. Coolify example documents the indexer pin (Vite alone is not enough).

Related to #614. Does not close the issue: columbus-5 window code 11566 currently emits fee_*_bps / vfdusd_to_treasury without fee_amount, so live txs stay dropped until upstream wasm lands.

Test plan

  • make verify-issue-614 (includes related verify-issue-586 with E2E/related skipped in CI-style runs)
  • cd indexer && cargo test --lib protocol_fees
  • cd indexer && cargo test --test indexer_protocol_fees -- --test-threads=1
  • bash scripts/with-node.sh --cwd frontend-dapp -- npm test -- --run src/pages/ProtocolPage.test.tsx
  • Coolify indexer env: set UST1_WINDOW_ADDRESS=terra1zxwpzpzpleatqn39r00grau4yt29sld8pw78s7ktvjafnj5nsaxq0h3rh2 after merge (columbus-5)
  • After ust1-window wasm emits fee_amount + token identity: confirm a captured deposit/withdraw increments protocol_fee_events and /protocol Source rows
## Summary - Add indexer pin `UST1_WINDOW_ADDRESS` and `FeeSource` keys `ust1_mint` / `ust1_redeem` so `/protocol` can census UST1 window treasury fees beside wrap/unwrap and AMM. - Fail closed: ingest only when wasm emits a positive `fee_amount` plus token identity on the reserved window `_contract_address`. Never infer `ust1_notional × fee_bps`. Empty/invalid pin omits window sources (no fake `$0`). - dApp labels **UST1 mint** / **UST1 redeem**, hides idle `$0`, and omits rows when `ust1_window_configured` is missing or false. Coolify example documents the **indexer** pin (Vite alone is not enough). Related to #614. Does **not** close the issue: columbus-5 window code 11566 currently emits `fee_*_bps` / `vfdusd_to_treasury` without `fee_amount`, so live txs stay dropped until upstream wasm lands. ## Test plan - [ ] `make verify-issue-614` (includes related `verify-issue-586` with E2E/related skipped in CI-style runs) - [ ] `cd indexer && cargo test --lib protocol_fees` - [ ] `cd indexer && cargo test --test indexer_protocol_fees -- --test-threads=1` - [ ] `bash scripts/with-node.sh --cwd frontend-dapp -- npm test -- --run src/pages/ProtocolPage.test.tsx` - [ ] Coolify indexer env: set `UST1_WINDOW_ADDRESS=terra1zxwpzpzpleatqn39r00grau4yt29sld8pw78s7ktvjafnj5nsaxq0h3rh2` after merge (columbus-5) - [ ] After ust1-window wasm emits `fee_amount` + token identity: confirm a captured deposit/withdraw increments `protocol_fee_events` and `/protocol` Source rows
PlasticDigits commented 2026-08-24 00:52:12 +00:00 (Migrated from gitlab.com)

mentioned in issue #614

mentioned in issue #614
PlasticDigits commented 2026-08-24 02:48:09 +00:00 (Migrated from gitlab.com)

added 11 commits

  • bb66296b...2d9b573b - 10 commits from branch main
  • e1490bbf - Merge origin/main into issue/614-ust1-window-protocol-fees

Compare with previous version

added 11 commits <ul><li>bb66296b...2d9b573b - 10 commits from branch <code>main</code></li><li>e1490bbf - Merge origin/main into issue/614-ust1-window-protocol-fees</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/411/diffs?diff_id=1978581333&start_sha=bb66296ba717f1d44dc36b9711bd343bbf6ac4ee)
PlasticDigits commented 2026-08-24 02:48:11 +00:00 (Migrated from gitlab.com)

mentioned in commit c37265dc48

mentioned in commit c37265dc48c4f97d2eff445d735eab2bc3f40c3c
PlasticDigits (Migrated from gitlab.com) merged commit c37265dc48 into main 2026-08-24 02:48:11 +00:00
PlasticDigits commented 2026-08-24 03:01:16 +00:00 (Migrated from gitlab.com)

mentioned in issue #616

mentioned in issue #616
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!1129
No description provided.