> ## 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.

# Technical Concepts

> Strategy Vaults, LP tokens, policies, and Protocol integrations explained

***

## Vault Depositors and LP Tokens

A Strategy Vault is a shared pool of capital managed by a manager. Depositors interact with Strategy Vaults by:

1. **Depositing** a supported token → receive Vault LP tokens representing their share
2. **Queuing a withdrawal** → lock LP tokens and request redemption
3. **Filling the withdrawal** (manager) → LP tokens are burned and underlying tokens are allocated
4. **Executing the withdrawal** → receive underlying tokens

Strategy Vault LP tokens are fungible SPL tokens. Their value appreciates as the vault earns yield and grows AUM.

## Token Entries

Each Strategy Vault can have one or more **token entries** — a configuration object for each accepted deposit token. A token entry specifies:

* `mint` — the token's SPL mint address
* `interfaceType` — the protocol this token is deployed into (`exponent`, `kamino`, `titan`, etc.)
* `priceId` — how this token's price is derived (simple oracle or multiply)
* `tokenEscrow` / `tokenSquadsAccount` — the onchain escrow accounts

## Vault Policies

Policies are Squads-level constraints that govern what actions the vault's smart account can take. Before any strategy interaction, a matching policy must exist onchain.

See [Policy Builders](/developer-strategy-vaults/policy-builders) for setup details.

### Protocol Integrations

Exponent Strategy Vault Policies support several protocol interactions. Most flows are expressed as instruction descriptors and wrapped with `createVaultSyncTransaction`. Loopscale starts from raw `LoopscaleClient` responses.

* [**Exponent Core**](/developer-strategy-vaults/exponent-core-instructions) — strip yield assets into PT + YT and merge them back via [Exponent Core](/developer-core/overview)
* [**Exponent AMM (Market Two)**](/developer-strategy-vaults/exponent-core-instructions#amm-market-two-swaps) — swap PT and YT against SY on legacy [Exponent Core](/developer-core/overview) AMM markets
* [**Exponent CLMM**](/developer-strategy-vaults/exponent-clmm-instructions) — provide concentrated liquidity, trade PT/YT, and claim farm emissions on the [Exponent CLMM](/developer-clmm/overview)
* [**Exponent Orderbook**](/developer-strategy-vaults/exponent-orderbook-instructions) — post limit orders, execute market orders, cancel offers, and withdraw settled funds on the [Exponent Orderbook](/developer-orderbook/overview)
* [**Kamino Lend**](/developer-strategy-vaults/kamino-instructions) — deposit, withdraw, borrow, and repay on [Kamino](https://kamino.com) lending reserves
* [**Kamino Vaults**](/developer-strategy-vaults/kamino-vault-instructions) — deposit into and withdraw from direct [Kamino](https://kamino.com) vault positions
* [**Jupiter Lend Earn**](/developer-strategy-vaults/jupiter-lend-earn-instructions) — deposit underlying tokens into [Jupiter Lend](https://jup.ag/lend) jlToken vaults
* [**Jupiter Lend Borrow**](/developer-strategy-vaults/jupiter-lend-borrow-instructions) — run collateralized borrow positions on [Jupiter Lend](https://jup.ag/lend)
* [**Loopscale**](/developer-strategy-vaults/loopscale-instructions) — build raw strategy and loan responses with `LoopscaleClient`, then prepare or build vault transactions from them
* [**Titan**](/developer-strategy-vaults/titan-dex-instructions) — swap tokens through the [Titan](https://titan.exchange) DEX aggregator

<Tabs>
  <Tab title="Exponent Core">
    Strip base tokens into PT + YT and merge them back through the Exponent Core program.

    ```typescript theme={null}
    import { coreAction } from "@exponent-labs/exponent-sdk";

    const strip = coreAction.strip({
      vault: new PublicKey("..."),
      amountBase: 1_000_000_000n,
    });
    ```

    See [Core Instructions](/developer-strategy-vaults/exponent-core-instructions) for full usage.
  </Tab>

  <Tab title="Exponent AMM">
    Swap PT and YT against SY on Exponent's legacy AMM (Market Two) markets through the `exponent_core` program.

    ```typescript theme={null}
    import { marketTwoAction } from "@exponent-labs/exponent-sdk";

    const tradePt = marketTwoAction.tradePt({
      market: new PublicKey("..."),
      netTraderPt: 1_000_000_000n,    // positive = buy PT, negative = sell PT
      syConstraint: 950_000_000n,
    });
    ```

    See [Core Instructions](/developer-strategy-vaults/exponent-core-instructions#amm-market-two-swaps) for full usage.
  </Tab>

  <Tab title="Exponent CLMM">
    Provide concentrated liquidity on the [Exponent CLMM](/developer-clmm/overview), trade PT and YT, and claim farm emissions. LP positions are created with a specified tick range (APY boundaries).

    ```typescript theme={null}
    import { clmmAction } from "@exponent-labs/exponent-sdk";

    const depositLp = clmmAction.depositLiquidity({
      market: new PublicKey("..."),
      ptInIntent: 1_000_000_000n,
      syInIntent: 1_000_000_000n,
      lowerTickKey: 500,
      upperTickKey: 1500,
    });
    ```

    See [CLMM Instructions](/developer-strategy-vaults/exponent-clmm-instructions) for full usage.
  </Tab>

  <Tab title="Exponent Orderbook">
    Trade PT and YT on Exponent Orderbooks — posting limit orders, executing market orders, cancelling offers, and withdrawing settled funds. Orders are quoted in implied APY.

    ```typescript theme={null}
    import { orderbookAction, OrderbookTradeDirection } from "@exponent-labs/exponent-sdk";

    const buyPt = orderbookAction.postOffer({
      orderbook: new PublicKey("..."),
      direction: OrderbookTradeDirection.BUY_PT,
      priceApy: 0.10,
      amount: 1_000_000_000n,
      offerIdx: 0,
    });
    ```

    See [Orderbook Instructions](/developer-strategy-vaults/exponent-orderbook-instructions) for full usage.
  </Tab>

  <Tab title="Kamino Lend">
    [Kamino Lend](https://kamino.com) is a lending protocol. The SDK supports deploying vault capital into Kamino reserves — including deposits, withdrawals, borrows, and repayments.

    **Setup Prerequisites**

    Before interacting with Kamino, two one-time setup instructions must run for the vault owner:

    1. **Init User Metadata** — creates a `UserMetadata` PDA on Kamino Lending (global, one per wallet)
    2. **Init Obligation** — creates an `Obligation` PDA tied to a specific lending market (one per market)

    Both are **idempotent**: they check if the account already exists before issuing the instruction.

    **Execution Flow**

    Every Kamino interaction requires three steps: build a descriptor, wrap it in a sync transaction, and send it.

    ```typescript theme={null}
    // 1. Build an instruction descriptor (does not execute anything on its own)
    const depositInstruction = kaminoAction.deposit(KaminoMarket.MAIN, "USDC", new BN(100_000_000));

    // 2. Wrap in a Squads sync transaction — resolves all accounts and refresh instructions
    const { preInstructions, instruction, postInstructions } =
      await createVaultSyncTransaction({
        instructions: [depositInstruction],
        owner: vaultPda,
        connection,
        policyPda,
        vaultPda,
        signer: wallet.publicKey,
        vaultAddress,
      });

    // 3. Assemble and send — all three parts must be included in order
    const tx = new Transaction().add(...preInstructions, instruction, ...postInstructions);
    await sendAndConfirmTransaction(connection, tx, [wallet]);
    ```

    See [Kamino Instructions](/developer-strategy-vaults/kamino-instructions) for full usage examples of each operation.

    **Kamino Markets**

    The SDK includes a pre-populated registry of all Kamino lending markets and their reserves.

    ```typescript theme={null}
    import { KaminoMarket, KAMINO_MARKETS, KAMINO_RESERVES } from "@exponent-labs/exponent-sdk";

    // Get the lending market public key
    const lendingMarket = KAMINO_MARKETS[KaminoMarket.MAIN];

    // Get a specific reserve — returns { pubkey, mint }
    const solReserve = KAMINO_RESERVES[KaminoMarket.MAIN]["SOL"].pubkey;
    ```

    Available markets include: `MAIN`, `JLP`, `ALTCOINS`, `ETHENA`, `JITO`, `BITCOIN`, `JUPITER`, `EXPONENT_PT_SOL`, and more.
  </Tab>

  <Tab title="Kamino Vaults">
    Use Kamino Vaults when the strategy should hold a direct managed vault position instead of interacting with Kamino reserves directly. The SDK supports deposits and withdraws, and it can plan multi-step withdraws when a Kamino Vault allocates capital across multiple reserves.

    ```typescript theme={null}
    import BN from "bn.js";
    import { kaminoVaultAction } from "@exponent-labs/exponent-sdk";

    const deposit = kaminoVaultAction.deposit({
      vault: kaminoVault,
      amount: new BN(100_000_000),
    });
    ```

    See [Kamino Vault Instructions](/developer-strategy-vaults/kamino-vault-instructions) for full usage.
  </Tab>

  <Tab title="Jupiter Lend Earn">
    Deposit underlying tokens into [Jupiter Lend](https://jup.ag/lend) jlToken vaults. The SDK exposes raw `createJupiterEarn*Instruction` builders that you wrap with `jupiterEarnAction.<method>` for vault execution.

    ```typescript theme={null}
    import { createJupiterEarnDepositInstruction, jupiterEarnAction } from "@exponent-labs/exponent-sdk";

    const depositIx = createJupiterEarnDepositInstruction(assetInAccounts, 50_000_000n);
    const step = jupiterEarnAction.deposit({ instruction: depositIx });
    ```

    See [Jupiter Lend Earn Instructions](/developer-strategy-vaults/jupiter-lend-earn-instructions) for full usage.
  </Tab>

  <Tab title="Jupiter Lend Borrow">
    Run collateralized borrow positions on [Jupiter Lend](https://jup.ag/lend). Semantic operate helpers (`depositCollateral`, `borrowDebt`, `repayDebt`, `withdrawCollateral`, plus four paired ops) take positive amounts and encode the correct signed deltas internally.

    ```typescript theme={null}
    import { createJupiterBorrowDepositAndBorrowInstruction, jupiterBorrowAction } from "@exponent-labs/exponent-sdk";

    const operateIx = createJupiterBorrowDepositAndBorrowInstruction(operateAccounts, {
      collateralAmount: 100_000_000n,
      debtAmount: 50_000_000n,
    });
    const step = jupiterBorrowAction.depositAndBorrow({ instruction: operateIx, vaultId: 1 });
    ```

    See [Jupiter Lend Borrow Instructions](/developer-strategy-vaults/jupiter-lend-borrow-instructions) for full usage.
  </Tab>

  <Tab title="Loopscale">
    Use `LoopscaleClient` for lender-side strategy flows and borrower-side loan flows on [Loopscale](https://docs.loopscale.com/introduction/overview). Loopscale methods return raw responses that you then pass to `prepareVaultTransactions(...)`, `buildVaultTransactions(...)`, or `VaultTransactionBuilder.addLoopscaleResponse(...)`.

    ```typescript theme={null}
    import { LoopscaleClient } from "@exponent-labs/exponent-sdk";

    const client = new LoopscaleClient({
      connection,
      userWallet: vault.state.squadsVault,
    });

    const response = await client.depositStrategy({
      strategy: strategyAddress,
      amount: 500_000_000,
    });
    ```

    See [Loopscale Instructions](/developer-strategy-vaults/loopscale-instructions) for the full response-handling flow.
  </Tab>

  <Tab title="Titan DEX">
    Swap tokens through [Titan](https://titan.exchange), a Solana DEX aggregator. Quotes are fetched from Titan's REST gateway and then wrapped in a sync transaction.

    ```typescript theme={null}
    import { TitanGatewayClient, titanAction } from "@exponent-labs/exponent-sdk";

    const titan = new TitanGatewayClient({ baseUrl, authToken });

    const quoteResult = await titan.quoteVaultSwapInstruction({
      inputMint: new PublicKey("..."),
      outputMint: new PublicKey("..."),
      amount: 1_000_000_000n,
      ownerPda: vaultPda,
    });

    const swap = titanAction.swap({
      instruction: quoteResult.instruction,
      addressLookupTableAddresses: quoteResult.addressLookupTableAddresses,
    });
    ```

    See [Titan Instructions](/developer-strategy-vaults/titan-dex-instructions) for full usage.
  </Tab>
</Tabs>

## Vault State Assertions

`VaultAssertion` is an assertion runner that returns an `allow` / `warn` / `block` report on Strategy Vault and protocol state. It is the recommended pre-flight before sending strategy transactions, and is complementary to — not part of — the transaction builder.

See [VaultAssertion](/developer-strategy-vaults/vault-assertion) for the full surface and built-in conditions.

## Withdrawal Queue

Withdrawals from the vault are not instant. The process is as follow:

1. **Queue** — depositor calls `ixQueueWithdrawal({ depositor, lpAmount })`. LP tokens are moved to escrow and a withdrawal account is created. The method returns `{ ix, withdrawalKeypair }` — save the keypair's public key for later.
2. **Fill** — the vault manager calls `fillWithdrawal` to associate underlying tokens with the withdrawal request. LP tokens are burned at this step.
3. **Execute** — depositor calls `ixExecuteWithdrawal({ owner, withdrawalAccount, tokenAccountPairs })` to receive their underlying tokens.

<Note>
  Save the `withdrawalKeypair.publicKey` returned from step 1 — you'll need it to execute the withdrawal. If lost, you can recover it by querying withdrawal accounts via RPC.
</Note>

## AUM Calculation

The vault tracks total AUM as:

```text theme={null}
AUM = aum_in_base + aum_in_base_in_positions
```

* `aum_in_base` — tokens currently sitting in vault escrows (not deployed)
* `aum_in_base_in_positions` — tokens deployed into strategy positions, valued in base units

Prices are read from the `ExponentPrices` global account, which aggregates oracle data.
