Skip to main content
The ixsDepositLiquidity method builds transaction instructions that deposit tokens into the vault and mint LP tokens to the depositor.

Usage

Required Parameters

Optional Parameters

Returns

Returns a Promise<TransactionInstruction[]> — an array of instructions that deposit tokens into the vault and mint LP tokens.

LP Token Calculation

The amount of LP tokens minted is proportional to the deposit relative to total vault AUM:
The minLpOut parameter protects against price movements between transaction construction and execution.
To estimate the exchange rate before depositing, read vault.state.financials for AUM and call vault.fetchLpTokenSupply() for the current LP supply.