fix(quotes): existing KENA pool stays unpriceable across refreshes #1479
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#1479
Loading…
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?
Existing KENA pool does not become quote-ready
Problem and required behavior
KENA has an indexed KENA/cLUNC pool with positive cached liquidity, but ordinary direct and routed inputs cannot obtain an executable quote. Repeated quote requests return
503 missing_observations, including both directions of the direct pool. Replacing that error with a loading bar improves the interface but does not restore pricing: a structurally excluded reference can remain unavailable indefinitely.Small pool size alone must not make a supported, safely priceable market permanently unquotable. Calculate amount-specific net output for representable inputs using a reviewed, manipulation-resistant reference policy. Genuine dust, insufficient liquidity, unsupported semantics, restrictions and protection failures remain distinct blockers. The result displayed in the main receive field must execute under the exact selected UI percentage; do not introduce a second indicative-price panel or weaken signing to make a quote appear available.
This bundles small-market reference/admission coverage, accurate readiness classification and the loading-to-usable-quote transition. The solution must work generically for similarly sized supported pools, not through a KENA address/symbol exception.
Fresh reproduction and evidence scope
Read-only investigation on 2026-10-12 00:21:27–00:22:23 UTC separately pinned backend revision
ea627f7b0e8d5ebc9fde2bb5b243f451cf159f4dbefore and after each of two trials. Source reviewed at main2d1627ffa33eb3e08199acfff574a5b63fcfbd39; the relevant application trees are unchanged from that deployed revision. The repeat trial waited 21 seconds, beyond the original 20-second observation lifetime. Requests were paced at least 500 ms, had 10-second deadlines and bounded bodies. No actors, wallets, signing, broadcasts, screenshots or production state mutations were used.Public execution identities:
terra1ps34wcgyjjp93hf2wvmt3t7v9ky9xm43yhzf6anq8kyp777egsdq0eua67— 6 decimals.terra1437qslye72t7qmmahn4t5chz50r8a62g45phwkquwpyu2l62u6ksqssgdg— 6 decimals.terra1vwsq6jd2kxkt4d5w6435fajla3qxgr2vvhjvvufxvlerp3pfjsesm9gpds.GET /api/v1/pairs/{pair}returned this pair in both trials, fee 180 bps,code_id_frozen:false, and cached liquidity $25.91498401637648 / $25.92004207903216. It also reportedis_active:true. This is catalog/valuation evidence, not proof that every current on-chain or quote-admission prerequisite is satisfied: the response builder assigns its active flag, and cached USD liquidity is not a qualified reserve/fee/reference tuple.All solve requests used
max_spread=0.05,max_maker_fills=8, andprotection_policy=quote_relative_v1; native-endpoint requests also usedpool_only=true.missing_observationsmissing_observationsmissing_observationsmissing_observationsunsupported_semanticsTotal: 20 quote GETs, 16 KENA missing-observation responses, two HTTP 200 controls, two unsupported controls. HTTP 200 alone is not independent economic/client/signing validation, and the controls do not establish universal readiness. Direct cLUNC → KENA progress returned HTTP 200,
stage:idle,done:1,total:1in both trials while its quote remained unavailable. Search completion is not pricing readiness.The investigation did not inspect current raw reserve tuples, effective container environment, scheduled per-pair rejection details or the live economic-reference row. Confirm those before declaring a single production root cause or changing admission. These observations do not prove every sampled amount should execute: pin economics and classify real amount/protection limits independently.
Current codebase and likely structural failure
config.rsdefinesDEFAULT_HUB_USD_TVL_FLOOR = "100"and loadsHUB_USD_TVL_FLOORintoHubUsdConfig.tvl_floor.economic_usd.rs,resolve_economic_marks, derives a token mark from usable factory reserves against an already-priced hub, then discards the candidate when total pair TVL is belowcfg.tvl_floor. The scheduled pass therefore cannot publish a token mark from that below-threshold candidate under the default configuration, even when its raw pool math is usable. Another eligible pool/reference could still supply the token's mark; its existence and eligibility must be checked.hub_usd.rs, where hub admission checks independently priced leg depth. Do not conflate the two measures or infer trusted backing from self-valued TVL.db/queries/hub_prices.rsresolves and replaceseconomic_token_marksduring scheduled publication. A faster repeat request cannot create a mark the producer deliberately omits.local_reference_quote.rsonly loads admitted, fresh economic marks with eligible oracle/hub provenance.fair_outputneeds valid marks for both endpoints, including KENA.local_quote.rs,evaluate_with_plan, computes checked pool/book net amounts, fees/hooks and positive floors, then requiresreferences.fair_output.diagnostics.rs,reference_rejection, maps an absent reference to missing observations. The nonwaivable fair-deviation guard follows this check.protocol_tvl.rs,protocol_pair_tvl, can value a one-anchor pool as twice its priced anchor leg without this $100 mark floor. Thus positive displayed pool liquidity and absent executable references can coexist.frontend-dapp/src/hooks/useQuoteErrorRecovery.ts,utils/localQuoteFreshness.ts,utils/routeQuoteErrors.ts,pages/SwapPage.tsx, andcomponents/trade/TradeMarketOrderPanel.tsx.This confirms a source-level valuation/reference coupling that can permanently exclude a below-$100 pool. It is consistent with KENA's symptoms; the effective live threshold and all other prerequisites still require independent diagnosis. Missing compatible fees/configuration, unsupported tax/hooks, stale anchors or provider admission may be additional blockers.
Why a new implementation is needed
This is an indexed existing-pool report with positive cached valuation; current usable reserves, graph connectivity and admission still require diagnosis. A blanket transient-data outcome across small and larger direct inputs prevents users from distinguishing delayed ingestion from a reference policy that will never admit their market. Repeated loading alone cannot repair that structural condition. USD reporting eligibility and safe execution-reference coverage need explicit contracts instead of an accidental shared cutoff.
Related work: #1473 covers generic outcomes/UX, #1464 provider/admission recovery, and #1459 supported quote coverage. Closed #1360 concerns KENA broadcast gas; this failure occurs before an executable quote exists and is not a gas-floor request. Preserve route-tax work in #1381.
Recommended direction
Constraints and guardrails
Acceptance criteria
missing_observationssolely because of pool size. Genuine dust/liquidity/protection/unsupported cases stay precise; no address exception or weakened oracle guard.skills/instructions and an agent checklist with explicit skip policy.Test plan: all affected paths
Extend appropriate existing tests:
indexer/src/indexer/economic_usd.rs,protocol_tvl.rs,api/local_reference_quote.rs,api/local_quote/diagnostics.rs;indexer/tests/api_hub_prices.rs,indexer_economic_fee_usd.rs,api_oracle.rs,route_local_quotes_1452.rs,scenarios/fee_generation_recovery_1464.rs,tax_admission_recovery_1464.rs,book_snapshot_loop.rs; client recovery/freshness tests,SwapPage.queryParams.test.tsx,TradePage.test.tsx, market submit-snapshot tests and applicable swap/route/native transaction E2E. Keep provenance/source-only and actual settlement assertions separate.Attack, hack and abuse tests
Agent verification and release criteria
bao-exec, exact source/dirty fingerprint and UTC receipts. Complete feasible checks first. Confirm actual assertions and independent expected integers, not only HTTP status or loader text.make verify-issue-1473,verify-issue-1452,verify-issue-1464,verify-issue-1453,verify-issue-1391and applicable floor/tax/guard/database verifiers (1398,1381,1390,1396; receive/provider support checks where affected). Add a dedicated regression target/checklist for this issue. No shared database/chain resets or migrations from runtime.This is a bug investigation/report, not evidence that the new reference policy is implemented or that all sampled amounts are safely executable.
Published implementation and evidence (2026-10-12)
Implementation PR #1481 is deployed at
0395459971312c31f87d502ef7822733a7250238; evidence/QA #1482 publishes bounded live outcomes and retained failures. Current results and agent checklist distinguish completed subsets from incomplete whole criteria.Only documentation AC8 is complete. Private atomic original rows/history, independent thin-token manipulation, full native/hook/device breadth and retained live failures keep the other whole criteria incomplete. This issue remains open.
PlasticDigits referenced this issue2026-10-12 05:46:00 +00:00
Implementation #1481 and evidence/QA #1482 are merged. Both production apps are independently attested at
0395459971312c31f87d502ef7822733a7250238; evidence maind65228c2970a1ec7b11d81000d3f83ceb58132c4has identical application inputs and adds QA/docs only. The authorized economic total-TVL floor is $10; independently priced hub depth stays $100.All six original KENA↔cLUNC offers now produce validated quotes matching independent reserves/180-bps arithmetic and contract simulation, with positive exact 5% floors. Two bounded browser shards completed all 840 unique desktop/phone first/retest cases: 558 useful quotes, zero failures, p50/p95/p99/max 376.9/414.4/444.9/467.3 ms against 750 ms. Each retained the 30-minute/2,200-read caps and 181-second gap. Source verifiers and actual funded plain-core subsets passed; implementation hosted CI422 genuinely passed all steps.
Retained FAILs: original browser 710/840 at the 30-minute cap plus 1,110.9/1,101.2 ms stalls; full 1,680-row API run had one unproved HTTP200 client-validation failure; separate cold replay 883.045 ms exceeded 500 ms. Warm API 1,116 useful quotes stayed ≤291.94 ms. Original failed body/stalls were not reproduced, so causes are not retrospectively invented. Prometheus/private original atomic SQL, independent thin-token manipulation/history, complete native/hook/book/funded/device breadth remain incomplete.
Results, checklist/skip policy, and SM1479 instructions separate passing subsets, failures and skips. Only documentation AC8 is checked. This issue remains open.
The implementation PR's negated closing phrase was still parsed by Forgejo and automatically changed this issue's state during merge. It was reopened; both PR descriptions now use plain references without automatic closing keywords. That state change did not establish completed acceptance.
PlasticDigits referenced this issue2026-10-15 05:32:59 +00:00
Closed at the user's request as part of consolidating issues #1449–#1500.
Small-market reference admission and the KENA quote fix are merged and deployed. No separate implementation task remains here; the shared native recovery problem is tracked by #1504.
Replacement: #1504
Wallet/device chores and verification-only holds are intentionally excluded. Historical failed receipts remain unchanged; this closure does not claim every old acceptance checkbox passed.