Core Functions
createFeeVault
Creates a fee vault. Function- The
payerandfeeVaultis required to sign the transaction. UserShareis an array of objects withaddressandshare.- Minimum: At least 2 users must be included
- Maximum: No more than 5 users can be included
createFeeVaultPda
Creates a fee vault PDA. Function- The
payerandbaseis required to sign the transaction. UserShareis an array of objects withaddressandshare.- Minimum: At least 2 users must be included
- Maximum: No more than 5 users can be included
fundFeeVault
Funds the fee vault. Function- The
funderis required to sign the transaction.
fundByClaimDammV2Fee
Funds the fee vault by claiming fee from a DAMM v2 pool. Function- The
signeris required to sign the transaction. - If you have not set the owner of the position NFT account to the fee vault, you can use the
setTokenAccountOwnerTxfunction to set it. - The
dammV2PoolStateis optional and will be fetched from the network if not provided.
fundByClaimDammV2Reward
Funds the fee vault by claiming reward from a DAMM v2 pool. Function- The
signeris required to sign the transaction. - The
rewardIndexis the index of the reward to claim. - The
dammV2PoolStateis optional and will be fetched from the network if not provided.
fundByClaimDbcCreatorTradingFee
Funds the fee vault by claiming creator trading fee from a DBC pool. Function- The
signeris required to sign the transaction. - The
virtualPoolStateis optional and will be fetched from the network if not provided. - The
poolConfigStateis optional and will be fetched from the network if not provided. - You would need to ensure that the DBC pool config’s creator is the fee vault address.
fundByClaimDbcPartnerTradingFee
Funds the fee vault by claiming partner trading fee from a DBC pool. Function- The
signeris required to sign the transaction. - The
virtualPoolStateis optional and will be fetched from the network if not provided. - The
poolConfigStateis optional and will be fetched from the network if not provided. - You would need to ensure that the DBC pool config’s fee claimer is the fee vault address.
fundByWithdrawDbcCreatorSurplus
Funds the fee vault by withdrawing creator surplus from a DBC pool. Function- The
signeris required to sign the transaction. - The
virtualPoolStateis optional and will be fetched from the network if not provided. - The
poolConfigStateis optional and will be fetched from the network if not provided. - You would need to ensure that the DBC pool config’s creator is the fee vault address.
fundByWithdrawDbcPartnerSurplus
Funds the fee vault by withdrawing partner surplus from a DBC pool. Function- The
signeris required to sign the transaction. - The
virtualPoolStateis optional and will be fetched from the network if not provided. - The
poolConfigStateis optional and will be fetched from the network if not provided. - You would need to ensure that the DBC pool config’s fee claimer is the fee vault address.
fundByWithdrawDbcMigrationFee
Funds the fee vault by withdrawing migration fee from a DBC pool. Function- The
signeris required to sign the transaction. - The
virtualPoolStateis optional and will be fetched from the network if not provided. - The
poolConfigStateis optional and will be fetched from the network if not provided. - You would need to ensure that the DBC pool config’s fee claimer / creator is the fee vault address.
claimUserFee
Claims the fee for the user. Function- The
payeranduseris required to sign the transaction.
State Functions
getFeeVault
Get the fee vault state. Function- This function returns the fee vault state.
getFeeBreakdown
Get the fee breakdown in the fee vault. Function- This function returns the fee breakdown object consisting of the total funded fee, total claimed fee, total unclaimed fee, and user fees.
Helper Functions
deriveFeeVaultPdaAddress
Derive the fee vault PDA address. Function- This function returns the PDA address of the fee vault.
convertToLamportsBN
Convert to lamports in BN type. Function- This function returns the lamports in BN type.
setTokenAccountOwnerTx
Set the owner of a token account. Function- This function returns the transaction that can be signed and sent to the network.
- Can be used to transfer DAMM v2 position NFT to the fee vault.

