- Overview
- Key Features
- Technology Stack
- Setup and Installation
- Usage
- Configuration Options
- How It Works
- Current Challenges
- Contributing
- License
- Disclaimer
SolCycle is an automated trading system for Solana (SOL) that helps users optimize their trading strategy through intelligent market cycle management. The system automatically converts between SOL and stablecoins based on market conditions, implementing dynamic stop-loss mechanisms to preserve capital during downturns and capitalize on upswings.
SolCycle features an intelligent dynamic stop loss that automatically adjusts based on market conditions:
- Continuously tracks the current price of SOL
- When current price exceeds stopLoss + stopLossAdjustment, the system updates
- The stopLoss becomes currentPrice - stopLossAdjustment
- This ensures your stop loss is always dynamically trailing the highest price, maximizing profits
- Preserves capital during market downturns by converting to stablecoins
- Automates buy-back at better prices, improving your overall cost basis
- Eliminates emotional trading decisions, preventing costly panic sells or FOMO buys
- Runs 24/7, capturing opportunities while you sleep or focus on other activities
- Language: Go
- Blockchain: Solana
- DEX Integration: Jupiter (for optimal swap routing and execution)
- RPC Provider: Helius
- Go 1.18 or higher
- Solana CLI tools (optional but recommended)
- A Solana wallet with SOL and some USDC/USDT for transactions
- Clone the repository:
git clone https://github.com/yourusername/sol-cycle.git
- Navigate to the project directory:
cd sol-cycle
- Install the dependencies:
go mod download
-
Create a
.env
file in the root directory with the following variables:# Solana Configuration PRIVATE_KEY=your_private_key_here RPC_ENDPOINT=your_rpc_endpoint_here
Note: Never commit your
.env
file to version control. It's already added to.gitignore
. -
Customize your trading parameters in the configuration file (details in the Configuration section).
-
Run the main script:
go run main.go
-
Monitor the logs to see the trading activity and performance.
SolCycle offers several configuration options to customize your trading strategy:
stopLossPercentage
: Initial stop loss percentage from entry pricestopLossAdjustment
: Amount to trail the highest price bytradingPair
: The trading pair to monitor (default: SOL/USDC)swapAmount
: Amount of SOL to swap on each triggercheckInterval
: How often to check prices (in seconds)
- SolCycle continuously monitors the price of SOL using the Helius RPC endpoint
- When the price drops below your dynamic stop loss, it automatically swaps SOL to stablecoins using Jupiter for optimal routing
- When market conditions improve, it can automatically buy back SOL at better prices
- The dynamic stop loss continuously adjusts to protect your gains while allowing for upside potential
While SolCycle's core functionality works effectively, we're actively addressing the following challenges:
The primary challenge we're currently facing is optimizing transaction costs:
- Gas Fees: Each swap operation incurs gas fees on the Solana network
- DEX Fees: Jupiter routing includes fees for liquidity providers
- Long-term Economics: For extended operation, these fees can accumulate and impact overall profitability
We're actively working on solutions to reduce these costs:
- Implementing batched transactions where possible
- Optimizing transaction timing to target lower network congestion periods
- Exploring fee-efficient routing strategies
- Investigating minimum viable swap amounts to balance transaction costs against potential gains
These optimizations are critical for making SolCycle more economical for long-term operation, especially for users with smaller portfolios or during periods of high network activity.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature-branch
) - Open a Pull Request
This project is licensed under the MIT License.
Trading cryptocurrencies involves risk. This software is provided as-is with no guarantees. Always do your own research and use at your own risk.