Solana Support - Relay

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Relay now fully supports depositing & withdrawing to Solana from any EVM chain we support. This is a great way to get users funds on Solana to complete transactions. You can onboard users funds from Blast ETH to Solana USDC to make transactions on a game. You could also swap funds from Solana SOL to Zora ETH for users to mint. The possibilities are limitless when you use Relay embedded in your app.

Required Information

There are few things that make transacting on Solana different than another EVM chain. The provided information below should review all the exceptions where your input is Solana specific.

Solana wallet addresses are case sensitive.

SDK Properties

Action Parameter Input Description
Deposit to Solana toChainId 792703809 Chain ID assigned to access Solana for Relay’s tools.
recipient User’s Solana Address Must be a valid Solana address. Do not use an Ethereum wallet address. Case Sensitive
toCurrency Contract Address of Solana Token Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter.
Withdraw from Solana chainId 792703809 Chain ID assigned to access Solana for Relay’s tools.
currency Contract Address of Solana Token Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter.

When withdrawing from Solana using the SDK, you will not need to specify the depositing wallet address.

Solana Tokens

In the table, we have provided the most frequently used Solana tokens & their contract addresses. We do support all tradeable tokens on Jupiter.

Solana token addresses are case sensitive.

Token Token Address Token Symbol Decimals
SOL 11111111111111111111111111111111 SOL 9
USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v USDC 6
wSol So11111111111111111111111111111111111111112 wSOL 9
USDT Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB USDT 6

Relay supports any Solana token available on Jupiter. You can visit Jupiter to explore all the tokens available.

API

Params

Action Parameter Input Description
Deposit to Solana recipient User’s Solana Address Must be a valid Solana address. Do not use an Ethereum wallet address. Case Sensitive
destinationChainId 792703809 Chain ID assigned to access Solana for Relay’s tools.
destinationCurrency Contract Address of Solana Token Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter.
Withdraw from Solana user User’s Solana Address Must be a valid Solana address. Do not use an Ethereum wallet address. Case Sensitive
originChainId 792703809 Chain ID assigned to access Solana for Relay’s tools.
originCurrency Contract Address of Solana Token Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter.

Execution

Once you have the necessary information, you can start utilizing our API for full Solana withdrawal and deposit support. To get started, check out the execution steps of our API. Then when you’re ready to swap, head over to the Get Quote API endpoint. Please note that instead of the usual calldata returned with EVM transactions, there’s different calldata that needs to be handled accordingly.

Example: Deposit to Solana from Base

Request

Response

curl -X POST "https://api.relay.link/quote/v2" \
  -H "Content-Type: application/json" \
  -d '{\n    "user": "0x03508bb71268bba25ecacc8f620e01866650532c",\n    "originChainId": 8453,\n    "originCurrency": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",\n    "destinationChainId": 792703809,\n    "destinationCurrency": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",\n    "recipient": "GTtzwxqy67xx9DVESJjx28TgXqpc8xTqtiytgNMaQBTE",\n    "tradeType": "EXACT_INPUT",\n    "amount": "10000000"\n  }'
{
  "steps": [
    {
      "id": "approve",
      "action": "Confirm transaction in your wallet",
      "description": "Sign an approval for USDC",
      "kind": "transaction",
      "requestId": "0x44c1ba1053b2403c5e7024140b73e4a08a7c9d7d0bf985a9755d55d8a9d771f5",
      "items": [
        {
          "status": "incomplete",
          "data": {
            "from": "0x03508bb71268bba25ecacc8f620e01866650532c",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "chainId": 8453
          }
        }
      ]
    },
    {
      "id": "deposit",
      "action": "Confirm transaction in your wallet",
      "description": "Depositing funds to the relayer to execute the swap for USDC",
      "kind": "transaction",
      "requestId": "0x44c1ba1053b2403c5e7024140b73e4a08a7c9d7d0bf985a9755d55d8a9d771f5",
      "depositAddress": "",
      "items": [
        {
          "status": "incomplete",
          "data": {
            "from": "0x03508bb71268bba25ecacc8f620e01866650532c",
            "to": "0x4cd00e387622c35bddb9b4c962c136462338bc31",
            "chainId": 8453
          },
          "check": {
            "endpoint": "/intents/status/v3?requestId=0x44c1ba1053b2403c5e7024140b73e4a08a7c9d7d0bf985a9755d55d8a9d771f5",
            "method": "GET"
          }
        }
      ]
    }
  ],
  "fees": {
    "gas": {
      "currency": {
        "chainId": 8453,
        "address": "0x0000000000000000000000000000000000000000",
        "symbol": "ETH",
        "name": "Ether",
        "decimals": 18,
        "metadata": {
          "logoURI": "https://assets.relay.link/icons/1/light.png",
          "verified": true
        }
      },
      "amount": "286882212616",
      "amountFormatted": "0.000000286882212616",
      "amountUsd": "0.000614",
      "minimumAmount": "286882212616"
    },
    "relayer": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694",
          "verified": true
        }
      },
      "amount": "261358",
      "amountFormatted": "0.261358",
      "amountUsd": "0.261273",
      "minimumAmount": "261358"
    }
  },
  "details": {
    "operation": "swap",
    "sender": "0x03508bb71268bba25ecacc8f620e01866650532c",
    "recipient": "GTtzwxqy67xx9DVESJjx28TgXqpc8xTqtiytgNMaQBTE",
    "currencyIn": {
      "currency": {
        "chainId": 8453,
        "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694",
          "verified": true
        }
      },
      "amount": "10000000",
      "amountFormatted": "10.0",
      "amountUsd": "9.996730",
      "minimumAmount": "10000000"
    },
    "currencyOut": {
      "currency": {
        "chainId": 792703809,
        "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "metadata": {
          "logoURI": "https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694",
          "verified": true
        }
      },
      "amount": "9738642",
      "amountFormatted": "9.738642",
      "amountUsd": "9.735457",
      "minimumAmount": "9543870"
    },
    "timeEstimate": 1
  }
}

Transaction Size Optimization

Solana transactions have a hard 1232-byte size limit. Wallets and SDKs prepend compute-budget instructions to the transaction at send time, which consume up to 60 bytes. Relay reserves that headroom at quote time, so the effective quote-time limit is 1172 bytes. If additional custom instructions (e.g., for tracking, fee collection, or other logic) push the transaction past 1232 bytes at send time, it will fail. When a Solana-origin quote is routed through a third-party aggregator and the generated deposit transaction would exceed 1172 bytes, POST /quote/v2 returns a 400 response instead of a successful quote with calldata that cannot be executed. Use the mitigations below to keep transactions under the limit. Pass maxRouteLength in your quote request to limit the number of hops in the Solana swap routing. Fewer hops means a smaller transaction. Recommended values:

maxRouteLength When to use
4 Start here. Works for most integrations.
3 Use if transactions are still too large with 4.

As a last resort, you can also pass "includedOriginSwapSources": ["jupiter"] in the quote request. Jupiter tends to return smaller instructions, but this may limit available routes.

curl -X POST "https://api.relay.link/quote/v2" \
  -H "Content-Type: application/json" \
  -d '{\n    "user": "0x03508bb71268bba25ecacc8f620e01866650532c",\n    "originChainId": 8453,\n    "originCurrency": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",\n    "destinationChainId": 792703809,\n    "destinationCurrency": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",\n    "recipient": "GTtzwxqy67xx9DVESJjx28TgXqpc8xTqtiytgNMaQBTE",\n    "tradeType": "EXACT_INPUT",\n    "amount": "10000000",\n    "maxRouteLength": 4\n  }'

For the full list of quote parameters, see the Get Quote API reference.

SDK

To use the SDK with Solana, install and configure the SVM wallet adapter. The adapter handles transaction signing and broadcasting.

npm install @relayprotocol/relay-svm-wallet-adapter

For implementation details and code samples, see the Adapters documentation.