Solana Integration

Key Solana Advantages for Payments

  • High Speed: Near-instant transaction processing.
  • Low Costs: Significantly lower transaction fees compared to EVM chains.
  • Scalability: Reliable performance even with high transaction volume.

Stablecoin-to-Fiat (Off-Ramp) on Solana

Address Activation

Unlike other supported blockchains, Solana off-ramp addresses are initially inactive. They need to be activated by depositing a small amount of SOL to cover rent exemption.

Activation Steps:

  1. Retrieve Off-Ramp Address: Use /user/wallet/{chain} or /corporate/{corporate_uuid}/wallet/{chain} (specifying chain: "solana") to get the user's Solana off-ramp address. The response includes the active status (initially false).

  2. Determine Rent Exemption:

Using Solana CLI:

solana rent 0
# Output: Rent-exempt minimum: 0.00079087 SOL

Using JavaScript:

const { Connection, clusterApiUrl, LAMPORTS_PER_SOL } = require('@solana/web3.js');
const connection = new Connection(clusterApiUrl('mainnet-beta'), 'confirmed');

(async () => {
  const minBalance = await connection.getMinimumBalanceForRentExemption(0);
  console.log(`Rent-exempt minimum: ${minBalance / LAMPORTS_PER_SOL} SOL`);
})();
  1. Transfer SOL for Activation: Transfer the required SOL amount to the retrieved Solana off-ramp address.

  2. Verify Activation: Re-call the wallet endpoint to confirm the active status is now true.

Fiat-to-Stablecoin (On-Ramp) on Solana

Setting the Target Solana Address

  • Existing Users: Use PATCH /user or PATCH /corporate/{corporate_uuid} to update the target_solana_address parameter.
  • New Users: Include target_solana_address during user or corporate creation via POST /user or POST /corporate.

Best Practice: Recommend users provide a rent-exempt target Solana address to avoid potential issues with receiving funds.

Token Preferences

Configure token preferences for Solana using PATCH /user/token-preferences or /corporate/{corporate_uuid}/token-preferences, specifying chain: "solana".

Important: Rent exemption is critical for all Solana transactions. Failing to ensure rent exemption for both off-ramp address activation and user-provided target addresses can lead to transaction failures and potential loss of funds. Always validate and guide users regarding rent exemption.