epic: indexer best execution for default swap; manual hybrid only in advanced trading UX #108
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#108
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?
Summary
Product gate: the indexer (and/or solver service) must provide automated best execution for end users on the default / simple swap experience: optimal or near-optimal split between AMM pool legs and on-chain limit book legs (per hop, up to the 3-hop policy) with clear disclosure of assumptions and risks.
Manual control of hybrid parameters (
pool_input/book_input/max_maker_fills/book_start_hint) is relegated to the advanced trading UI only — not the primary swap flow.Rationale
SwapPage); multihop is pool-only in the UI. That is a pro workflow, not default retail.ARCHITECTURE_GAP_MATRIXalready flags “Best execution logic — not implemented server-side”; this issue closes that gap in the product sense: off-chain policy + on-chain verification via existing router simulate / pair queries.Requirements (high level)
Server (indexer or dedicated service)
hybrid_by_hopsuggestions and slippage-safe bounds. Must define behavior when LCD or book query fails: fallback to pool-only with explicit degraded flag to the client.Acceptheader or/v2/) if breaking; coordinate with dApp.Frontend
Non-goals (in this issue)
Acceptance criteria
GET(or versioned) public best-exec response documented in OpenAPI and typescript types infrontend-dapp.bookInputHumanrequired for happy path.HybridSwapParamsediting; E2E differentiates the two.docs/adr/for solver ownership and liability boundaries.References
indexer/src/api/route_solver.rs—SolveRoutePostBody/hybrid_by_hopfrontend-dapp/src/pages/SwapPage.tsx— current manual hybriddocs/reviews/20260409T030009Z/ISSUE_BACKLOG.md— DEX-P0-EPIC best executionLabels suggested
epic,indexer,frontend,hybrid,product,launch-blocker,architectureRelationship
mentioned in issue #107
Related: multihop + GET/optimizer implementation https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/101 — parent coordination https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/107
mentioned in issue #101
mentioned in commit
844607a438mentioned in issue #106
mentioned in issue #189
mentioned in issue #209
marked as related to #209
mentioned in issue #210
mentioned in issue #216
marked as related to #220
mentioned in issue #220