> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exponent.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Deposit Liquidity

> Low-level instruction to deposit tokens into a vault and mint LP tokens

# createDepositLiquidityInstruction

Builds a raw instruction to deposit tokens into a Strategy Vault and receive LP tokens in return. The depositor specifies the token mint, the amount to deposit, and a minimum LP output to protect against slippage. Called by depositors who want to add liquidity to the vault.

## Usage

```typescript theme={null}
import { createDepositLiquidityInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
import { PublicKey } from "@solana/web3.js";

const ix = createDepositLiquidityInstruction(
  {
    depositor: wallet.publicKey,
    vault: vaultAddress,
    exponentPrices: exponentPricesPda,
    tokenSrc: depositorTokenAccount,
    entryTokenVault: vaultEntryTokenAccount,
    tokenLpDst: depositorLpTokenAccount,
    mintLp: lpMintAddress,
    tokenProgram: TOKEN_PROGRAM_ID,
    eventAuthority: eventAuthorityPda,
    program: EXPONENT_VAULTS_PROGRAM_ID,
  },
  {
    mint: tokenMintAddress,
    tokenAmountIn: BigInt(1_000_000),
    minLpOut: BigInt(990_000),
  }
);
```

## Accounts

| Name              | Signer | Writable | Description                                        |
| ----------------- | ------ | -------- | -------------------------------------------------- |
| `depositor`       | Yes    | Yes      | The user depositing tokens into the vault          |
| `vault`           | No     | Yes      | The Strategy Vault account                         |
| `exponentPrices`  | No     | No       | Global ExponentPrices account for AUM calculations |
| `tokenSrc`        | No     | Yes      | Depositor's source token account                   |
| `entryTokenVault` | No     | Yes      | Vault's token account for the deposited mint       |
| `tokenLpDst`      | No     | Yes      | Depositor's destination LP token account           |
| `mintLp`          | No     | Yes      | The vault's LP token mint                          |
| `tokenProgram`    | No     | No       | SPL Token program                                  |
| `eventAuthority`  | No     | No       | Event authority PDA                                |
| `program`         | No     | No       | Exponent Vaults program                            |

## Args

| Name            | Type        | Description                                             |
| --------------- | ----------- | ------------------------------------------------------- |
| `mint`          | `PublicKey` | Token mint to deposit                                   |
| `tokenAmountIn` | `bigint`    | Amount of tokens to deposit (u64, in base units)        |
| `minLpOut`      | `bigint`    | Minimum LP tokens to receive (u64, slippage protection) |

## Returns

`TransactionInstruction` — a transaction instruction ready to be added to a transaction.
