DEX: Pool list — canonical / factory vs indexer context for N pairs #112
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#112
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?
Problem
Liquidity Pools (
/poolsor pool route) shows ~117 pairs (and “indexed tokens”) from the indexer (getPairstotal inPoolPage), but there is no “canonical” indication of how that list relates to the on-chain factory (e.g.getAllPairsPaginatedinLimitOrdersPage/SwapPage). Users cannot tell if a row is factory-registered only, full indexer row, or default featured vs long tail.Current code (reference)
frontend-dapp/src/pages/PoolPage.tsxgetPairsfromfrontend-dapp/src/services/indexer/client.tswith sort/filter/pagination (~556–567).{total} pair(s)+ optional{indexerTokensQuery.data.length} indexed tokens(~591–597).PoolCardusesverifyPairInFactoryfor an “Unverified” badge when factory check fails (~70–75, 270–280).frontend-dapp/src/pages/SwapPage.tsx—getAllPairsPaginatedfor router token graph.IndexerPairvsPairInfoinfrontend-dapp/src/types/index.ts(indexerPairToPairInfo).Work to do (maintainability-oriented)
Clarify data sources in UI
Canonical / featured marking (choose product rule)
getAllPairsPaginatedresult; or “Factory verified” ifverifyPairInFactorypasses; or highlight pairs present in a governance/allowlist if one exists in config.getPairListBadges({ indexerPair, factoryPairsSet, verifyResult })to keepPoolCardthin.Performance
Setof addresses.Empty / drift states
Tests
PoolPage.test.tsx: mock indexer + optional factory set; expect badges.Acceptance criteria
assigned to @PlasticDigits
mentioned in commit
55dca5ec89Ready for verification (merged to
main@55dca5e)@brouie — please verify the pool list UX and behavior when you have a moment. Issue left open per process.
What changed
FACTORY_PAIRS_MAX_FOR_POOL_LIST(10k) factory pairs;Setmembership for O(1) per row (no per-cardverifyPairInFactory).pairListBadges.test.ts+ extendedPoolPage.test.tsx;vitest.configsetsVITE_FACTORY_ADDRESSfor tests that need factory-gated queries.docs/frontend.md,docs/indexer-invariants.md,docs/README.md; cross-links to glab#112 and Cursor split to PRs / babysit skills (optional maintainer workflow).Checklist for you
/pool: copy matches your expectations; Data sources (docs) opens the right anchor.cd frontend-dapp && npm run test:unitpasses locally if you pullmain.Skills / workflow: Optional: Cursor skills
split-to-prs,babysitfor follow-up PRs and CI (also mentioned indocs/frontend.md).@PlasticDigits verified on
a428ba9/55dca5e.Vitest baseline: 266/266 passing (up from 238 yesterday). New
pairListBadges.test.ts3/3.Code review:
getPairListBadgesinutils/pairListBadges.ts— clean O(1) Set lookup per row, single paginated factory fetch of up to 10k pairs viaFACTORY_PAIRS_MAX_FOR_POOL_LISTconstantPoolPage.tsxline 804-805: single shared factoryPairAddresses query keyed on the max constant; line 1030: per-row badge call reuses the SetGood UX resolution. Closing as verified.
mentioned in issue #114
mentioned in issue #133
mentioned in issue #547
marked as related to #547