SKILL.md--- name: solana-trader description: Solana wallet management and token trading via Jupiter aggregator. Check balances, view transaction history, swap tokens, and manage your Solana portfolio. metadata: {"clawdbot":{"emoji":"🚀","always":true,"requires":{"bins":["curl","jq"]}}} --- # Solana Trader 🚀 A comprehensive Solana wallet management and trading skill for Clawdbot. Manage your Solana portfolio, check balances, view transaction history, and swap tokens using Jupiter DEX aggregator. ## Environment Variables | Variable | Description | Required | |----------|-------------|----------| | `SOLANA_KEYPAIR_PATH` | Path to wallet keypair JSON file | Yes | | `SOLANA_RPC_URL` | Custom RPC endpoint (default: mainnet-beta) | No | | `JUPITER_API_KEY` | Jupiter API key for authenticated requests | No | | `HELIUS_API_KEY` | Helius API key for enhanced transaction data | No | | `SHYFT_API_KEY` | Shyft API key for transaction history | No | | `QUICKNODE_RPC_URL` | QuickNode RPC endpoint | No | | `ALCHEMY_RPC_URL` | Alchemy Solana RPC endpoint | No | ## 🌐 Free Public RPC Endpoints (No API Key Required) | Provider | Endpoint | Notes | |----------|----------|-------| | Solana Foundation | `https://api.mainnet-beta.solana.com` | Official, rate limited | | PublicNode | `https://solana-rpc.publicnode.com` | Privacy-first, fast | | Ankr | `https://rpc.ankr.com/solana` | Free public endpoint | | Project Serum | `https://solana-api.projectserum.com` | Community maintained | > ⚠️ **Rate Limits**: Public endpoints typically limit to ~100 requests/10 seconds. For production or high-frequency trading, use a paid RPC provider. ### RPC Selection Strategy **Default behavior (no API keys configured):** 1. Try `SOLANA_RPC_URL` if set 2. Fall back to free public endpoints in order: - `https://api.mainnet-beta.solana.com` - `https://solana-rpc.publicnode.com` - `https://rpc.ankr.com/solana` **When to upgrade to paid RPC:** - Rate limit errors (429 Too Many Requests) - High-frequency trading or MEV - Need for enhanced transaction data (Helius) - Production applications requiring 99.9% uptime - WebSocket subscriptions for real-time updates **If rate limited**, ask user: "Would you like to configure a paid RPC provider? Options: Helius, QuickNode, Alchemy, Shyft" ## 💎 Referral Fee Configuration This skill includes a small platform fee (0.2%) on swaps to support development. The fee is transparently disclosed to users before each swap. | Variable | Value | Description | |----------|-------|-------------| | `PLATFORM_FEE_BPS` | 20 | 0.2% platform fee (20 basis points) | | `FEE_ACCOUNT` | `8KDDpruBwpTzJLKEcfv8JefKSVYWYE53FV3B2iLD6bNN` | Solana wallet to receive fees | **Fee Breakdown:** - User pays: 0.2% of swap output - Developer receives: 97.5% of fee (0.195%) - Jupiter receives: 2.5% of fee (0.005%) **Example**: On a 100 USDC swap output: - Total fee: 0.20 USDC - You receive: ~0.1