fix(swap): USTR→USDT quotes size-inconsistent through UST1/cLUNC #1272

Merged
PlasticDigits merged 2 commits from issue/1257 into main 2026-09-16 23:23:04 +00:00

Summary

  • Indexer hybrid pool sim uses wide k and skips implausible mixed 18/6 hops (ImplausibleHop → path unusable) so a funded shorter route can win.
  • Route cache keys already include token_in/token_out; 1 USTR (1e18) and 10000 USTR no longer share AMOUNT_CACHE_BUCKET.
  • Swap / Trade pin registry USTR / unique-symbol USDT (terra1z0xe7…) as 18-dec; unknown CW20 stays 6.
  • Expected slippage ≥ 99% hides You Receive and blocks submit. Expert Mode still waives > 30% only.

Fixes #1257

Test plan

  • make verify-issue-1257 (indexer hop sim + cache buckets; Swap 30%/99% Expert; docs greps)
  • Indexer lib: mixed 18/6 hop, implausible last hop, wide k, per-unit size curve, amount cache alias
  • Vitest: swapQuoteAmountScale, SwapPage 30% Expert waive + 99% theater, tokenRegistry/formatAmount USDT 18
  • Manual columbus-5 Swap USTR→USDT sizes 1 / 100 / 1000 / 10000: receive is size-monotonic, not billions
  • Confirm unique-symbol USDT ticker in the picker; no second USDT row
## Summary - Indexer hybrid pool sim uses wide `k` and skips implausible mixed 18/6 hops (`ImplausibleHop` → path unusable) so a funded shorter route can win. - Route cache keys already include `token_in`/`token_out`; 1 USTR (`1e18`) and 10000 USTR no longer share `AMOUNT_CACHE_BUCKET`. - Swap / Trade pin registry USTR / unique-symbol USDT (`terra1z0xe7…`) as 18-dec; unknown CW20 stays 6. - Expected slippage ≥ 99% hides You Receive and blocks submit. Expert Mode still waives > 30% only. Fixes #1257 ## Test plan - [x] `make verify-issue-1257` (indexer hop sim + cache buckets; Swap 30%/99% Expert; docs greps) - [x] Indexer lib: mixed 18/6 hop, implausible last hop, wide `k`, per-unit size curve, amount cache alias - [x] Vitest: `swapQuoteAmountScale`, SwapPage 30% Expert waive + 99% theater, tokenRegistry/formatAmount USDT 18 - [ ] Manual columbus-5 Swap USTR→USDT sizes 1 / 100 / 1000 / 10000: receive is size-monotonic, not billions - [ ] Confirm unique-symbol USDT ticker in the picker; no second USDT row
fix(swap): skip implausible mixed-dec hops and hide 99% theater quotes
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
43a85c6928
Wide hop k plus ImplausibleHop so USTR→USDT 3-hop theater loses ranking.
Swap/Trade pin 18-dec USDT display; Expert Mode does not waive ≥99%.
Author
Owner

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue
Author
Owner

/agent review

/agent review
Author
Owner

cl8y-agent-control: queued bug_review job 6b1e5f36-f2c1-4217-984e-751c5ad90420 (not executed; no Hetzner VM).

cl8y-agent-control: queued `bug_review` job `6b1e5f36-f2c1-4217-984e-751c5ad90420` (not executed; no Hetzner VM).
Author
Owner

/agent review

/agent review
fix(swap): keep registry USDT pin when merging USTR→USDT scale onto main
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
b6c2f68027
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!1272
No description provided.