Guides
Earn on Jupiter Lend
jupiter.lend.supply puts an asset from your private balance into a Jupiter Lend market and gives you the market's earn token. jupiter.lend.withdraw turns the earn token back into the asset. Between the two, the earn token sits in your private balance as a note, earning what the market pays.
You need a private balance holding the asset you are supplying. Enter and leave covers getting one.
How the position is held
Supplying to Jupiter Lend returns an earn token: jlUSDC for USDC, jlSOL for SOL. The token is the position. Its exchange price to the asset rises as the market earns, so the same amount of jlUSDC redeems for more USDC later.
| Asset | Earn token | Earn token mint |
|---|---|---|
| USDC | jlUSDC | 9BEcn9aPEmhSPbPQeFGjidRiEKki46fVQDyPpSQXPA2D |
| SOL | jlSOL | 2uQsyo1fXXQkDtcpXnLofWy88PxcvnfH2L8FPSE62FVU |
Any other Jupiter Lend market works the same way, with its own earn token.
Both hooks are flow hooks. Each run takes one asset in and returns one asset out, and nothing stays open at Jupiter Lend under your name. There is no seat. The earn token is a note like any other: it shows on Balance, and you can leave with it or hold it.
Supply
Open the hook
On Balance, under Run a hook, press Supply in the Jupiter Lend group.
Choose the asset and amount
Pick the asset in and type the amount. The asset out is the market's earn token.
Read the quote and run
The quote shows the earn tokens you receive after the run fee and the relayer's fee. Press Run. At Done, the earn token is in your balance.
const USDC = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
const JLUSDC = '9BEcn9aPEmhSPbPQeFGjidRiEKki46fVQDyPpSQXPA2D'
const supplied = await pook.run('jupiter.lend.supply', {
in: USDC,
out: JLUSDC,
amount: '10000000', // 10 USDC in base units
slippageBps: 50,
})In a simulation against mainnet state, 10 USDC supplied gave 9.3402 jlUSDC.
Withdraw
Withdrawing is the same run in the other direction. The amount is in earn tokens.
Open the hook
On Balance, under Run a hook, press Withdraw in the Jupiter Lend group.
Choose the earn token and amount
Pick the earn token as the asset in and type how much of it to redeem. To withdraw everything, use the full amount your balance shows.
Read the quote and run
The quote shows the asset you receive. Press Run.
const { assets } = await pook.balance()
const held = assets.find((a) => a.mint === JLUSDC)
const withdrawn = await pook.run('jupiter.lend.withdraw', {
in: JLUSDC,
out: USDC,
amount: held.amount, // every earn token you hold
})In the same simulation, 10 jlUSDC withdrawn gave 10.7064 USDC.
The quote
The quote converts at the exchange price the market has stored, and minimumOut applies your slippageBps to that. The run fee and the relayer's fee come out of what the run returns, as in every run: Fees and POOK gives the rates.
What the run does at Jupiter Lend
jupiter.lend.supply calls the lending program's deposit_with_min_amount_out, and jupiter.lend.withdraw calls redeem_with_min_amount_out. In both, the hook writes the run's amount in and its minimum out into the instruction, so Jupiter Lend itself refuses to give less than your proof allows, and the Pook program checks the same minimum again on what arrived.
The stage signs the call and passes its two token accounts, one for the asset going in and one for the asset coming back. The hook's resolver reads the market's accounts from chain for the asset you name: the lending account, the earn token mint, the reserve, the supply position, the rate model, the vault and the rewards rate model. You can name the market by its asset or by its earn token. The quote returns the resolved call, and that call is what your proof fixes.
What the chain shows
Each run shows the hook, the market, the amount in and the amount out. Jupiter Lend records a deposit and a redemption made by Pook's stage, the same address for every holder. Nothing at Jupiter Lend or in the transaction names your wallet.