Skip to main content
After Jupiter creates your wrapper, it transfers the wrapper authority to the admin address you gave at onboarding. From then on only you, as the wrapper authority, can change the partner fee, the fee recipient, the claim authority and the xToken’s name. This page shows each task with the Lend Referral SDK. Every example starts from a WrapperContext for your wrapper. Read a wrapper shows how to get one with your xToken mint.

Read your earnings

Your fees sit in the wrapper’s vault as jlTokens until you claim them, and they keep earning Jupiter Lend yield with no partner fee on them. Where fees sit until you claim explains why. Your balance is what the vault holds beyond the users’ and Jupiter’s balances. The stored books leave out the fee since the last checkpoint, so project them with simulateAccrue before you compute the balance.
The value in the underlying token uses the price Jupiter Lend last stored. The program refreshes that price on every instruction, and it only rises.

Claim fees

claimPartnerFees pays your balance to the fee recipient stored on the wrapper. The program accepts no other destination. amount: "all" claims the whole balance, and a bigint claims that many jlToken atoms. Who can trigger the claim depends on your claim policy. With no claim authority set, anyone can, and the fees still go only to your recipient. With one set, only the claim authority, the wrapper authority or the owner of the fee recipient account can.
Fees arrive in the recipient account as jlTokens. To turn them into the underlying token, withdraw them on Jupiter Earn.

Run accrue

accrue checkpoints the wrapper’s fees: it refreshes the Jupiter Lend price and charges the partner fee on the users’ yield since the last checkpoint. Every deposit, withdrawal, claim and partner fee change already does this first, so a wrapper with user activity needs no extra calls. Anyone can run it. The instruction has no signer account, so only the transaction fee payer signs. Run it in two cases:
  • After Jupiter changes the protocol share. A change reaches each wrapper at its next accrue, so accrue applies it right away. An idle wrapper keeps the old share until its next activity.
  • To checkpoint an idle wrapper before you read or report its books.
Each accrue charges the fee on that interval’s yield, and the charged jlTokens then compound with no fee. More frequent accrual therefore gives a slightly higher effective fee. Effective fee shows by how much.

Change the partner fee

updatePartnerFee sets a new fee from 0 to 1,000 bps (0% to 10% of yield). The protocol share comes out of this fee, not on top of it. The instruction first accrues at the old fee, so the new fee applies to future yield only. It takes effect in the same transaction, with no delay.
A fee change is blocked while the protocol is paused. Users get no notice period, so they rely on your conduct within the 10% cap. When fee changes take effect explains the timing.

Change the fee recipient

The fee recipient must be an existing jlToken token account under the market’s token program. It cannot be a wallet address, an account for another mint, or the wrapper’s vault. To pay fees to a wallet or a multisig, create its jlToken ATA first. This example uses @solana-program/token for the ATA, which the SDK also depends on.
The change does not claim. Fees already in the vault go to the new recipient at the next claim.

Restrict who can claim

By default anyone can trigger a claim, and the fees go only to your recipient. To limit who can trigger it, set a claim authority. Then only the claim authority, the wrapper authority, or the owner of the fee recipient account can claim. Other signers fail with InvalidClaimAuthority (7013).

Rename the xToken

getUpdateXTokenMetadataInstructionAsync rewrites the xToken’s Metaplex metadata. The name is at most 32 bytes, the symbol at most 10 bytes, and the URI at most 200 bytes. The URI points to the Metaplex JSON file, which you host or Jupiter hosts for you.

Transfer the wrapper authority

The transfer is one step and cannot be undone. Jupiter cannot reverse it. If you transfer to a wrong address, you lose control of the wrapper permanently. Confirm the new address out of band, for example with a message signed by the new key, before you send.
The new authority takes effect in the same transaction and needs no acceptance step. Prefer a multisig as the wrapper authority.

Sign with a multisig

When a multisig is the wrapper authority, the multisig signs on chain. Pass the SDK a noop signer for the multisig’s address with createNoopSigner(multisigAddress) as authority or signer, then hand the instructions to the multisig. For a Squads vault, convert each Kit instruction to a @solana/web3.js TransactionInstruction and pass them to @sqds/multisig as the vault transaction’s instructions. The Squads tab in Sign from your app has the full example.