Phase 0: Core Operations

Liquidity Operations

Add and remove liquidity from DLMM pools with real-time impact simulation

SDK Feature #3
Real SDK Integration
SDK #3 ✓
Wallet Not Connected
Connect your wallet to perform liquidity operations

Select Operation

Choose whether to add or remove liquidity

Add Liquidity

Enter the amounts of tokens to deposit

Impact Simulation

Estimated impact of your add liquidity operation

LP Tokens148.50
Price Impact0.02%
Max Slippage0.5%
Estimated Gas0.00005 SOL

SDK Implementation

How liquidity operations work with the Saros DLMM SDK

Add Liquidity

  • • SDK Method: addLiquidity()
  • • Validates token amounts and balances
  • • Calculates optimal bin distribution
  • • Creates transaction with slippage protection
  • • Returns LP token amount estimation

Remove Liquidity

  • • SDK Method: removeLiquidity()
  • • Burns LP tokens from user's position
  • • Calculates token amounts to receive
  • • Handles fee collection automatically
  • • Supports partial withdrawals

Implementation Files

• Operations: src/lib/dlmm/operations.ts
• Client Integration: src/lib/dlmm/client.ts
• Hook: src/hooks/use-dlmm.ts