# Solana Swap API

Broker as a Service (BaaS) swaps SOL and the listed SPL tokens on Solana to and from every other supported chain, through the REST API and the [MCP server](https://docs.chainflip-broker.io/resources/ai-documentation/). This page collects what is specific to Solana: minimums and token mints, addresses, deposits and refunds, vault swaps and pitfalls. For the general flow, start with [Starting a Swap](https://docs.chainflip-broker.io/features/start-swap/) and [View Available Assets](https://docs.chainflip-broker.io/features/view-assets/).

## Assets and minimums

| Asset | id | Decimals | Minimum | Native minimum | Contract |
| --- | --- | ---: | ---: | --- | --- |
| SOL | `sol.sol` | 9 | 0.068 SOL | `68000000` | — |
| USDC | `usdc.sol` | 6 | 10 USDC | `10000000` | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` |
| USDT | `usdt.sol` | 6 | 10 USDT | `10000000` | `Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB` |

*Snapshot captured on 2026-11-17 from the production [`/assets`](https://docs.chainflip-broker.io/features/view-assets/) endpoint. Minimums are Chainflip's current source (ingress) minimum deposit amounts; query `/assets` for live values. Destination-side egress minimums depend on fees and are not in `/assets`; see [Error Codes](https://docs.chainflip-broker.io/features/error-codes/) for `egress_below_minimum` and `egress_fee_not_covered`. `minimalAmountNative` is in the asset's smallest unit (lamports for SOL). Assets disabled upstream are omitted.*

The Contract column is the token's mint address.

## Addresses

BaaS accepts a Solana address in base58 that decodes to exactly 32 bytes. The 64-character hex form that Chainflip's broker API also accepts is rejected by BaaS, so always pass base58.

A destination address is checked with the destination asset's rules and a refund address with the source asset's, so a Solana `refundAddress` is required when the source asset is on Solana.

## Deposits and refunds

A [`/swap`](https://docs.chainflip-broker.io/features/start-swap/) call opens a deposit channel and returns the `address` the user sends the source asset to.

* Deposit channels close after 24 hours. Open a new channel for every deposit-channel swap and send the deposit immediately ([Chainflip: closure of deposit channels](https://docs.chainflip.io/brokers/broker-deposit-channels-swaps#closure-of-deposit-channels)).
* `minimumPrice` and `refundAddress` are required.
* `retryDurationInBlocks` is optional: omitted or negative, it is the 150-block (15-minute) default, and a value above Chainflip's current runtime limit is lowered to that limit. Use the quote's `recommendedRetryDurationInBlocks`.
* If the minimum price or live price protection is not met within the retry window, the source asset is refunded to `refundAddress`. For DCA, only unexecuted chunks are refunded; executed chunks still pay out to the destination.

See [Starting a Swap](https://docs.chainflip-broker.io/features/start-swap/#slippage-protection) and Chainflip's [Swapping Basics](https://docs.chainflip.io/protocol/swapping-basics#slippage-protection).

Chainflip's [ingress table](https://docs.chainflip.io/protocol/ingress-witnessing-deposits#the-witness-process) waits for the finalized commitment on Solana, about 12 seconds. Show users the quote's `estimatedDurationSeconds` rather than a fixed number.

## Vault swaps

A Solana vault swap is a call to Chainflip's Swap Endpoint program that your application or the user's wallet signs and submits; there is no deposit channel. [`/tx-payload/solana`](https://docs.chainflip-broker.io/features/tx-payload/) returns the `programId`, `accounts` and `data` of the instruction. Besides `sourceAmount`, `minimumPrice`, `refundAddress` and `retryDurationInBlocks`, it requires:

* `sourceAddress` - the account that signs and pays for the swap.
* `eventDataAccount` - the address of the event data account, already derived. BaaS takes the account itself and has no seed parameter; the seed Chainflip's protocol documentation describes is only how you derive it.
* `sourceTokenAccount` - optional, for an SPL token source: the token account of `sourceAddress` the tokens are sent from, normally its associated token account (ATA).

The Swap Endpoint program creates the event data account in the submitted transaction, and the user pays its rent. Once the swap is processed, Chainflip closes the account and returns the rent. BaaS does not create the associated token account: it must already exist and hold the tokens.

See Chainflip's [Solana Vault Swaps](https://docs.chainflip.io/brokers/vault-swaps-api/solana) for the protocol details.

Boost is documented for Bitcoin deposits; see the [Bitcoin page](https://docs.chainflip-broker.io/chains/bitcoin/#boost).

## Known pitfalls

* **Unvalidated accounts.** BaaS checks only the destination and refund addresses of a vault swap. A wrong `sourceAddress`, `eventDataAccount` or `sourceTokenAccount` is passed on as given and fails later, at the broker or on chain.
* **Rent.** The sender needs enough SOL for the event data account's rent on top of the swap and the transaction fee; the rent comes back after the swap.
* **Token account.** For an SPL token source the token account must exist; BaaS does not create it.
* **Base58 only.** Hex-encoded Solana addresses are rejected.
* **Finalized deposits.** Deposits count only once finalized, so allow the quote's duration before treating a swap as stuck.

## Related

* [Starting a Swap](https://docs.chainflip-broker.io/features/start-swap/)
* [Vault Swap Transaction Payloads](https://docs.chainflip-broker.io/features/tx-payload/)
* [View Available Assets](https://docs.chainflip-broker.io/features/view-assets/)
* [View Available Networks](https://docs.chainflip-broker.io/features/view-networks/)
* [Error Codes](https://docs.chainflip-broker.io/features/error-codes/)
* [Testing Environment](https://docs.chainflip-broker.io/environments/testing/)
* [Solana Hackathon](https://docs.chainflip-broker.io/guides/solana-hackathon/)
