SaroScope is a DLMM backtesting platform for Solana's Dynamic Liquidity Market Makers. Built with the Saros Finance SDK, it enables users to backtest strategies against historical data, compare performance, and optimize liquidity provision decisions through advanced analytics and real-time pool monitoring.
-
π Advanced Backtesting Engine
Test DLMM strategies against comprehensive historical data with precision analytics and detailed performance metrics. -
π― Smart Range Optimization
-
Our analysis identifies the most profitable price ranges for liquidity positions.
-
π Real-Time Analytics
Monitor DLMM positions with live data feeds, instant performance tracking, and real-time market insights. -
π Strategy Comparison
Compare multiple DLMM strategies side-by-side with detailed performance metrics, APY calculations, and risk assessments. -
π§ Pool Health Monitoring
Track pool liquidity, volume, and activity levels to identify optimal entry points. -
π¨ Interactive Visualizations
Beautiful charts and graphs powered by Recharts and custom Rive animations for enhanced user experience. -
π± Mobile responsive
SarosScope supports accesibility across all devices.
Click the thumbnail above to watch the full demo (3:53)
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Animations: Rive (interactive animations), Custom CSS animations
- Charts & Visualizations: Recharts, Custom chart components
- Blockchain Integration: @saros-finance/dlmm-sdk, @solana/web3.js
- Data Services: Custom price data services, Jupiter API integration
- UI Components: Lucide React icons, Custom component library
- Node.js (v18+ recommended)
- npm or yarn package manager
- Solana RPC endpoint (recommended: Helius)
- Basic understanding of DeFi and liquidity provision
-
Clone the repository:
git clone https://github.com/yourusername/soradlmm.git cd soradlmm/app -
Install Dependencies
npm install
-
Environment Configuration
Create a
.env.localfile in the app directory:# Solana RPC Configuration NEXT_PUBLIC_SOLANA_RPC_URL=https://api.mainnet-beta.solana.com NEXT_PUBLIC_SOLANA_NETWORK=mainnet-beta # Optional: Custom RPC endpoints for better performance NEXT_PUBLIC_HELIUS_RPC_URL=your_helius_endpoint NEXT_PUBLIC_QUICKNODE_RPC_URL=your_quicknode_endpoint # Price Data APIs NEXT_PUBLIC_JUPITER_API_URL=https://price.jup.ag/v4 NEXT_PUBLIC_BIRDEYE_API_URL=https://public-api.birdeye.so/public
-
Start Development Server
npm run dev
-
Build for Production
npm run build npm start
soradlmm/
βββ app/
β βββ app/
β β βββ api/
β β β βββ price-data/
β β β βββ route.ts
β β βββ components/
β β β βββ sections/
β β β β βββ bentoGrid.tsx # Interactive feature cards
β β β β βββ heroSection.tsx # Landing page hero
β β β β βββ problemStatement.tsx # Problem/solution section
β β β β βββ saros.tsx # Saros protocol info
β β β β βββ faq.tsx # FAQ section
β β β β βββ footer.tsx # Footer component
β β β βββ BacktesterForm.tsx # Main backtesting form
β β β βββ ResultsDisplay.tsx # Results visualization
β β β βββ ComparisonChart.tsx # Strategy comparison charts
β β β βββ PerformanceChart.tsx # Performance line charts
β β β βββ RangeVisualization.tsx # Price range visualization
β β β βββ StrategyComparison.tsx # Strategy comparison logic
β β βββ dashboard/
β β β βββ page.tsx # Dashboard page
β β βββ lib/
β β β βββ sarosService.ts # Saros SDK integration
β β β βββ backtester.ts # Backtesting engine
β β β βββ priceDataService.ts # Price data fetching
β β β βββ utils.ts # Utility functions
β β βββ types/
β β β βββ index.ts # TypeScript definitions
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β βββ public/
β β βββ assets/ # Static assets
β β βββ *.riv # Rive animation files
β β βββ *.svg # SVG icons
β βββ package.json
β βββ next.config.ts
β βββ tsconfig.json
β βββ tailwind.config.js
βββ README.md
- Historical Data Analysis: Uses real Solana network price data for accurate backtesting
- Multiple Strategy Types: Concentrated, Wide Range, and Active Rebalancing strategies
- Performance Metrics: ROI, APY, time in range, impermanent loss calculations
- Risk Assessment: Pool health monitoring and liquidity analysis.
- Live Price Feeds: Jupiter and Birdeye API integration for real-time market data
- Pool Monitoring: Real-time tracking of Saros DLMM pool metrics
- Dynamic Calculations: SDK-powered fee and liquidity calculations
- Strategy Comparison Charts: Side-by-side performance comparison
- Price Range Visualization: Interactive charts showing optimal liquidity ranges
- Performance Tracking: Historical performance with detailed metrics
- Rive Animations: Smooth, interactive animations for enhanced UX
The platform supports both mainnet and devnet configurations:
// Mainnet pools (production)
const MAINNET_POOLS = {
'SOL/USDC': {
address: '8vZHTVMdYvcPFUoHBEbcFyfSKnjWtvbNgYpXg1aiC2uS',
baseTicker: 'SOL',
quoteTicker: 'USDC'
}
// Add more pools as needed
};For better performance, configure custom RPC endpoints in your environment variables:
# High-performance RPC endpoints
NEXT_PUBLIC_HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=your-key
NEXT_PUBLIC_QUICKNODE_RPC_URL=https://your-endpoint.solana-mainnet.quiknode.pro/your-key/- Description: High-yield strategy with tight price ranges
- Best For: Experienced users with high risk tolerance
- Features: Custom range selection, high APY potential
- Description: Conservative strategy with broader price ranges
- Best For: Beginners and risk-averse users
- Features: Lower risk, more stable returns
- Description: Dynamic strategy that adjusts ranges based on market conditions
- Best For: Active traders who can monitor positions
- Features: Automated rebalancing, threshold-based adjustments
// Example backtest configuration
const backtestParams = {
investmentAmount: 5000,
strategyType: StrategyType.CONCENTRATED,
tokenPair: 'SOL/USDC',
concentrationRange: { min: 49, max: 52 },
timePeriod: 30 // days
};// Compare multiple strategies
const strategies = [
StrategyType.CONCENTRATED,
StrategyType.WIDE,
StrategyType.ACTIVE_REBALANCING
];
// Get comparative results
const results = await compareStrategies(backtestParams, strategies);npm run lint # ESLint checking
npm run build # Production build
npm run dev # Development server- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and ensure build passes
- Submit a pull request
- Lazy Loading: Components are loaded on demand
- Data Caching: Price data is cached for better performance
- Optimized RPC Calls: Batched requests and connection pooling
- Bundle Optimization: Next.js automatic code splitting
- RPC Endpoint Security: Use secure, private RPC endpoints for production
- API Key Management: Store sensitive keys in environment variables
- Input Validation: All user inputs are validated and sanitized
- Error Handling: Comprehensive error handling prevents data leaks
- Saros Finance SDK: Official Documentation
- Solana Web3.js: Official Documentation
- Next.js: Official Documentation
For technical support or questions:
- Create an issue in the GitHub repository
- Join our Discord community
- Check the FAQ section in the application
This project is licensed under the MIT License - see the LICENSE file for details.
- Saros Finance for the DLMM SDK and protocol
- Solana Foundation for the blockchain infrastructure
- Jupiter and Birdeye for price data APIs
- Rive for the interactive animations
Built with β€οΈ for the DeFi community
