Reconcile indexer route display with submit ops on mismatch (#450 / SEC-I02 H09) #994
No reviewers
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!994
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/450-route-intermediate-reconcile-notify"
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
Addresses GitLab #450 (SEC-I02 H09) per review feedback on !987: when indexer
intermediate_tokensdisagrees withrouter_operations, the Swap page now reconciles the displayed route to the ops-derived path and shows a user-visible warning (swap-route-intermediate-reconciled) instead of silently falling through to pool-only or client BFS.reconcileSwapRouteIntermediateTokens()inswapRouteDisplay.ts(keeps existingswapRouteIntermediateTokensAlignedfor tests).SwapPageuses reconciled tokens for display/submit and setsindexerRouteIntermediateReconciledon the quote payload.docs/security-model.mdandskills/AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md.Acceptance checklist
router_operationsafter indexer responsetokenPathFromSwapOperations+reconcileSwapRouteIntermediateTokensunit testsintermediate_tokensbefore submissionswapRouteIntermediateTokensAligned+ reconcile testsSwapPage.test.tsxtamperedintermediate_tokenscase;data-testid="swap-route-intermediate-reconciled"reconciles tampered indexer intermediate_tokens…testThird-party verification
Manual (optional): On
/with a multihop CW20 quote, mock or tamper indexerintermediate_tokensso they disagree withrouter_operations→ route row should show the ops path and the amber reconciliation warning underswap-route-summary; submit must not switch to client BFS (swap-route-source-client-fallbackabsent).Security review — MR !994
Commit reviewed:
673446b23cbf38d93fc24a44a9cba3850062330fScope: Frontend route reconciliation for SEC-I02 H09 (#450) —
reconcileSwapRouteIntermediateTokens, SwapPage quote/display/submit alignment, warning UI (swap-route-intermediate-reconciled), docs/skills updates; incidental Rust formatting-only diffs (no logic changes).Outcome:
FINDINGS: 0medium+Method
intermediate_tokens,router_operations,hops) throughgetRouteSolve→swapOperationsFromIndexerResponse→reconcileSwapRouteIntermediateTokens→computeSwapRouteDisplay/swapMutation(indexerOperations).enrichSwapOperationsWithHopMinReturnsonly attaches per-hopmin_return(token addresses unchanged).useSubmitAlignedSimQuote(#356) and static warning copy (no XSS/log-injection surface).intermediate_tokenspath); out of this MR’s diff.Assessment
This change closes the display/submit mismatch class (benign
intermediate_tokensvs maliciousrouter_operations): on mismatch the UI reconciles to the ops-derived path, surfaces an amber warning, and continues to submit indexer ops (no silent pool-only/client-BFS fallback that could mask tampering). Residual indexer trust (aligned evil paths, quote inflation) is documented indocs/security-model.mdand outside this diff’s threat delta.Inline threads: none (no medium+ findings).
Must minimize user cognitive overload
Bugfix follow-up (
bd10a987)Route path updated: indexer display disagreed with submit operations…) to brief "Route adjusted." with subtleink-subtlestyling (same tier as wrap/unwrap hints), keepingrole="status"andswap-route-intermediate-reconciledtest id. Route row still shows the ops-derived path; submit unchanged.Tests:
swapRouteDisplay.test.ts+SwapPage.test.tsx— 44/44 pass.Thread resolution: Top-level note is non-resolvable (
individual_note); addressed in this comment.Label:
agent:fix_bugfixremoved.added 1 commit
bd10a987- Shorten route reconciliation notice to reduce cognitive load.Compare with previous version
Security review — MR !994
Commit reviewed:
bd10a987c81824fb023d1f2707f8cece9c5a67afScope: Frontend route reconciliation for SEC-I02 H09 (#450) —
reconcileSwapRouteIntermediateTokens, SwapPage quote/display/submit alignment, reconciliation notice UI (swap-route-intermediate-reconciled), docs/skills updates; incidental Rust formatting-only diffs (no logic changes). Delta since prior review (673446b): commitbd10a987shortens reconciliation copy/styling only.Outcome:
FINDINGS: 0medium+Method
intermediate_tokens,router_operations,hops) throughgetRouteSolve→swapOperationsFromIndexerResponse→reconcileSwapRouteIntermediateTokens→computeSwapRouteDisplay/swapMutation(indexerOperations).enrichSwapOperationsWithHopMinReturnsonly attaches per-hopmin_return(token addresses unchanged between quote and submit).useSubmitAlignedSimQuote(#356); static warning copy rendered as React text (no XSS/log-injection surface).bd10a987notice change: route row still derives from reconciled ops path (primary control); subdued “Route adjusted.” copy does not restore display/submit divergence.Assessment
This change closes the display/submit mismatch class (benign
intermediate_tokensvs maliciousrouter_operations): on mismatch the UI reconciles to the ops-derived path and continues to submit indexer ops (no silent pool-only/client-BFS fallback that could mask tampering). Residual indexer trust (aligned malicious paths, quote inflation) is documented indocs/security-model.mdand is outside this diff’s threat delta.Inline threads: none (no medium+ findings).
added 12 commits
main1ce2e180- Merge branch 'main' into qa/450-route-intermediate-reconcile-notifyCompare with previous version
Resolved merge conflicts with
main(commit1ce2e180).Conflicts:
pair/src/error.rs,router/src/error.rs,dex-common/src/blacklist.rs— all from #456 blacklist default-deny landing onmainwhile this branch still had the pre-1.5.0 fail-open error text and dex-common unit tests.Resolution: Kept
main'sBlacklistGuardUnavailablemessage and removed the stale dex-common test module (coverage is inblacklist_tests). #450 route-reconciliation frontend changes are unchanged.Sanity:
swapRouteDisplay.test.ts+SwapPage.test.tsx(44 tests) andtsc --noEmitpass.Security review — MR !994
Commit reviewed:
1ce2e1800b78a8cff2daa44dc2d34281ff0e8e09Scope: Frontend route reconciliation for SEC-I02 H09 (#450) —
reconcileSwapRouteIntermediateTokens, SwapPage quote/display/submit alignment, reconciliation notice UI (swap-route-intermediate-reconciled), docs/skills updates. Delta since prior review (bd10a987): merge commit1ce2e180(main into feature branch); no additional security-relevant logic changes in the reconciliation path.Outcome:
FINDINGS: 0medium+Method
intermediate_tokens,router_operations,hops) throughgetRouteSolve→swapOperationsFromIndexerResponse→reconcileSwapRouteIntermediateTokens→computeSwapRouteDisplay/swapMutation(indexerOperations).enrichSwapOperationsWithHopMinReturnsonly attaches per-hopmin_return(token addresses unchanged between quote and submit).useSubmitAlignedSimQuote(#356); static warning copy rendered as React text (no XSS/log-injection surface).673446b,bd10a987): reconciliation still forces display to ops-derived path on mismatch; subdued “Route adjusted.” copy does not restore display/submit divergence.intermediate_tokenspath); out of this MR’s diff.Assessment
This change closes the display/submit mismatch class (benign
intermediate_tokensvs maliciousrouter_operations): on mismatch the UI reconciles to the ops-derived path, surfaces a notice, and continues to submit indexer ops (no silent pool-only/client-BFS fallback that could mask tampering). Residual indexer trust (aligned malicious paths, quote inflation) is documented indocs/security-model.mdand is outside this diff’s threat delta.Inline threads: none (no medium+ findings).
mentioned in commit
f7732c6706