Hybrid router: order-book leg should be always-on in the frontend (currently opt-in) #596
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#596
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
The swap UI only includes the limit-book leg when the user opts in (
useHybridBooktoggle + a hand-typedbookInputHuman); the default path is pool-only. So a taker swapping from the default UI routes through the AMM even when a resting order on the same pair would give a better price. The taker pays more, the maker never gets the fill, and there is no incentive to post tight book liquidity.Follow-on to #501 (which covered computing the price-optimal split). This one is about the frontend default.
Expected
Default swap path = hybrid with the book leg always considered: the router takes whatever resting orders beat the pool's marginal price and fills the remainder from the pool. Pool-only becomes an explicit opt-out (anyone wanting v2-LP-only can run their own frontend).
Actual
useHybridBookdefaults off;book_inputis 0 on the large majority of venue trades even when the book is strictly better.Notes
pool_leg_volume/book_leg_volumegives a clean metric to confirm the fix: share of taker volume routed through the book.Direction approved. Users should not be able to opt out (or be required to opt in ) to receive best pricing. DEX frontend must always provide users with best pricing.
Thank you!
...
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: gitlab@mg.gitlab.com gitlab@mg.gitlab.com on behalf of Plastic Digits (@PlasticDigits) gitlab@mg.gitlab.com
Sent: Saturday, 22 August 2026 13:16:06
To: leonardo_colucci@hotmail.com leonardo_colucci@hotmail.com
Subject: Re: cl8y-dex-terraclassic | Hybrid router: order-book leg should be always-on in the frontend (currently opt-in) (#596)
Plastic Digitshttps://gitlab.com/PlasticDigits commentedhttps://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/596#note_3719688869:
Direction approved. Users should not be able to opt out (or be required to opt in ) to receive best pricing. DEX frontend must always provide users with best pricing.
—
Reply to this email directly or view it on GitLabhttps://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/596#note_3719688869.
You're receiving this email because of your account on gitlab.comhttps://gitlab.com/. Unsubscribehttps://gitlab.com/-/sent_notifications/REDACTED/unsubscribe from this thread · Manage all notificationshttps://gitlab.com/-/profile/notifications · Helphttps://gitlab.com/help Notification message regarding https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/596#note_3719688869 at 1787400966
mentioned in commit
685798eaddmentioned in merge request !1116
mentioned in commit
fff91af0fc!1116 merge notes (no automerge, CI not waited)
Merged !1116 into
main(issue-596-hybrid-always-on@685798ea). Local merge intomainwas clean (0 conflicts, 0 diverged commits).Acceptance vs #596 / H596-1–H596-8
Local
make verify-issue-596: 11 PASS / 0 FAIL (Vitest 61 tests + grep/docs guards). Product AC is met: retail Swap/Trade no longer expose a hybrid opt-out; default CW20 quotes useGET /route/solve; Advanced typed book remains a POST split override; empty book still goes through the solver; integratorpool_only=trueis unchanged.Problems / leftovers (not merge blockers)
ci_quota_exceeded(gitleaks,test-frontend,test-frontend-build). Jobs never ran. This is quota, not a code defect. Local verify is the gate.VERIFY_ISSUE_596_CHAIN=1Playwright, observationalbook_leg_volumevspool_leg_volumeafter deploy). Unit/docs cover the UI-control removal; chain + production metrics do not.H596-5). Users cannot opt out, but an outage can still produce pool-only receive/submit.TradeMarketOrderPanel.tsxheader JSDoc still mentions “Hybrid off → pool-only”. Swap network-fee estimate setscw20Hybridonly when the user typed a manual book leg, not when GET alone allocates interiorbook_input.Post-merge deploy + metrics + those hygiene items will be tracked in a new issue (this one should close with !1116).
mentioned in issue #598
marked as related to #598
Post-merge follow-up filed as #598 (Coolify frontend bake, optional LocalTerra Playwright,
book_leg_volumevspool_leg_volumeobservation, JSDoc/Swap-gas hygiene). #596 product AC is closed via !1116.mentioned in issue #599
marked as related to #599
mentioned in issue #607
marked as related to #607
mentioned in merge request !1126
mentioned in merge request !1127
mentioned in issue #615
marked as related to #615
mentioned in merge request !1131
mentioned in issue #616
mentioned in issue #618
mentioned in issue #621
mentioned in issue #622
marked as related to #622
mentioned in issue #625
mentioned in issue #626
mentioned in issue #628
mentioned in issue #633
mentioned in issue #634
mentioned in issue #635
mentioned in issue #636
mentioned in issue #679
marked as related to #679
mentioned in issue #681
marked as related to #681
mentioned in merge request !1182
mentioned in issue #686
mentioned in issue #690
mentioned in issue #693
mentioned in issue #704
mentioned in issue #707
mentioned in issue #708
mentioned in merge request !1198
mentioned in issue #711
mentioned in issue #713
mentioned in issue #718