Overview

Every transaction on the Solana blockchain requires a small network fee, similar to credit card processing fees but much smaller.

Fee configuration is a required parameter for all transaction requests in the Squads API - transactions will fail if fee configuration is not provided. On Squads APIs, you can:

  • Pay fees in USDC, USDT, or SOL
  • View exact fee amounts before confirming
  • Configure which signer pays the fees or pay the fees from the Smart Account

Fee Configuration

Fee configuration must be included in every transaction request. Here’s how to specify it:

USDC

The simplest way to pay fees. Most customers use USDC.

{
  "fee_config": {
    "currency": "usdc",
    "payer_address": "5iWt8..."
  }
  // ... other request parameters ...
}

SOL

Solana’s native currency.

{
  "fee_config": {
    "currency": "sol",
    "payer_address": "5iWt8..."
  }
  // ... other request parameters ...
}

Fee Response

After processing a transaction request, you’ll receive detailed fee information:

{
  "fee": {
    "amount": "1000000", // Base unit amount (e.g., USDC with 6 decimals)
    "amount_decimal": "1.0", // Human-readable amount
    "currency": "usdc", // The currency used for the fee
    "sol_equivalent": {
      "amount": "5000", // Amount in lamports (SOL's smallest unit)
      "amount_decimal": "0.000005" // Human-readable SOL amount
    }
  }
}

Technical Details

For developers who need them, here are the full currency specifications:

USDC

  • Currency Code: usdc
  • Mint Address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
  • Decimals: 6

USDT

  • Currency Code: usdt
  • Mint Address: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
  • Decimals: 6

SOL

  • Currency Code: sol
  • Mint Addresses:
    • 11111111111111111111111111111111
    • So11111111111111111111111111111111111111112
  • Decimals: 9

Common Questions

Can I sponsor fees for users?

Yes, you can sponsor fees for users by setting the payer_address in the fee_config to your address.

Which currency should I use?

Most customers use USDC for simplicity. However, both SOL and USDC options are fully supported and you can choose based on your needs.