Skip to content

feat(clmm): improve swap/burn UX and fix CI#4

Merged
salazarsebas merged 5 commits into
mainfrom
feat/clmm-liquidity-swap-improvements
Mar 10, 2026
Merged

feat(clmm): improve swap/burn UX and fix CI#4
salazarsebas merged 5 commits into
mainfrom
feat/clmm-liquidity-swap-improvements

Conversation

@KevinMB0220

@KevinMB0220 KevinMB0220 commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • ASP: Return actual swap/burn amounts from the server so the SDK can track confirmed note values instead of relying on client-side estimates
  • SDK: Use placeholder notes with crash-safe persistence; reconcile with ASP-confirmed amounts after execution
  • Frontend: Add CLMM swap output estimation, display expected amounts on swap/burn flows, and align default ticks with current pool state
  • CI fixes: Resolve all clippy warnings (unnecessary casts, dead code, unused imports), fix stale test mocks, and correct broken import path

Changes

ASP (Rust)

  • Echo actual amount_out / amount_change in swap and burn responses
  • Remove dead code in sync/events.rs (unused selectors and structs)
  • Remove unnecessary type casts (as u128, as u32, u128::from)
  • Fix last_root unused-assignment warnings in mint/swap handlers
  • Replace manual range check with idiomatic .contains() in validation
  • Remove unused tower_governor imports

SDK (TypeScript)

  • Swap: save placeholder notes before ASP call, update with confirmed values after
  • Mark placeholder change note as spent when change amount is zero
  • Align test mocks with updated ASP response contract (amount_out, amount_change, syncCommitments)
  • Fix deposit test to match actual DepositResult interface
  • Restore TICK_OFFSET in position commitment test

Frontend

  • Fix broken @/lib/utils import → @/lib/cn in Skeleton.tsx

Deploy

  • Update Sepolia contract addresses and verifier proofs

Test plan

  • cargo clippy -- -D warnings passes with 0 errors
  • bun test in SDK: 107/107 passing
  • tsc --noEmit in frontend: clean

Align verifier calldata, contracts config, and seed script with latest Sepolia deployment.

Made-with: Cursor
Return concrete amounts from ASP, use placeholder notes and sync to confirmed values so shielded swaps/burns remain consistent across crashes and restarts.

Made-with: Cursor
Add safe CLMM swap output estimation, show expected amounts on swap and burn flows, and align default ticks with current pool state.

Made-with: Cursor
@vercel

vercel Bot commented Mar 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zylith Ready Ready Preview, Comment Mar 10, 2026 6:54pm

@salazarsebas salazarsebas self-requested a review March 10, 2026 18:26
…wap-improvements

# Conflicts:
#	asp/src/api/routes.rs
#	asp/src/sync/events.rs
#	sdk/test/operations/deposit.test.ts
@salazarsebas salazarsebas changed the title Feat/clmm liquidity swap improvements feat(clmm): improve swap/burn UX and fix CI Mar 10, 2026

@salazarsebas salazarsebas left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@salazarsebas salazarsebas merged commit 84ae0fb into main Mar 10, 2026
6 checks passed
@salazarsebas salazarsebas deleted the feat/clmm-liquidity-swap-improvements branch March 10, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants