bug(trade): missing USD fallback double-scales USTR headline by 10^12 #1512

Open
opened 2026-10-15 08:22:18 +00:00 by PlasticDigits · 1 comment
Owner

Problem and why a new implementation is needed

Trade's USTR/UST1 Price (USD) LAST headline can display approximately 0.00000000000001214 while the USD candles are around 0.005–0.006. The current mixed-decimal fallback double-scales an already humanized trade price when price_usd is absent. It also synthesizes USTR USD from a legacy 2.5×USTC assumption, masking the actual absence of a qualified USD mark.

Fix the shared price contract and all affected Trade/Charts callers together. This is a deterministic presentation/data-integrity defect, separate from the USTR hub's fixed-reference divergence and missing protocol LP valuation tracked in #1511. It becomes visible when an otherwise normal current trade lacks price_usd, including during guarded hub rejection. Do not "fix" it by displaying any plausible number or borrowing a stale candle as current USD.

This report contains anonymized technical findings and synthetic scalar reproductions only. No supplied conversation/screenshot, reporter identity, real-user wallet or transaction is published.

Investigation baseline and independent reproduction

Source: c3e216842fe3bac00e2c71bb967950e004b3a6cf, matching the live backend /health revision on 2026-10-15. Frontend deployment artifacts have not been separately attested.

Public pair metadata confirms the canonical UST1/USTR pair terra16vxrhpvpcucu05y0nr862vf9hnqeh274uaff4s7hz4n0ea74006qf5hgqy has UST1 asset_0/6 decimals and USTR asset_1/18 decimals. A bounded public trades read returned a latest price:"160.756280899197382191" without price_usd; its raw amounts corroborate that price is already human token1/token0. Prior rows contain price_usd; USD candles expose separate human-ratio fields. Only these non-identifying scalars are retained here.

The actual source helper was loaded through Vite SSR and called twice, with the same results:

resolveDisplayTapeLastPriceUsd({
  inverted: true,
  priceUsd: null,
  price: '160.756280899197382191', // already human USTR per UST1
  decimalsBase: 6,
  decimalsQuote: 18,
  quoteSymbol: 'USTR',
  displayBaseSymbol: 'USTR',
  ustcUsd: '0.0048565', // synthetic scalar matching the reported scale
})
// actual first/retest: '1.21412500000e-14'

Derivation in current code: 160.756… × 10^(6−18) × (2.5 × 0.0048565), followed by division by 160.756… for display inversion. The decimal conversion introduces a factor of 10^-12; the result exactly explains the reported tiny headline. 2.5 × USTC is a legacy comparison, not an accepted USTR price or an expected safe replacement. With an explicitly supplied synthetic factory priceUsd:'0.849756570385773539', the same helper returns 0.005285992968, demonstrating the different indexed-USD and missing-USD branches. This arithmetic comparison does not certify live fair value.

Current codebase and relevant files

  • pairPriceUsd.ts: TapeUsdInput.price and resolveTapeLastPriceUsd assume missing-USD input is a pre-#522 raw ratio, multiply by 10^(d0-d1), and use quoteTokenUsd. That helper returns UST1=$1 and USTR=2.5×USTC from symbol classification. resolveDisplayTapeLastPriceUsd then treats opts.price as human when calling invertUsd, so the same field has incompatible units across branches.
  • TradePage.tsx: both factory and display tape-headline calculations pass the live trade price, optional price_usd and pair decimals into this helper. Trace ChartsPage.tsx and every shared-helper caller as well; establish rather than assume each affected surface.
  • frontend-dapp/src/utils/limitOrderPriceReference.ts::tradeToToken1PerToken0Human already reconstructs human factory ratio from raw amounts/decimals; pairPriceUsd.ts::resolveTapePriceUsd uses that path for tape rows. Unify explicit units without changing factory execution semantics.
  • frontend-dapp/src/utils/tradePairDisplayOrientation.ts::invertUsd expects factory USD divided by a human token1/token0 ratio. components/charts/priceChartCandles.ts uses per-bar USD/human fields independently.
  • indexer/src/indexer/pair_price_usd.rs, indexer/src/indexer/parser.rs, indexer/src/api/pairs.rs::trade_response_from_swap_row, and indexer/src/db/queries/swap_events.rs establish the modern human price and optional factory-asset_0 price_usd contract; do not revert the server/storage to the legacy raw representation.
  • frontend-dapp/src/utils/__tests__/pairPriceUsd.test.ts covers the old raw fallback and human inversion separately but misses modern human price + absent USD + mixed decimals + inversion. TradePage.test.tsx, ChartsPage.test.tsx and chart/tape tests need end-to-end coverage of that combination.

Related history: #522, #524, #543, #556. These older fixes do not cover the reproduced missing-USD branch.

  1. Make raw ratio, human factory ratio, factory-base USD and displayed-base USD explicit at interfaces. Modern human trade prices must not receive a second decimal conversion. Prefer reconstructing human ratios from validated raw amounts/decimals when needed; if legacy raw support is retained, require an explicit positively identified legacy contract/version rather than inferring it from absent price_usd.
  2. Prefer valid indexed factory USD and perform display inversion exactly once using the matching human ratio. A missing modern price_usd is not evidence of an old indexer. Return honest unavailable USD when no eligible source exists. Remove/quarantine the UST1 peg and USTR multiplier from current-data fallback paths; do not introduce new request-triggered oracle/chain reads.
  3. If current qualified hub USD is intentionally used for a display-only fallback, bind exact contract/denom, chain, original time and quality. Treat historical trade USD and current marks as different provenance; never relabel either. Check every call site passes complete identity/context rather than relying on a ticker.
  4. Keep headline, tape, stats and candles consistent in units and displayed direction. They may represent different observation times; do not force false numeric equality or replace historical candles with a live mark. Test the absence branch in the actual page, not only standalone helpers.

Constraints and guardrails

  • Preserve factory storage/API units and asset_0 USD semantics, exact contract identity, raw funding/settlement/limit prices, factory-side conversion on submission and independent Trade/Charts orientation persistence. Display inversion cannot reverse real execution or alter V2 LP valuation.
  • No unconditional 1/x USD reciprocal, 6-decimal default for unknown metadata, symbol-spoof USD handle, UST1 peg, USTR multiplier, last-candle current-price substitution or stale zero/last-good fallback. Unknown input units remain unavailable.
  • Keep O1391 oracle quality/original age, positive finite checks, arithmetic bounds, T524/C543 orientation behavior, signing isolation and LQ1452 zero request RPC. Display repair grants no signing eligibility.
  • Show an ordinary unavailable value where appropriate and keep layout stable; do not expose technical provenance, hostile provider text or sensitive diagnostics in retail copy.

Acceptance criteria

  • The reproduced 6/18 human-price/missing-USD case never returns a value scaled down by 10^12; without a qualified USD source it returns unavailable, not a synthetic peg-derived number.
  • Every modern helper/caller has one documented unit contract, handles optional USD explicitly and performs each humanization/inversion once. Any supported legacy branch is explicit and independently tested.
  • Trade and Charts, both orientations, headline/tape/stats and chart OHLC preserve correct token/unit labels and historical-versus-current provenance. Pair switching and late responses cannot leak a prior market's price.
  • Missing, rejected, stale, future, malformed and spoofed price sources stay unavailable; genuine indexed USD remains correct. Limits/market signing and LP values are unaffected by display orientation.

Test plan: all functional and failure paths

  • Table-driven helpers: 6/6, 6/18, 18/6 and 18/18; both factory/display directions; both trade offer/ask directions; USD present, null, omitted, zero, invalid; human trade price present/missing and reconstructable/unreconstructable amounts; explicit legacy raw input only if still supported.
  • Assert independently derived scalar values and dimensional formulas. Include the fixture above, an ordinary USTR-scale USD value with valid indexed USD, extreme/dust values, rounding boundaries and double-inversion round trips. Test that null USD cannot select legacy semantics implicitly.
  • API contract tests: raw amounts imply returned human price; price_usd is USD of human asset_0 or absent; missing hub price does not change price units. Preserve decimal/human candle fields and original timestamps.
  • Actual Trade/Charts component/browser tests at desktop and phone widths: latest missing-USD trade after a previous valid trade, rejection/recovery while mounted, pair and orientation switching, empty tape, unavailable oracle, expiry, delayed/out-of-order query responses and page reload/persisted orientation. Current headline must never show the tiny synthetic price while historical candles remain valid.
  • Regress factory-side conversions for market/limit place/update, crossing checks, orderbook/tape amounts and LP USD labels in both orientations. Assert no new quote-triggered RPC and no display-derived signing permission.

Test plan: attack, hack and abuse vectors

  • Spoof USTR/UST1/USDT symbols on different CW20s/natives, malformed or contradictory contract/denom metadata, chain mismatch and missing/out-of-range decimals. No numeric USD should be created by symbol trust.
  • Supply zero/negative/NaN/Infinity, trailing junk, huge exponents/amounts, numeric overflow/underflow and reciprocal-denominator zero. Reject before charting; never freeze/crash the UI or pass nonfinite values to the chart library.
  • Replay stale/future observations, swap indexed USD from one pair with a ratio from another, race orientation/pair changes and try poisoning cached results. Bind value/direction/provenance and reject mixed generations where applicable.
  • Manipulate current pool/last trade to bypass a divergent hub through a client fallback, or feed display output into limit/market transaction construction. A number in the chart cannot override reference or signing guards.
  • Inject HTML/JS/URLs via price/symbol/error fields; render only safe text/allowlisted states and keep credentials/actors out of evidence.

Verification criteria and investigation checks

The actual helper reproduction returned the same failing 1.21412500000e-14 on first/retest. The initial SSR probe completed these calls but emitted a dependency-scan shutdown error; a subsequent probe disabled dependency discovery and repeated the calls cleanly. Preserve the reproduced product failure independently of test-runner setup.

make verify-issue-524 passed all 10 groups, including 181 tests in its main seven-file suite. This demonstrates the existing coverage gap; a green legacy suite is not evidence that this bug is fixed. After implementation add the missing regression, show it failing on the original source and passing on the final source, rerun make verify-issue-524 and relevant 522/543/556/680 chart regressions, run frontend types/lint and any changed backend contract tests. Record exact revision/UTC/commands/counts, first/retest and separately attested deployed frontend/backend artifacts. Desktop/phone screenshots may be newly generated from anonymous test fixtures; do not publish supplied private evidence. Unavailable deployment/device/funded checks remain explicitly unverified and do not block creating or implementing this issue.

## Problem and why a new implementation is needed Trade's USTR/UST1 Price (USD) LAST headline can display approximately `0.00000000000001214` while the USD candles are around `0.005–0.006`. The current mixed-decimal fallback double-scales an already humanized trade price when `price_usd` is absent. It also synthesizes USTR USD from a legacy 2.5×USTC assumption, masking the actual absence of a qualified USD mark. Fix the shared price contract and all affected Trade/Charts callers together. This is a deterministic presentation/data-integrity defect, separate from the USTR hub's fixed-reference divergence and missing protocol LP valuation tracked in [#1511](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1511). It becomes visible when an otherwise normal current trade lacks `price_usd`, including during guarded hub rejection. Do not "fix" it by displaying any plausible number or borrowing a stale candle as current USD. This report contains anonymized technical findings and synthetic scalar reproductions only. No supplied conversation/screenshot, reporter identity, real-user wallet or transaction is published. ## Investigation baseline and independent reproduction Source: `c3e216842fe3bac00e2c71bb967950e004b3a6cf`, matching the live backend `/health` revision on 2026-10-15. Frontend deployment artifacts have not been separately attested. Public pair metadata confirms the canonical UST1/USTR pair `terra16vxrhpvpcucu05y0nr862vf9hnqeh274uaff4s7hz4n0ea74006qf5hgqy` has UST1 asset_0/6 decimals and USTR asset_1/18 decimals. A bounded public trades read returned a latest `price:"160.756280899197382191"` without `price_usd`; its raw amounts corroborate that `price` is already human token1/token0. Prior rows contain `price_usd`; USD candles expose separate human-ratio fields. Only these non-identifying scalars are retained here. The actual source helper was loaded through Vite SSR and called twice, with the same results: ```ts resolveDisplayTapeLastPriceUsd({ inverted: true, priceUsd: null, price: '160.756280899197382191', // already human USTR per UST1 decimalsBase: 6, decimalsQuote: 18, quoteSymbol: 'USTR', displayBaseSymbol: 'USTR', ustcUsd: '0.0048565', // synthetic scalar matching the reported scale }) // actual first/retest: '1.21412500000e-14' ``` Derivation in current code: `160.756… × 10^(6−18) × (2.5 × 0.0048565)`, followed by division by `160.756…` for display inversion. The decimal conversion introduces a factor of `10^-12`; the result exactly explains the reported tiny headline. `2.5 × USTC` is a legacy comparison, not an accepted USTR price or an expected safe replacement. With an explicitly supplied synthetic factory `priceUsd:'0.849756570385773539'`, the same helper returns `0.005285992968`, demonstrating the different indexed-USD and missing-USD branches. This arithmetic comparison does not certify live fair value. ## Current codebase and relevant files - [pairPriceUsd.ts](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/c3e216842fe3bac00e2c71bb967950e004b3a6cf/frontend-dapp/src/utils/pairPriceUsd.ts): `TapeUsdInput.price` and `resolveTapeLastPriceUsd` assume missing-USD input is a pre-#522 raw ratio, multiply by `10^(d0-d1)`, and use `quoteTokenUsd`. That helper returns UST1=$1 and USTR=2.5×USTC from symbol classification. `resolveDisplayTapeLastPriceUsd` then treats `opts.price` as human when calling `invertUsd`, so the same field has incompatible units across branches. - [TradePage.tsx](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/c3e216842fe3bac00e2c71bb967950e004b3a6cf/frontend-dapp/src/pages/TradePage.tsx): both factory and display tape-headline calculations pass the live trade `price`, optional `price_usd` and pair decimals into this helper. Trace `ChartsPage.tsx` and every shared-helper caller as well; establish rather than assume each affected surface. - `frontend-dapp/src/utils/limitOrderPriceReference.ts::tradeToToken1PerToken0Human` already reconstructs human factory ratio from raw amounts/decimals; `pairPriceUsd.ts::resolveTapePriceUsd` uses that path for tape rows. Unify explicit units without changing factory execution semantics. - `frontend-dapp/src/utils/tradePairDisplayOrientation.ts::invertUsd` expects factory USD divided by a **human** token1/token0 ratio. `components/charts/priceChartCandles.ts` uses per-bar USD/human fields independently. - `indexer/src/indexer/pair_price_usd.rs`, `indexer/src/indexer/parser.rs`, `indexer/src/api/pairs.rs::trade_response_from_swap_row`, and `indexer/src/db/queries/swap_events.rs` establish the modern human `price` and optional factory-asset_0 `price_usd` contract; do not revert the server/storage to the legacy raw representation. - `frontend-dapp/src/utils/__tests__/pairPriceUsd.test.ts` covers the old raw fallback and human inversion separately but misses modern **human price + absent USD + mixed decimals + inversion**. `TradePage.test.tsx`, `ChartsPage.test.tsx` and chart/tape tests need end-to-end coverage of that combination. Related history: [#522](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/522), [#524](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/524), [#543](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/543), [#556](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/556). These older fixes do not cover the reproduced missing-USD branch. ## Recommended direction 1. Make raw ratio, human factory ratio, factory-base USD and displayed-base USD explicit at interfaces. Modern human trade prices must not receive a second decimal conversion. Prefer reconstructing human ratios from validated raw amounts/decimals when needed; if legacy raw support is retained, require an explicit positively identified legacy contract/version rather than inferring it from absent `price_usd`. 2. Prefer valid indexed factory USD and perform display inversion exactly once using the matching human ratio. A missing modern `price_usd` is not evidence of an old indexer. Return honest unavailable USD when no eligible source exists. Remove/quarantine the UST1 peg and USTR multiplier from current-data fallback paths; do not introduce new request-triggered oracle/chain reads. 3. If current qualified hub USD is intentionally used for a display-only fallback, bind exact contract/denom, chain, original time and quality. Treat historical trade USD and current marks as different provenance; never relabel either. Check every call site passes complete identity/context rather than relying on a ticker. 4. Keep headline, tape, stats and candles consistent in units and displayed direction. They may represent different observation times; do not force false numeric equality or replace historical candles with a live mark. Test the absence branch in the actual page, not only standalone helpers. ## Constraints and guardrails - Preserve factory storage/API units and asset_0 USD semantics, exact contract identity, raw funding/settlement/limit prices, factory-side conversion on submission and independent Trade/Charts orientation persistence. Display inversion cannot reverse real execution or alter V2 LP valuation. - No unconditional 1/x USD reciprocal, 6-decimal default for unknown metadata, symbol-spoof USD handle, UST1 peg, USTR multiplier, last-candle current-price substitution or stale zero/last-good fallback. Unknown input units remain unavailable. - Keep O1391 oracle quality/original age, positive finite checks, arithmetic bounds, T524/C543 orientation behavior, signing isolation and LQ1452 zero request RPC. Display repair grants no signing eligibility. - Show an ordinary unavailable value where appropriate and keep layout stable; do not expose technical provenance, hostile provider text or sensitive diagnostics in retail copy. ## Acceptance criteria - [ ] The reproduced 6/18 human-price/missing-USD case never returns a value scaled down by `10^12`; without a qualified USD source it returns unavailable, not a synthetic peg-derived number. - [ ] Every modern helper/caller has one documented unit contract, handles optional USD explicitly and performs each humanization/inversion once. Any supported legacy branch is explicit and independently tested. - [ ] Trade and Charts, both orientations, headline/tape/stats and chart OHLC preserve correct token/unit labels and historical-versus-current provenance. Pair switching and late responses cannot leak a prior market's price. - [ ] Missing, rejected, stale, future, malformed and spoofed price sources stay unavailable; genuine indexed USD remains correct. Limits/market signing and LP values are unaffected by display orientation. ## Test plan: all functional and failure paths - Table-driven helpers: 6/6, 6/18, 18/6 and 18/18; both factory/display directions; both trade offer/ask directions; USD present, null, omitted, zero, invalid; human trade price present/missing and reconstructable/unreconstructable amounts; explicit legacy raw input only if still supported. - Assert independently derived scalar values and dimensional formulas. Include the fixture above, an ordinary USTR-scale USD value with valid indexed USD, extreme/dust values, rounding boundaries and double-inversion round trips. Test that null USD cannot select legacy semantics implicitly. - API contract tests: raw amounts imply returned human price; `price_usd` is USD of human asset_0 or absent; missing hub price does not change price units. Preserve decimal/human candle fields and original timestamps. - Actual Trade/Charts component/browser tests at desktop and phone widths: latest missing-USD trade after a previous valid trade, rejection/recovery while mounted, pair and orientation switching, empty tape, unavailable oracle, expiry, delayed/out-of-order query responses and page reload/persisted orientation. Current headline must never show the tiny synthetic price while historical candles remain valid. - Regress factory-side conversions for market/limit place/update, crossing checks, orderbook/tape amounts and LP USD labels in both orientations. Assert no new quote-triggered RPC and no display-derived signing permission. ## Test plan: attack, hack and abuse vectors - Spoof USTR/UST1/USDT symbols on different CW20s/natives, malformed or contradictory contract/denom metadata, chain mismatch and missing/out-of-range decimals. No numeric USD should be created by symbol trust. - Supply zero/negative/NaN/Infinity, trailing junk, huge exponents/amounts, numeric overflow/underflow and reciprocal-denominator zero. Reject before charting; never freeze/crash the UI or pass nonfinite values to the chart library. - Replay stale/future observations, swap indexed USD from one pair with a ratio from another, race orientation/pair changes and try poisoning cached results. Bind value/direction/provenance and reject mixed generations where applicable. - Manipulate current pool/last trade to bypass a divergent hub through a client fallback, or feed display output into limit/market transaction construction. A number in the chart cannot override reference or signing guards. - Inject HTML/JS/URLs via price/symbol/error fields; render only safe text/allowlisted states and keep credentials/actors out of evidence. ## Verification criteria and investigation checks The actual helper reproduction returned the same failing `1.21412500000e-14` on first/retest. The initial SSR probe completed these calls but emitted a dependency-scan shutdown error; a subsequent probe disabled dependency discovery and repeated the calls cleanly. Preserve the reproduced product failure independently of test-runner setup. `make verify-issue-524` passed all 10 groups, including 181 tests in its main seven-file suite. This demonstrates the existing coverage gap; a green legacy suite is not evidence that this bug is fixed. After implementation add the missing regression, show it failing on the original source and passing on the final source, rerun `make verify-issue-524` and relevant 522/543/556/680 chart regressions, run frontend types/lint and any changed backend contract tests. Record exact revision/UTC/commands/counts, first/retest and separately attested deployed frontend/backend artifacts. Desktop/phone screenshots may be newly generated from anonymous test fixtures; do not publish supplied private evidence. Unavailable deployment/device/funded checks remain explicitly unverified and do not block creating or implementing this issue.
Author
Owner

The missing-USD display fix and focused acceptance are merged through PR #1537 and PR #1542, final main 5b623a04f35bb6b44d3e64df0014e458cad653fc; genuine CI526 passed. Leaving open: the full requested API/abuse/execution matrix remains incomplete.

  • Preserved the exact original 6/18 helper reproduction (1.21412500000e-14); it fails before and returns unavailable after. Modern ratios remain human asset_1/asset_0; matching indexed historical asset_0 USD is inverted exactly once. Missing USD cannot select legacy raw, UST1 peg, USTR multiplier, ticker/oracle, stale-last-good or candle-close fallback.
  • Focused 61 helper/chart plus 3 actual page cases pass across all four decimal combinations, both trade/display directions, optional USD, bounded raw reconstruction, malformed/nonfinite/nonpositive values, overflow/underflow, pair/timestamp/metadata guards and inversion round trips. #524 all 10 groups, #680 all 6 groups, the relevant 62 tape/chart/conversion subset, types and focused lint pass. These suites overlap; counts are not unique acceptance totals.
  • Served Trade/Charts desktop/phone cases pass valid→missing dash→invert→indexed recovery→foreign-pair rejection with historical candles retained (7.826s, 13.202s, 5.544s, 5.239s). They use owned anonymous HTTP fixtures and virtual refetch time, not actual missing-price market conditions.
  • Separate unmodified-HTTP, ordinary-clock Trade/Charts acceptance passed in 13.435s: indexed factory USD 0.9210291980528618, human ratio 142.63466865686598, inverted Trade USD 0.006457260403279426, 200 historical candles retained. Actual USD was present; fixtures cover absence.
  • Four additional pair/orientation race and real reload cases pass (15.599s, 23.093s, 9.157s, 8.766s). Exact held browser responses received HTTP200, completed bodies and no request failures. Old-pair completions cannot replace the selected pair; updated same-pair data uses the current orientation once. Reload without a Charts price override preserves the correct isolated session orientation; returning to A restores A's own direction.
  • Complete broader cache-poisoning/interleaving, empty-tape/current-source rejection/expiry, mixed identity/chain, extreme rounding/dust and injection abuse acceptance; existing focused guards cover portions only.
  • Complete the comprehensive backend amount→human-price/asset_0-USD/candle timestamp contract matrix and funded market/limit place/update/crossing plus LP valuation acceptance in both orientations. Unchanged backend/execution code and conversion regressions do not prove every requested path.

These browser cases observed frontend 2df4a471a9ca98a8672d911b67d4bd8134f411fd while the backend was prior 0a3c251755a88ee9cbbbbc222fc747811c9da08c. The frontend remains 2df; backend 5b is now separately deployed and attested, with 55 HTTP200 / zero failures during bounded rolling continuity checks. The earlier price cases were not repeated or misrepresented as post-rollout tests. Initial timer/selector/budget failures and the four raw PASS race attempts lacking browser-completion proof remain retained with explicit qualifications; only corrected completion-witness cases establish delivered-response acceptance. No wallet/signing, screenshots or raw actor/trade export occurred.

Unit/provenance invariants, source results, deployed checklist, race/reload receipts and coverage audit. This display repair adds no request-triggered chain/oracle reads or signing permission. Complete the remaining matrix before closure.

Final release evidence and checked acceptance lists: #1543, release checklist in #1543. The exact serving backend remains 5b623a04; this final publication changes documentation only.

The missing-USD display fix and focused acceptance are merged through [PR #1537](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1537) and [PR #1542](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1542), final main `5b623a04f35bb6b44d3e64df0014e458cad653fc`; genuine [CI526](https://ci.cl8y.com/repos/7/pipeline/526/1) passed. **Leaving open:** the full requested API/abuse/execution matrix remains incomplete. - [x] Preserved the exact original 6/18 helper reproduction (`1.21412500000e-14`); it fails before and returns unavailable after. Modern ratios remain human asset_1/asset_0; matching indexed historical asset_0 USD is inverted exactly once. Missing USD cannot select legacy raw, UST1 peg, USTR multiplier, ticker/oracle, stale-last-good or candle-close fallback. - [x] Focused 61 helper/chart plus 3 actual page cases pass across all four decimal combinations, both trade/display directions, optional USD, bounded raw reconstruction, malformed/nonfinite/nonpositive values, overflow/underflow, pair/timestamp/metadata guards and inversion round trips. #524 all 10 groups, #680 all 6 groups, the relevant 62 tape/chart/conversion subset, types and focused lint pass. These suites overlap; counts are not unique acceptance totals. - [x] Served Trade/Charts desktop/phone cases pass valid→missing dash→invert→indexed recovery→foreign-pair rejection with historical candles retained (7.826s, 13.202s, 5.544s, 5.239s). They use owned anonymous HTTP fixtures and virtual refetch time, not actual missing-price market conditions. - [x] Separate unmodified-HTTP, ordinary-clock Trade/Charts acceptance passed in 13.435s: indexed factory USD 0.9210291980528618, human ratio 142.63466865686598, inverted Trade USD 0.006457260403279426, 200 historical candles retained. Actual USD was present; fixtures cover absence. - [x] Four additional pair/orientation race and real reload cases pass (15.599s, 23.093s, 9.157s, 8.766s). Exact held browser responses received HTTP200, completed bodies and no request failures. Old-pair completions cannot replace the selected pair; updated same-pair data uses the current orientation once. Reload without a Charts price override preserves the correct isolated session orientation; returning to A restores A's own direction. - [ ] Complete broader cache-poisoning/interleaving, empty-tape/current-source rejection/expiry, mixed identity/chain, extreme rounding/dust and injection abuse acceptance; existing focused guards cover portions only. - [ ] Complete the comprehensive backend amount→human-price/asset_0-USD/candle timestamp contract matrix and funded market/limit place/update/crossing plus LP valuation acceptance in both orientations. Unchanged backend/execution code and conversion regressions do not prove every requested path. These browser cases observed frontend `2df4a471a9ca98a8672d911b67d4bd8134f411fd` while the backend was prior `0a3c251755a88ee9cbbbbc222fc747811c9da08c`. The frontend remains 2df; backend 5b is now separately deployed and attested, with 55 HTTP200 / zero failures during bounded rolling continuity checks. The earlier price cases were not repeated or misrepresented as post-rollout tests. Initial timer/selector/budget failures and the four raw PASS race attempts lacking browser-completion proof remain retained with explicit qualifications; only corrected completion-witness cases establish delivered-response acceptance. No wallet/signing, screenshots or raw actor/trade export occurred. [Unit/provenance invariants](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/5b623a04f35bb6b44d3e64df0014e458cad653fc/skills/AGENTS_TRADE_PRICE_USD.md), [source results](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/5b623a04f35bb6b44d3e64df0014e458cad653fc/docs/qa/issue-1512/RESULTS.md), [deployed checklist](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/5b623a04f35bb6b44d3e64df0014e458cad653fc/docs/qa/issue-1512/README.md), [race/reload receipts and coverage audit](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/5b623a04f35bb6b44d3e64df0014e458cad653fc/docs/qa/issue-1512/deployed-races.md). This display repair adds no request-triggered chain/oracle reads or signing permission. Complete the remaining matrix before closure. Final release evidence and checked acceptance lists: [#1543](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1543), [release checklist in #1543](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/2a78ec3303c11c0d1ebd76a19005a02ebba3adff/docs/qa/issues-1206-1512/live-release-20261018.md). The exact serving backend remains `5b623a04`; this final publication changes documentation only.
Sign in to join this conversation.
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#1512
No description provided.