Skip to main content

AI Development Prompts for Saros

β€œCopy-paste prompts that accelerate your DeFi development” β†’ Get better AI assistance with proven prompt patterns
Effective AI development requires well-crafted prompts. This collection provides battle-tested prompts for common Saros development scenarios, optimized for ChatGPT, Claude, Cursor, and other AI development tools.

🎯 Prompt Categories

Quick Start Prompts

Copy-paste for immediate results

Architecture & Design Prompts

System design and planning

Implementation Prompts

Code generation and development

Debugging & Optimization Prompts

Problem solving and performance

Testing & Documentation Prompts

Quality assurance and docs

πŸš€ Quick Start Prompts

Initial Setup Prompt

I'm building a DeFi application using Saros Finance SDKs on Solana. Here's my project context:

**Project Type**: [Trading interface / Trading bot / Portfolio dashboard / DeFi protocol]
**Primary SDK**: [DLMM TypeScript / DLMM Rust / Main SDK]
**Tech Stack**: [React/Next.js / Node.js / Rust / etc.]
**Experience Level**: [Beginner / Intermediate / Advanced] with [DeFi / Solana / SDK name]

**Immediate Goal**: [Specific task you want to accomplish]

Please help me with Saros SDK integration, following best practices for security, performance, and maintainability. Focus on production-ready code with proper error handling.

Component Generation

Generate a complete [React component / Rust module / Node.js service] for [specific functionality] using Saros [SDK name] that includes:

1. **Core functionality**: [Describe what it should do]
2. **Error handling**: Comprehensive error scenarios and user feedback  
3. **Loading states**: Proper UI feedback during async operations
4. **TypeScript types**: Full type safety (if applicable)
5. **Best practices**: Security, performance, and maintainability
6. **Documentation**: Clear comments explaining the implementation

**Specific requirements**: 
- [List any specific requirements]
- [Performance constraints]
- [Integration requirements]

**Code style**: [Your preferred patterns and conventions]

Quick Fix Prompt

I'm getting this error in my Saros integration:

[Paste your error message here]

**Context**:
- SDK: [DLMM TypeScript / DLMM Rust / Main SDK]
- Operation: [What you were trying to do]
- Code snippet: [Paste relevant code]

Please provide:
1. **Root cause analysis** of this error
2. **Step-by-step fix** with complete code
3. **Prevention strategy** to avoid this in the future
4. **Alternative approaches** if applicable

Focus on production-ready solutions with proper error handling.

πŸ—οΈ Architecture & Design Prompts

System Architecture Review

Review this system architecture for a [project type] using Saros SDKs:

**Current Architecture**:
[Describe or paste your architecture diagram/description]

**Requirements**:
- [Performance requirements]
- [Scalability needs]  
- [Security considerations]
- [Integration constraints]

**Evaluate for**:
1. **Security vulnerabilities** and mitigation strategies
2. **Performance bottlenecks** and optimization opportunities
3. **Scalability limitations** and improvement recommendations
4. **Error handling patterns** and resilience strategies
5. **Maintenance complexity** and simplification opportunities

**Provide**:
- Detailed analysis of each component
- Specific recommendations with rationale
- Implementation priority ranking
- Code examples for key improvements

SDK Selection Guidance

Help me choose the optimal Saros SDK configuration for this project:

**Project Requirements**:
- **Primary use case**: [Describe your main functionality]
- **Performance needs**: [Latency, throughput, etc.]
- **Integration complexity**: [Simple, moderate, complex]
- **Team experience**: [Technical background]
- **Timeline**: [Development timeline]

**Technical Constraints**:
- [Language preferences]
- [Framework requirements]
- [Deployment environment]
- [Maintenance capabilities]

**Provide**:
1. **SDK recommendation** with detailed justification
2. **Alternative options** with trade-off analysis
3. **Implementation timeline** estimates
4. **Resource requirements** (team, infrastructure)
5. **Migration path** if changing from current solution

πŸ’» Implementation Prompts

Feature Implementation

Implement [specific feature] for my Saros-based [application type]:

**Feature Requirements**:
- [Detailed feature description]
- [User experience requirements]
- [Performance expectations]
- [Integration points]

**Technical Requirements**:
- **SDK**: [DLMM TypeScript / DLMM Rust / Main SDK]
- **Framework**: [React / Node.js / Rust / etc.]
- **State management**: [Redux / Zustand / React Context / etc.]
- **Error handling**: [Your preferred patterns]

**Deliverables needed**:
1. **Complete implementation** with all necessary files
2. **Error handling** for all edge cases
3. **Loading states** and user feedback
4. **TypeScript types** (if applicable)
5. **Usage examples** and integration instructions
6. **Testing considerations** and test cases

**Code style**: [Your conventions and preferences]

Integration Pattern

Create a robust integration pattern for connecting [your system] with Saros [specific SDK]:

**Integration Requirements**:
- [What you're integrating]
- [Data flow requirements]
- [Performance constraints]
- [Error handling needs]

**Current System**:
- [Describe your existing architecture]
- [Current libraries and frameworks]
- [Constraints and requirements]

**Provide**:
1. **Integration architecture** with clear data flow
2. **Interface definitions** (TypeScript types or Rust traits)
3. **Error handling strategy** for all failure modes
4. **Performance optimization** techniques
5. **Testing strategy** for integration points
6. **Migration guide** from current implementation

Include complete code examples with proper abstraction layers.

Performance Optimization

Optimize this Saros integration for [specific performance goal]:

**Current Implementation**:
[Paste your current code]

**Performance Goals**:
- [Specific metrics and targets]
- [Critical performance paths]
- [Acceptable trade-offs]

**Constraints**:
- [Memory limitations]
- [Network considerations] 
- [User experience requirements]

**Analysis needed**:
1. **Bottleneck identification** in current implementation
2. **Optimization strategies** with specific techniques
3. **Refactored code** with performance improvements
4. **Performance measurement** strategy and benchmarks
5. **Trade-off analysis** for each optimization
6. **Monitoring recommendations** for production

Focus on maintainable optimizations with clear performance benefits.

πŸ› Debugging & Optimization Prompts

Error Analysis

Analyze this complex error in my Saros integration:

**Error Details**:
[Complete error message and stack trace]

**Context**:
- **SDK**: [DLMM TypeScript / DLMM Rust / Main SDK]
- **Operation**: [What was being attempted]
- **Environment**: [Development / Production / Testing]
- **Frequency**: [How often this occurs]

**Code Context**:
[Relevant code snippets]

**System State**:
- [Relevant system information]
- [Network conditions]
- [Resource usage]

**Please provide**:
1. **Root cause analysis** with detailed explanation
2. **Step-by-step debugging approach** 
3. **Complete fix** with improved error handling
4. **Prevention strategy** to avoid recurrence
5. **Monitoring additions** to catch similar issues early
6. **Alternative implementation** if current approach is flawed

Performance Investigation

Investigate performance issues in this Saros integration:

**Performance Symptoms**:
- [Describe the performance problems]
- [Metrics and measurements]
- [User impact]

**Code Under Investigation**:
[Paste relevant code sections]

**Environment Details**:
- [System specifications]
- [Network conditions]
- [Load characteristics]

**Investigation needed**:
1. **Performance profiling** strategy and tools
2. **Bottleneck identification** with specific locations
3. **Optimization recommendations** prioritized by impact
4. **Refactored implementation** with improvements
5. **Performance testing** approach and benchmarks
6. **Monitoring solution** for ongoing performance tracking

Focus on actionable optimizations with measurable benefits.

πŸ§ͺ Testing & Documentation Prompts

Test Suite Generation

Generate comprehensive tests for this Saros integration:

**Code to Test**:
[Paste your implementation]

**Testing Requirements**:
- **Test types**: [Unit / Integration / E2E]
- **Framework**: [Jest / Vitest / Rust test / etc.]
- **Coverage goals**: [Percentage and critical paths]
- **Mock strategy**: [What to mock and how]

**Generate**:
1. **Unit tests** for all public functions
2. **Integration tests** for Saros SDK interactions
3. **Error scenario tests** for edge cases and failures
4. **Performance tests** for critical paths
5. **Mock implementations** for external dependencies
6. **Test utilities** for common testing patterns

**Include**:
- Clear test descriptions and documentation
- Proper setup and teardown procedures  
- Realistic test data and scenarios
- Assertion strategies for DeFi operations
- Debugging aids for test failures

Documentation Generation

Generate professional documentation for this Saros integration:

**Code to Document**:
[Paste your implementation]

**Documentation Requirements**:
- **Audience**: [Developers / End users / Both]
- **Format**: [Markdown / JSDoc / Rust docs / etc.]
- **Detail level**: [High-level / Detailed / Comprehensive]

**Generate**:
1. **API documentation** with examples for all public interfaces
2. **Integration guide** with step-by-step instructions
3. **Error handling guide** with all possible errors and solutions
4. **Performance considerations** and optimization tips
5. **Security guidelines** and best practices
6. **Migration guide** from alternative implementations

**Include**:
- Clear code examples for common use cases
- Troubleshooting section for common issues  
- Links to relevant Saros documentation
- Performance benchmarks and expectations
- Security considerations and recommendations

🎯 Specialized Domain Prompts

Trading Bot Development

Design and implement a sophisticated trading bot using Saros DLMM Rust SDK:

**Bot Requirements**:
- **Strategy**: [Describe your trading strategy]
- **Risk management**: [Risk parameters and controls]
- **Performance targets**: [Latency, throughput, accuracy]
- **Capital management**: [Position sizing, diversification]

**Technical Requirements**:
- **MEV protection**: Advanced protection strategies
- **Multi-pool support**: Cross-pool arbitrage capabilities
- **Error recovery**: Comprehensive error handling and recovery
- **Monitoring**: Real-time performance and health monitoring

**Deliverables**:
1. **Complete bot architecture** with modular design
2. **Strategy implementation** with proper risk controls
3. **Execution engine** optimized for performance
4. **Monitoring and alerting** system
5. **Configuration management** for different environments
6. **Deployment guide** for production environments

Focus on production-ready, institutional-grade implementation.

DeFi Analytics Dashboard

Build a comprehensive analytics dashboard for DeFi portfolio management using Saros SDKs:

**Dashboard Requirements**:
- **Data sources**: [Pools, positions, historical data]
- **Metrics**: [Performance, risk, yield optimization]
- **User experience**: [Real-time updates, responsive design]
- **Export capabilities**: [Reports, data export formats]

**Technical Stack**:
- **Frontend**: [React / Next.js / etc.]
- **Backend**: [Node.js / Python / Rust]
- **Database**: [PostgreSQL / MongoDB / etc.]
- **Real-time**: [WebSocket / SSE implementation]

**Implementation plan**:
1. **Data architecture** for efficient analytics
2. **Real-time data pipeline** with Saros SDK integration
3. **Analytics calculations** with performance optimization
4. **Dashboard UI** with professional design
5. **Export functionality** for institutional reporting
6. **Deployment and scaling** strategy

Include code for all major components with proper error handling.

πŸš€ Usage Guidelines

Effective Prompt Engineering

βœ… Best Practices:
  • Be specific about your requirements and constraints
  • Provide context about your project and experience level
  • Include code samples when asking for debugging help
  • Specify output format (code, explanation, documentation)
  • Ask for alternatives to get multiple approaches
❌ Common Mistakes:
  • Vague requirements without specific goals
  • Missing context about your development environment
  • Asking for generic solutions without project specifics
  • Not specifying error handling or security requirements
  • Ignoring performance and scalability considerations

Iterative Improvement

  1. Start with base prompt from this collection
  2. Customize for your specific needs and context
  3. Test the generated code thoroughly
  4. Refine the prompt based on results
  5. Share improvements with the community

🀝 Community Contributions

Share your successful prompts: Contributing guidelines:
  • Test prompts with multiple AI systems
  • Include context about what works well
  • Provide example outputs when helpful
  • Document any limitations or edge cases

Ready to accelerate your development? Start with the Quick Start Prompts or explore Claude Code and Cursor integration guides.