Saros DLMM Demo Challenge Submission Live Demo: https://snaplp.vercel.app
Transform complex DLMM liquidity provision into one-click deployments with pre-configured strategy templates.
DLMM is powerful but overwhelming. Most users struggle with bin configuration, range selection, and distribution strategies.
SnapLP solves this by providing pre-built strategy templates that abstract away the complexity:
- Select a pool β Browse DLMM pools with real-time metrics
- Choose a template β Pick from Conservative, Balanced, or Aggressive strategies
- Get AI guidance β SNAP Score evaluates strategy-pool compatibility
- Test first β Interactive simulator shows potential outcomes
- Deploy instantly β One-click deployment with wallet confirmation
No manual bin configuration. No complex calculations. Just smart, pre-optimized strategies ready to deploy.
Pre-configured DLMM strategies for different risk profiles:
- Conservative: Tight ranges (Β±5%), minimal IL, steady fees
- Balanced: Medium ranges (Β±12.5%), balanced risk/reward
- Aggressive: Wide ranges (Β±25%), maximum fee capture
Each template includes optimized bin count, distribution, and concentration settings.
Real-time evaluation using Google Gemini AI across 4 dimensions:
- Market Fit: Pool volatility and volume analysis
- Efficiency: Capital utilization and fee potential
- Safety: IL risk and range sustainability
- Adaptability: Strategy resilience to market changes
Grade scale: S (90+) β’ A (80+) β’ B (70+) β’ C (60+) β’ D (<60)
Test strategies before deployment:
- Price range sliders with real-time bin visualization
- Live IL, ROI, and fee estimates
- Investment amount scenarios
- Current pool price indicators
Track and manage your DLMM positions:
- Real-time position tracking with in-range/out-of-range status
- Token balances and accumulated fees display
- One-click fee claiming and liquidity removal
- Helpful tooltips explaining position states
- Framework: Next.js 15.5.4 (App Router, React 19, TypeScript)
- DLMM SDK:
@saros-finance/dlmm-sdkv0.0.19 - Blockchain: Solana Devnet
- Wallet:
@solana/wallet-adapter-react(Phantom, Solflare, Backpack) - AI Engine: Google Gemini 1.5 Flash
- Styling: Tailwind CSS v4 with console-inspired aesthetics
- State: Zustand
- UI: Radix UI, Recharts
- Node.js 18+
- Solana wallet (Phantom/Solflare/Backpack)
- Devnet SOL (Get from faucet)
# Clone the repository
git clone https://github.com/nikola0x0/snap-lp.git
cd snap-lp
# Install dependencies
npm install
# Set up environment
cp .env.example .env.local
# Edit .env.local with your Gemini API key
# Run development server
npm run dev# Solana
NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_DLMM_PROGRAM_ID=LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo
# AI (Server-side only)
GEMINI_API_KEY=your_key_here- Connect Wallet - Click "Connect Wallet" in the header
- Select Pool - Browse and choose a DLMM pool
- Pick Template - Select Conservative, Balanced, or Aggressive
- Check SNAP Score - Review AI-powered compatibility analysis
- Simulate (Optional) - Test the strategy with price scenarios
- Deploy - One-click deployment with wallet confirmation
- Manage - Track positions, claim fees, remove liquidity in Portfolio
Console Aesthetic: Inspired by terminal interfaces with a cyberpunk twist
- Colors: Cyan (
#22d3ee), Green (#4ade80), Amber (#fbbf24) - Typography: Abel for UI, Share Tech Mono for data displays
- Layout: Sharp borders, deep blacks, glowing effects
- UX: Clear information hierarchy, minimal clicks to action
src/
βββ app/
β βββ api/ # SNAP Score, pool data APIs
β βββ layout.tsx # Root layout with metadata
β βββ page.tsx # Main dashboard
βββ components/
β βββ dashboard-sections/ # Pools, Templates, Deploy, Portfolio
β βββ strategy-simulator.tsx # Interactive simulator
β βββ snap-score-gauge.tsx # AI score visualization
β βββ wallet-provider.tsx # Solana wallet integration
βββ constants/
β βββ supported-pools.ts # DLMM pool configurations
β βββ strategy-templates.ts # Template definitions
β βββ token-images.ts # Token icon mappings
βββ store/
β βββ app-store.ts # Zustand state management
βββ lib/
βββ dlmm-service.ts # DLMM SDK wrapper
// Centralized service for all DLMM operations
const dlmmService = new LiquidityBookServices({
mode: MODE.DEVNET,
options: { rpcUrl: process.env.NEXT_PUBLIC_SOLANA_RPC_URL },
});
// Get user positions
const positions = await dlmmService.getUserPositions({
payer: publicKey,
pair: pairAddress,
});
// Calculate position amounts from bin reserves
const binsReserve = await dlmmService.getBinsReserveInformation({
position: positionPublicKey,
pair: pairAddress,
payer: publicKey,
});For Users:
- Removes DLMM complexity barrier
- Pre-optimized strategies from day one
- AI guidance for better decisions
- Risk-free testing before deployment
For Developers:
- Educational reference implementation
- Clean DLMM SDK integration patterns
- Reusable template system architecture
- Production-ready code quality
For Ecosystem:
- Increases DLMM adoption
- Reduces bad positions from configuration errors
- Community-driven template marketplace potential
- Foundation for advanced DeFi tools
npm run build
npm startSet environment variables in your deployment platform.
- Mainnet Support - Deploy real strategies with real assets
- Template Marketplace - Community-created strategy sharing
- Auto-Rebalancing - Automated position management bots
- Advanced Analytics - Performance tracking and optimization
- Mobile App - Native iOS/Android experience
- Integration Hub - Connect with other Saros products
MIT License - see LICENSE file for details.
- Saros Finance for the DLMM SDK and ecosystem
- Solana for the infrastructure
- Superteam for the bounty opportunity
- shadcn/ui for beautiful components
Developer: nikola0x0 Live Demo: https://snaplp.vercel.app Repository: https://github.com/nikola0x0/snap-lp
For questions or support:
- Open an issue on GitHub
- Join Saros Dev Station
Built for the Solana & Saros ecosystem
β Star this repo if you find it helpful! β
