fix: Charts overview 24h volume USD-only (#548) #1076

Merged
PlasticDigits merged 1 commit from feat/548-charts-overview-usd into main 2026-08-17 13:32:21 +00:00
PlasticDigits commented 2026-08-17 11:57:58 +00:00 (Migrated from gitlab.com)

Summary

  • Charts /charts overview strip is USD-only (no raw volume_24h box). Unpriced 24h activity shows —; idle shows $0.
  • Indexer prices swaps.volume_usd with the shared P522-Q helper (catalog USTC/LUNC/UST1; quote preferred; never sum both legs). Idempotent backfill migration for historical rows.
  • token_count is the union of pair-leg assets. GET /overview total_volume_24h_usd is a decimal string, "0", or JSON null when trades exist but none are priced. Raw total_volume_24h stays for integrators.

Closes #548.

#544 should reuse volume_usd_for_swap rather than a second formula. After indexer deploy, run the backfill migration so historical UST1/USTR volume_usd is filled; rollup lag is ~5 min plus the 60s overview cache.

Test plan

  • make verify-issue-548 (docs, code grep, frontend Vitest, indexer lib, integration)
  • After deploy: confirm /charts volume matches GET /overview total_volume_24h_usd
  • Confirm USTC box still uses ustc_price_usd, not compact T notation
  • Confirm pair-search USD badges remain #544 (out of scope)
## Summary - Charts `/charts` overview strip is USD-only (no raw `volume_24h` box). Unpriced 24h activity shows `—`; idle shows `$0`. - Indexer prices `swaps.volume_usd` with the shared P522-Q helper (catalog USTC/LUNC/UST1; quote preferred; never sum both legs). Idempotent backfill migration for historical rows. - `token_count` is the union of pair-leg assets. `GET /overview` `total_volume_24h_usd` is a decimal string, `"0"`, or JSON `null` when trades exist but none are priced. Raw `total_volume_24h` stays for integrators. Closes #548. #544 should reuse `volume_usd_for_swap` rather than a second formula. After indexer deploy, run the backfill migration so historical UST1/USTR `volume_usd` is filled; rollup lag is ~5 min plus the 60s overview cache. ## Test plan - [x] `make verify-issue-548` (docs, code grep, frontend Vitest, indexer lib, integration) - [ ] After deploy: confirm `/charts` volume matches `GET /overview` `total_volume_24h_usd` - [ ] Confirm USTC box still uses `ustc_price_usd`, not compact `T` notation - [ ] Confirm pair-search USD badges remain #544 (out of scope)
PlasticDigits (Migrated from gitlab.com) merged commit 11b1117eda into main 2026-08-17 13:32:21 +00:00
PlasticDigits commented 2026-08-17 13:32:22 +00:00 (Migrated from gitlab.com)

mentioned in commit 11b1117eda

mentioned in commit 11b1117eda685a7eddcf2a9b81e5e381a31bf1c3
PlasticDigits commented 2026-08-17 13:48:58 +00:00 (Migrated from gitlab.com)

mentioned in issue #548

mentioned in issue #548
PlasticDigits commented 2026-08-17 13:49:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #547

mentioned in issue #547
PlasticDigits commented 2026-08-17 13:49:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #550

mentioned in issue #550
PlasticDigits commented 2026-08-17 13:49:47 +00:00 (Migrated from gitlab.com)

mentioned in issue #552

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