fix(#515): ticker-scoped indexer oracle for USTC and LUNC #1050

Merged
PlasticDigits merged 2 commits from fix/515-oracle-price-tickers into main 2026-08-11 01:07:06 +00:00
PlasticDigits commented 2026-08-11 00:50:42 +00:00 (Migrated from gitlab.com)

Summary

  • Fixes #515: bare GET /api/v1/oracle/price returned USTC/USD (~0.005) while integrators treated it as LUNC/USD (~0.00005) — exact ~100× overstatement.
  • Breaking v1 (approved): /api/v1/oracle/price and /history return a ticker catalog; snapshots live at /price/{ustc|lunc} and /history/{ticker}.
  • Poller fetches both tickers with distinct CEX/CoinGecko symbols into ticker-scoped oracle_prices; volume USD still uses USTC only.
  • Docs/invariants X1–X6, runbook, agent skill, and make verify-issue-515.

Test plan

  • make verify-issue-515 (docs + cargo test --lib oracle + api_oracle + frontend Protocol/Trade)
  • Retest: lib oracle + api_oracle after verify
  • Deploy indexer migration on staging/prod; confirm /api/v1/oracle/price returns catalog only
  • Compare /price/lunc vs live KuCoin/MEXC LUNCUSDT within same minute
  • Compare /price/ustc vs USTCUSDT (should stay ~0.005-scale, not LUNC-scale)
  • Protocol page still shows USTC/USD via default getOraclePrice()

Closes #515

## Summary - Fixes [#515](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/515): bare `GET /api/v1/oracle/price` returned **USTC/USD** (~0.005) while integrators treated it as **LUNC/USD** (~0.00005) — exact ~100× overstatement. - Breaking v1 (approved): `/api/v1/oracle/price` and `/history` return a ticker catalog; snapshots live at `/price/{ustc|lunc}` and `/history/{ticker}`. - Poller fetches both tickers with distinct CEX/CoinGecko symbols into ticker-scoped `oracle_prices`; volume USD still uses USTC only. - Docs/invariants **X1–X6**, runbook, agent skill, and `make verify-issue-515`. ## Test plan - [x] `make verify-issue-515` (docs + `cargo test --lib oracle` + `api_oracle` + frontend Protocol/Trade) - [x] Retest: lib oracle + `api_oracle` after verify - [ ] Deploy indexer migration on staging/prod; confirm `/api/v1/oracle/price` returns catalog only - [ ] Compare `/price/lunc` vs live KuCoin/MEXC LUNCUSDT within same minute - [ ] Compare `/price/ustc` vs USTCUSDT (should stay ~0.005-scale, not LUNC-scale) - [ ] Protocol page still shows USTC/USD via default `getOraclePrice()` Closes #515
PlasticDigits commented 2026-08-11 00:50:50 +00:00 (Migrated from gitlab.com)

mentioned in issue #515

mentioned in issue #515
PlasticDigits commented 2026-08-11 01:07:03 +00:00 (Migrated from gitlab.com)

added 3 commits

  • aa59731e...3d950c52 - 2 commits from branch main
  • af438388 - Merge origin/main into fix/515-oracle-price-tickers.

Compare with previous version

added 3 commits <ul><li>aa59731e...3d950c52 - 2 commits from branch <code>main</code></li><li>af438388 - Merge origin/main into fix/515-oracle-price-tickers.</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/332/diffs?diff_id=1953665632&start_sha=aa59731ea0848b6d00c3392a2dcf7da8ed22a694)
PlasticDigits (Migrated from gitlab.com) merged commit 92d5e3a105 into main 2026-08-11 01:07:07 +00:00
PlasticDigits commented 2026-08-11 01:07:08 +00:00 (Migrated from gitlab.com)

mentioned in commit 92d5e3a105

mentioned in commit 92d5e3a1053c029fe04c64304761d90435da0e66
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!1050
No description provided.