Frontend: LP risk disclosure, swap precision display, and a11y axe coverage (#366) #875
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!875
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-366-lp-risk-swap-precision-a11y"
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
Implements GitLab #366 (gap follow-up M6, M10, H10 from #361):
docs/frontend.md#pool-lp-risk-disclosure.isPositiveDecimalAmountfor amount gating andspreadPercentFromRawSimfor hop spread %; submit path unchanged (still BigInt-safe via #356)./),/limits,/pool,/portfolio(critical/serious = 0).Acceptance checklist
make test-frontend→PoolPage.test.tsx“shows impermanent loss notice…”9007199254740991make test-frontend→decimalAmountInput.test.ts,rawAmountMath.test.ts,SwapPage.test.tsx“large-amount precision”/swap,/limits,/pool,/portfoliocd frontend-dapp && PLAYWRIGHT_SKIP_CHAIN=1 npm run test:e2e:smoke -- e2e/a11y-critical-routes.spec.ts(Swap route is/in app)vitest.config.tsunchangedmake lint-frontendVerification checklist (third parties)
make test-frontendmake lint-frontendPLAYWRIGHT_SKIP_CHAIN=1 npm run test:e2e:smoke -- e2e/a11y-critical-routes.spec.tsfromfrontend-dapp//pool→ open Provide Liquidity → confirm IL notice + Learn more link/(Swap) → paste9007199254740992in You Pay → confirm quote path not stuck on Enter Amountmake deploy-local+make dev, re-run a11y spec withoutPLAYWRIGHT_SKIP_CHAINfor full Swap shellchanged the description
changed the description
Security review — MR !875
Commit reviewed:
0bb04f445ea6d58c2eb8eb9133f4e2bbf3195572Scope: LP impermanent-loss disclosure (
PoolPage.tsx), swap amount gating (isPositiveDecimalAmount), hop spread display (spreadPercentFromRawSim,parseSlippagePercentfor UI severity/confirm), axe E2E route expansion, docs/skills.Method: Diff-only review with sink tracing for user-controlled inputs (swap amount field, indexer/LCD sim strings) into display gates, slippage warnings, expert-mode block, and on-chain submit path (
useSubmitAlignedSimQuote,assertSubmitQuotePayRawAligned,toRawAmount/ BigInt).Outcome:
FINDINGS: 0medium+Summary: No new injection, authz, XSS, or submit-path bypass identified on this diff.
https://gitlab.com/...docs URL withrel="noopener noreferrer"; no attacker-controlled HTML or href.isPositiveDecimalAmountis constrained by the existingDECIMAL_AMOUNT_DRAFT_RE; submit still usestoRawAmount+ debounced raw alignment (#356). Change fixes false negatives aboveNumber.MAX_SAFE_INTEGERwithout weakening chain args.spreadPercentFromRawSimis display-only BigInt math on uint strings viatryParseBigInt; expert-mode block (expectedSlippagePct > 30) and high-slippage confirm (> 5%) still gate on parsed percent — no bypass vs priorparseFloat(priceImpact)behavior for normal formatted values.Prior threads: No prior security-review notes on this MR; nothing re-reported.
Inline findings: None (no medium+ issues to thread).
mentioned in issue #366
mentioned in commit
ede4ce9b6b