Solana (Jupiter)
Buy Solana tokens that 1Click doesn't list, via a Jupiter swap run by the user's Solana intermediary.
A user on any chain buys a Solana token that 1Click doesn't list: JitoSOL, BNSOL, JUP, JLP, RENDER, BP, JupSOL, USDe, PYTH or RAY. Their funds are bridged to USDC on Solana, then swapped on Jupiter by their Solana intermediary account, where the tokens stay. Later they can sell them back to USDC or withdraw USDC to any Solana wallet.
At a glance
Destination
Solana
Protocol
Jupiter v6 swap (JUP6Lkb…aV4), built through the Jupiter Swap API
Bridged asset
USDC on Solana (EPjF…Dt1v)
Output
The bought token, in the user's Solana intermediary
Flow / fee
Buy: bridge-in · threeRound (0.25% reserve) · fee in USDC. Sell and withdraw: steps-only
Slippage budget
1% total: 0.25% bridge, 0.25% reserve, 0.5% Jupiter
Server
A proxy keeps JUPITER_API_KEY off the client. A read-only RPC proxy handles balance reads
What the user does
Connects an EVM or Solana wallet and picks a source token and amount.
Picks the token to buy.
Clicks Get quote and sees the estimated and minimum purchase, the network fee in USDC, and the Jupiter route. The quote is valid for 30 s.
Clicks Buy. The quote is refreshed. If the minimum dropped, they're warned and must confirm again.
Signs and deposits, then sees the execution id and a Solana explorer link.
Manages holdings under Your Solana assets: Sell a token back to USDC, or Withdraw USDC to a Solana address.
How it works (buy)
Intermediary. The SDK resolves the user's Solana intermediary. It is both the Jupiter
takerand the owner of the output token account.Preview, round 1. A dry create with no steps gives the gross USDC that will reach the intermediary.
Preview, round 2. The dApp builds a Jupiter swap for that amount (through its proxy) and validates it:
it must be Jupiter v6;
only the intermediary may sign;
the input and output accounts must be the intermediary's.
A second dry create then measures the network fee.
Preview, round 3.
spendable = (gross − fee) × (1 − 0.25%). The swap is rebuilt at exactly that amount.prepareSolanaStepsswaps the intermediary pubkey for a placeholder and drops compute-budget instructions.Confirm. The user clicks Buy. The dApp re-previews, and if the minimum dropped, asks again. Then
run(preview.plan)creates the real execution with the frozen steps. If the quote got worse, it throwsQUOTE_MOVEDbefore signing.Sign. The origin wallet signs:
erc191for EVM,raw_ed25519for Solana.Deposit. The source token goes to the deposit address, from the wallet or via QR.
Bridge. NEAR Intents / 1Click delivers USDC to the intermediary.
Execute. Connect's relayer adds its own payer, durable nonce and compute budget. The intermediary creates the output token account if needed and runs the Jupiter swap. The fee is paid in USDC.
Settle. The SDK polls until
SUCCESS. The tokens are in the intermediary's token account. Leftover USDC from the reserve and slippage stays there too.
Getting funds out (steps-only)
The tokens live in the intermediary, so leaving is a steps-only execution: no bridge and no deposit, just a signature.
Sell
Jupiter swap of the whole token balance → USDC, inside the intermediary
From the USDC produced, capped by maxNetworkFee
Withdraw
Create the recipient's USDC account, then transferChecked USDC out
From the amount spent (feeFromAmount), so it sends balance − fee
Both run previewSteps(plan) → show fee → runSteps(preview.plan). A 503 means no Solana durable-nonce account was free: retry shortly.
Core code
Buy recipe: the steps are a Jupiter swap built for the exact amount.
Inside buildJupiterSwap: the swap is built for the intermediary, then prepared.
Preview, then commit:
Withdraw (steps-only):
Related
Recipes & fees:
threeRoundand steps-only feesWallet integrations:
prepareSolanaSteps,createSolanaRecipientAta
Last updated
