Documentation Index
Fetch the complete documentation index at: https://dev.jup.ag/docs/llms.txt
Use this file to discover all available pages before exploring further.
These flows use many instructions. If you hit compute limits, add
ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000 }) (or higher) as the first instruction in your transaction.- You have 1 SOL (collateral).
- Flashloan 100 USDC from Jupiter Lend (debt asset).
- Swap 100 USDC → SOL using Jupiter Lite API.
- Deposit your SOL + swapped SOL into the vault and borrow 100 USDC.
- Pay back the flashloan with the borrowed USDC.
Multiply
Get Flashloan Instructions
Use
getFlashBorrowIx and getFlashPaybackIx to flashloan the debt asset (e.g. USDC).Get Quote and Swap Instructions (Jupiter Lite API)
Fetch a quote from Jupiter Lite API, then POST to The
swap-instructions to get the swap instruction. Build your own transaction, do not use a pre-built swap transaction.jupIxToTransactionInstruction helper converts the JSON instruction from the API into a Solana TransactionInstruction:Assemble and Execute the Transaction
Fetch address lookup tables for the swap, then create a versioned transaction with instructions in order.Order: Flashloan Borrow → Swap (USDC→SOL) → Vault Operate (deposit + borrow) → Flashloan PaybackThe
getAddressLookupTableAccounts helper resolves lookup table addresses into account objects:Full code example
Ensure supply and borrow token ATAs exist for the user before building the transaction. Use
createAssociatedTokenAccountIdempotentInstruction from @solana/spl-token if needed.