fix: Charts trader leaderboard Volume still formatNum(raw) as 10,000,000T #553
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#553
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
/chartsTrader leaderboard still prints mixed-unit raw volume as compact10,000,000T. The overview strip is USD-only after #548; this table was out of scope there and is still wrong on production.Same class of bug as #534 / #544 / #548:
formatNumon a rawSUM(offer_amount)integer (18-dec USTR legs →T).Observed (columbus-5 / dex.cl8y.com, 2026-08-17 post-#548 deploy): leaderboard Volume column shows
10,000,000Twhile overview 24h Volume (USD) is~$711.Current codebase
Charts leaderboard
frontend-dapp/src/pages/ChartsPage.tsxdefault tab istotal_volume. Non-PnL cells callformatNum(metricValue)wheregetLeaderboardMetricreturnstrader.total_volume.Trader profile (same field)
TraderSummaryStatsTotal Volume is alsoformatNum(trader.total_volume)(/trader/:addrand portfolio). Include in this issue so the two surfaces do not diverge.Indexer
traders.total_volumeaccumulates rawoffer_amount(upsert_trader). Rollingvolume_24h/7d/30dare alsoSUM(offer_amount)— no USD column.GET /api/v1/traders/leaderboardhas novolume_usd.JSON may keep raw
total_volumefor integrators (same as overviewtotal_volume_24h).Expected
$+ compact human) from P522-Qswap_events.volume_usd(sharevolume_usd_for_swap; do not invent a second formula). Unpriced →—, not$0/10,000,000T.total_volumetoformatNum.Out of scope
/poolVol badges (#544, closed)Vol (token)(#540, closed)Test plan
total_volumemust not renderT; USD path coveredTraderSummaryStatsTotal Volume samevolume_usdhttps://dex.cl8y.com/chartsVolume column vs overview 24h USD (lifetime vs 24h may differ; neither should be10,000,000T)marked as related to #548
marked as related to #552
marked as related to #540
marked as related to #544
mentioned in issue #552
mentioned in issue #556
mentioned in issue #557
mentioned in merge request !1081
mentioned in merge request !1082
mentioned in merge request !1083
mentioned in commit
4ddad9a6e3mentioned in commit
0993d1926cmentioned in commit
da70fed37dMerged in !1081 (conflicts with !1080 Makefile resolved; later combined with !1082 so profile Total Volume is USD, not an em dash).
Shipped vs #553 AC: leaderboard +
TraderSummaryStatsusetotal_volume_usd/formatIndexedVolumeUsd($compact, unpriced+trades →—, not$0/10,000,000T). JSON keeps rawtotal_volume. Charts Volume tab sortstotal_volume_usd DESC NULLS LAST; API default sort stays rawtotal_volume.Still open: production indexer migrate + ingest (
traders.total_volume_usd) then confirmhttps://dex.cl8y.com/chartsVolume vs overview 24h USD (lifetime vs 24h may differ). CI was quota-exceeded, not a test fail.Tracked in the post-merge follow-up after !1080–!1084.
mentioned in issue #560
marked as related to #560
Post-merge follow-up: #560
Post-merge review extra (non-blocking):
getLeaderboard()client default sort istotal_volume_usdwhile HTTP default remains rawtotal_volume. Charts passes an explicit sort, so production UI is fine. After #556 hub migrate, re-runbackfill_swap_volume_usdsotraders.total_volume_usdpicks up hub-priced UST1/USTR legs (#560).mentioned in issue #564
mentioned in issue #565
mentioned in merge request !1093
mentioned in issue #573
mentioned in issue #576
mentioned in issue #577
mentioned in issue #589
mentioned in issue #597
mentioned in issue #653
mentioned in issue #656
marked as related to #657
mentioned in issue #657
mentioned in issue #666
marked as related to #666
mentioned in merge request !1166
mentioned in merge request !1167