Solana Operations
Balance Requirements
When performing transactions on Solana, it's crucial to maintain minimum SOL balances in both source and destination addresses:
- Minimum Balance: 0.00089088 SOL (890,880 lamports)
- This minimum balance is required to:
- Keep the account rent-exempt
- Allow for future transactions
- Maintain account viability on the network
Transaction Behavior
Sweep Operation
The SweepSolanaWalletAddress service automatically ensures this minimum balance is maintained by:
- Calculating the maximum amount that can be swept while leaving the minimum balance
- Preventing transactions that would leave either address with less than the minimum
- Logging warnings when balances are insufficient for sweeping
Example Calculation
If an address has 0.001 SOL:
- Minimum required: 0.00089088 SOL
- Available for sweep: 0.00010912 SOL (0.001 - 0.00089088)
If the balance is less than or equal to 0.00089088 SOL, the sweep operation will not proceed to protect the account's viability.
Implementation Details
Key Derivation
Solana addresses are derived using the following BIP44 path:
m/44'/501'/{account_index}'/0'Where:
44'- BIP44 purpose501'- Solana coin type{account_index}'- Account index (0 for main account)0'- Change (always 0 for Solana)
Important Notes
- Always ensure both sending and receiving addresses maintain at least 0.00089088 SOL
- This minimum balance requirement is separate from transaction fees
- When implementing new transaction types, remember to account for this minimum balance requirement
- All amounts in transactions should consider this minimum balance to prevent account deactivation
