Skip to main content
Use these instructions when your strategy vault should deposit underlying tokens into Jupiter Lend Earn jlToken vaults. For Jupiter’s collateralized borrowing product, see Jupiter Lend Borrow instructions. Jupiter Earn exposes eight on-chain operations split into two account groups:
  • Asset-in (deposit / mint variants) — vault sends the underlying token, receives jlTokens.
  • Asset-out (withdraw / redeem variants) — vault sends jlTokens, receives the underlying token.
The SDK provides one raw createJupiterEarn*Instruction(...) per op and matching jupiterEarnAction.<method>(...) wrappers that register the op as a vault step.

Transaction structure

Every Jupiter Earn action goes through createVaultSyncTransaction.

Asset-in accounts

All four asset-in operations (deposit, depositWithMinAmountOut, mint, mintWithMaxAssets) share the same JupiterEarnAssetInAccounts shape. Build it once and pass it into each instruction builder.
buildJupiterLendPriceInterfaceAccounts(accounts) returns the price-interface AccountMeta[] Jupiter expects for downstream price reads, derived from the same accounts struct.

Deposit

createJupiterEarnDepositInstruction(accounts, assets) deposits an exact amount of underlying tokens and receives jlTokens at the current rate. createJupiterEarnDepositWithMinAmountOutInstruction(accounts, assets, minAmountOut) is the same operation with a slippage floor on the jlTokens received.

Parameters

Mint

createJupiterEarnMintInstruction(accounts, shares) mints an exact amount of jlTokens, paying the current required underlying. createJupiterEarnMintWithMaxAssetsInstruction(accounts, shares, maxAssets) adds a cap on the underlying spent.

Parameters

Asset-out accounts

The four asset-out operations (withdraw, withdrawWithMaxSharesBurn, redeem, redeemWithMinAmountOut) share JupiterEarnAssetOutAccounts. The shape mirrors asset-in, with the source/recipient roles flipped.

Withdraw

createJupiterEarnWithdrawInstruction(accounts, amount) withdraws an exact amount of underlying by burning the implied jlTokens at the current rate. createJupiterEarnWithdrawWithMaxSharesBurnInstruction(accounts, amount, maxSharesBurn) adds a cap on the jlTokens burned.

Parameters

Redeem

createJupiterEarnRedeemInstruction(accounts, shares) redeems an exact amount of jlTokens for underlying at the current rate. createJupiterEarnRedeemWithMinAmountOutInstruction(accounts, shares, minAmountOut) adds a slippage floor on the underlying received.

Parameters

Action wrappers

Every Earn op has a matching jupiterEarnAction.<method> that registers the raw instruction as a vault step. All wrappers take a single { instruction } object.

Constants

For policy authoring or custom data-constraint work, the SDK also exports JUPITER_EARN_DISCRIMINATORS (per-action discriminators) and JUPITER_EARN_ACCOUNT_INDICES (account-index maps for asset-in and asset-out paths). A matching policy must exist before executing. See Jupiter Lend Earn Policy.

Full flow example

This example deposits underlying into a Jupiter Earn vault, then unwinds with a redeem.