Deposit
This guide will go over deposit and depositWithMetadata.
The full example can be found on github here.
Setup
Deposit Without Token Metadata
This example creates a user position without creating the metaplex token metadata account. The position created by this instruction has no limitations, but the NFT image will not be viewable in your wallet provider (such as phantom). The instruction it is calling under the hood is deposit
.
Deposit With Token Metadata
This function does the same as Deposit Without Token Metadata, but it does create the token metadata account, thus making the NFT image viewable in most wallet providers. The instruction it is calling under the hood is depositWithMetadata
.
Deposit With Referrer
Both Deposit With Token Metadata and Deposit Without Token Metadata take an optional parameter of referrer
. This parameter represents the Token B token account that will receive the referral fees on a withdrawal instruction (withdrawB
, closePosition
), see Fee Structure for more details. If this parameter is not provided, the vault's treasuryTokenBAccount
will be used as the default value.
There is no restriction on the referrer
so long that it is a token account for the vaults tokenBMint
.
Last updated