feat: one-sided pool add/withdraw (auto zap + wrap) (#533) #1068

Merged
PlasticDigits merged 2 commits from feat/533-one-sided-lp into main 2026-08-17 03:41:25 +00:00
PlasticDigits commented 2026-08-17 01:33:49 +00:00 (Migrated from gitlab.com)

Summary

  • Retail /pool default is one-sided add (Token + Pair + Amount) and withdraw (LP + Withdraw as + Amount). Wrap/unwrap is implied by the token; two-sided provide/withdraw stays under Advanced.
  • Zap-in targets the post-swap pool ratio (no silent donate). Every hop has a floor (min_return / slippage_tolerance / min_assets). Unwrap spends only the quoted zap-out amount (A7).
  • H531-3 / docs/user-lunc-liquidity.md / docs/frontend.md Z533-1–Z533-10 + skills/AGENTS_FRONTEND_POOL_ONE_SIDED.md updated. Verify: make verify-issue-533.

Related to #533 — keep open until LocalTerra e2e-tx P4–P8 are recorded

Test plan

  • make verify-issue-533 (unit + docs + Playwright smoke P1–P3, 5 workers) — passed twice
  • A7 unwrap-all regression in unit tests (oneSidedLiquidityTx.test.ts)
  • LocalTerra e2e-tx P4–P8 (frontend-dapp/e2e/pool-one-sided-533-tx.spec.ts) after wrap-mapper local instantiate uses fee_wrap_bps / fee_unwrap_bps (deploy currently still sends fee_bps)
  • Manual: disconnected Connect Wallet; empty holdings; empty pool disables one-sided; Advanced first deposit; light/dark
  • Manual: pause / blacklist / wrap-mapper pause still block CTAs

AC

  • AC1 — Retail add: Token, Pair, Amount (no wrap checkbox, no second amount, no on-card slippage)
  • AC2 — Retail withdraw: LP, Withdraw as, Amount (no receive-wrapped checkbox)
  • AC3 — Native wrap/unwrap implied by token; pools stay CW20
  • AC4 — Zap-in post-swap ratio; no silent donate
  • AC5 — Empty pool disables one-sided; Advanced two-sided remains
  • AC6 — Factory pairs; pool-only zap swap; quote snapshot on submit
  • AC7 — Floors on every hop; no slippage_tolerance: null on zap provide
  • AC8 — Unwrap quoted amount only (A7 unit test)
  • AC9 — Gas envelope + pause/blacklist/mapper/treasury/IL/pre-sign gates on retail cards
  • AC10 — Off-pair: route-in then zap, or “No route”
  • AC11 — H531-3 + frontend.md + user-lunc-liquidity.md
  • AC12 — Two-sided under Advanced
  • AC13 — make verify-issue-533 (smoke). Tx project documented; P4–P8 not recorded on this VM (wrap-mapper instantiate mismatch)
## Summary - Retail `/pool` default is **one-sided** add (Token + Pair + Amount) and withdraw (LP + Withdraw as + Amount). Wrap/unwrap is implied by the token; two-sided provide/withdraw stays under **Advanced**. - Zap-in targets the **post-swap** pool ratio (no silent donate). Every hop has a floor (`min_return` / `slippage_tolerance` / `min_assets`). Unwrap spends **only** the quoted zap-out amount (A7). - H531-3 / `docs/user-lunc-liquidity.md` / `docs/frontend.md` Z533-1–Z533-10 + `skills/AGENTS_FRONTEND_POOL_ONE_SIDED.md` updated. Verify: `make verify-issue-533`. Related to #533 — keep open until LocalTerra e2e-tx P4–P8 are recorded ## Test plan - [x] `make verify-issue-533` (unit + docs + Playwright smoke P1–P3, 5 workers) — passed twice - [x] A7 unwrap-all regression in unit tests (`oneSidedLiquidityTx.test.ts`) - [ ] LocalTerra **e2e-tx** P4–P8 (`frontend-dapp/e2e/pool-one-sided-533-tx.spec.ts`) after wrap-mapper local instantiate uses `fee_wrap_bps` / `fee_unwrap_bps` (deploy currently still sends `fee_bps`) - [ ] Manual: disconnected Connect Wallet; empty holdings; empty pool disables one-sided; Advanced first deposit; light/dark - [ ] Manual: pause / blacklist / wrap-mapper pause still block CTAs ## AC - [x] AC1 — Retail add: Token, Pair, Amount (no wrap checkbox, no second amount, no on-card slippage) - [x] AC2 — Retail withdraw: LP, Withdraw as, Amount (no receive-wrapped checkbox) - [x] AC3 — Native wrap/unwrap implied by token; pools stay CW20 - [x] AC4 — Zap-in post-swap ratio; no silent donate - [x] AC5 — Empty pool disables one-sided; Advanced two-sided remains - [x] AC6 — Factory pairs; pool-only zap swap; quote snapshot on submit - [x] AC7 — Floors on every hop; no `slippage_tolerance: null` on zap provide - [x] AC8 — Unwrap quoted amount only (A7 unit test) - [x] AC9 — Gas envelope + pause/blacklist/mapper/treasury/IL/pre-sign gates on retail cards - [x] AC10 — Off-pair: route-in then zap, or “No route” - [x] AC11 — H531-3 + frontend.md + user-lunc-liquidity.md - [x] AC12 — Two-sided under Advanced - [x] AC13 — `make verify-issue-533` (smoke). Tx project documented; P4–P8 not recorded on this VM (wrap-mapper instantiate mismatch)
PlasticDigits commented 2026-08-17 03:39:51 +00:00 (Migrated from gitlab.com)

added 9 commits

  • ce1588a4...61f204b7 - 8 commits from branch main
  • a5639d8b - merge: land #533 one-sided pool on #534/#537 main

Compare with previous version

added 9 commits <ul><li>ce1588a4...61f204b7 - 8 commits from branch <code>main</code></li><li>a5639d8b - merge: land #533 one-sided pool on #534/#537 main</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/350/diffs?diff_id=1964736323&start_sha=ce1588a44e634a551a075a0018edaa01b64e621b)
PlasticDigits commented 2026-08-17 03:39:51 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-17 03:41:26 +00:00 (Migrated from gitlab.com)

mentioned in commit 52c8693c5a

mentioned in commit 52c8693c5a60eba57037c6dd9f5cdcae037d783f
PlasticDigits (Migrated from gitlab.com) merged commit 52c8693c5a into main 2026-08-17 03:41:26 +00:00
PlasticDigits commented 2026-08-17 03:42:12 +00:00 (Migrated from gitlab.com)

mentioned in issue #537

mentioned in issue #537
PlasticDigits commented 2026-08-17 03:42:14 +00:00 (Migrated from gitlab.com)

mentioned in issue #533

mentioned in issue #533
PlasticDigits commented 2026-08-17 03:42:25 +00:00 (Migrated from gitlab.com)

mentioned in issue #539

mentioned in issue #539
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1068
No description provided.