Package Overview
The Saros Main SDK provides a comprehensive toolkit for building complete DeFi protocols on Solana. This SDK enables developers to create full-featured DeFi ecosystems with traditional AMM trading, yield farming, staking, and governance - all integrated into a cohesive protocol architecture.What is the Main SDK?
The Main SDK provides a complete DeFi ecosystem foundation, integrating proven traditional AMM mechanics with advanced features like yield farming, governance, and staking into a cohesive protocol architecture. Core Features:- Traditional AMM - Proven constant product (x × y = k) mechanics with uniform liquidity
- Yield Farming - Multi-token farming strategies with configurable rewards
- Governance - Token-weighted voting and proposal execution systems
- Staking - Single and multi-asset staking pools with reward distribution
- Complete Ecosystem - All DeFi primitives integrated and working together
- Battle-Tested - Traditional AMM mechanics proven across market cycles
- User-Friendly - Simple, predictable mechanics accessible to all users
- Modular Architecture - Use components independently or together
Package Details
| Aspect | Details |
|---|---|
| Package | @saros-finance/sdk |
| Version | v2.4.0+ |
| Networks | Solana Devnet, Mainnet-beta |
| Language | JavaScript (ES6+) |
| Framework | Protocol-agnostic |
| License | ISC |
Installation
Required Dependencies: The Main SDK requires Solana Web3.js for blockchain interactions and Wallet Adapter Base for wallet integration. Both packages are essential for full DeFi functionality.
Quick Start Example
Use Cases
Traditional AMM Protocol- ✅ Launch token with constant product AMM trading
- ✅ Create farming incentives with multi-token rewards
- ✅ Implement staking pools for additional utility
- ⏳ Governance system (planned, not yet implemented)
- ✅ Support multiple trading pairs with AMM mechanics
- ✅ Farming rewards across asset categories
- ✅ Liquidity provision with deposit/withdraw functions
- ⏳ Advanced treasury management (planned)
- ✅ Build on proven constant product AMM formulas
- ✅ Integrate yield farming with customizable rewards
- ✅ Access low-level swap and liquidity functions
- ✅ Support for custom pool configurations
Current SDK Status: The SDK provides full AMM trading, farming, and staking functionality. Governance features are documented but not yet implemented in the current version (v2.4.0).
Your Journey to Complete DeFi Protocol Development
Follow this structured path to master comprehensive DeFi development. Each step builds on the previous one, taking you from DeFi beginner to advanced protocol architect.🎓 Learn DeFi Fundamentals
Start here if you’re new to DeFi development or building your first protocol
🛠️ Build Complete DeFi Features
Use these when you have specific DeFi features to implement
AMM Swaps
Traditional AMM trading implementation
Liquidity Management
Pool creation and liquidity provision systems
Yield Farming
Farming rewards and incentive mechanisms
Governance & Staking
Voting systems and staking infrastructure
DeFi Protocols
Building complete multi-feature DeFi protocols
Advanced Features
Cross-protocol integrations and advanced mechanics
📚 Reference & API Details
Quick lookup for methods, types, and API details during development
💡 Deep DeFi Understanding
Deep dive into DeFi concepts, architecture, and design decisions
DeFi Ecosystem Components
Traditional AMM Trading
Yield Farming Infrastructure
Governance System
Staking Mechanisms
Architecture Advantages
Unified Integration
- Cross-Module Synergies - AMM fees fund farming rewards, staking provides governance power
- Consistent User Experience - Same wallet, same interface across all features
- Simplified Development - One SDK handles entire DeFi protocol stack
Battle-Tested Mechanics
- Proven AMM Formula - Constant product mechanics tested across market cycles
- Predictable Behavior - Well-understood risks and returns for users
- Regulatory Clarity - Traditional mechanics have clearer regulatory precedents
Community-Focused Design
- Broad Accessibility - No specialized knowledge required to participate
- Democratic Governance - Equal access to protocol decision-making
- Inclusive Economics - Rewards distributed across entire community
Use Case Examples
Community DeFi Protocol- Launch token with AMM trading
- Create farming incentives for early adopters
- Implement governance for community control
- Add staking for additional utility
- Support 20+ trading pairs with uniform experience
- Farming rewards across multiple asset categories
- Treasury management through governance voting
- Cross-asset staking and reward distribution
- Familiar AMM mechanics for TradFi users
- Predictable yield farming similar to CD rates
- Democratic governance resembling shareholder voting
- Staking similar to dividend-earning stocks
Performance Characteristics
Traditional AMM Metrics (compared to DLMM):| Metric | Main SDK | DLMM | Trade-off |
|---|---|---|---|
| Capital Efficiency | 1x (baseline) | 10-100x | Simplicity vs Efficiency |
| User Complexity | Low | High | Accessibility vs Optimization |
| Predictability | High | Variable | Consistency vs Maximum Yield |
| Management Required | None | Active | Passive vs Active Returns |
Community & Resources
- Documentation: docs.saros.xyz/main-sdk
- NPM Package: @saros-finance/main-sdk
- GitHub: saros-finance/main-sdk
- Developer Community: Saros Developer Station
- Examples Repository: GitHub Examples