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

# Configure policies

> Choose the actions and accounts the vault can use, then install the policy.

Managers should configure policies before accepting deposits. Cover the actions needed to allocate funds, withdraw them, and prepare any required protocol accounts.

## Define the policy

Choose a [supported integration](https://docs.exponent.finance/developer-strategy-vaults/supported-integrations.md) and use its [policy builder](https://docs.exponent.finance/developer-strategy-vaults/reference/manage-policies.md) to restrict the allowed actions, markets, and accounts. Omitting a constraint can allow access to any account of that kind. Leave `spendingLimits` unset for vault policies.

This policy allows deposits and withdrawals in the SOL reserve in Kamino's SOL/BTC market:

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

const solReserve = KAMINO_RESERVES[KaminoMarket.MAIN].SOL;
const policyConfig = createKaminoPolicy({
  actions: ["deposit", "withdraw"],
  allowedReserves: [solReserve.pubkey],
  allowedDepositMints: [solReserve.mint],
  allowedLendingMarkets: [KAMINO_MARKETS[KaminoMarket.MAIN]],
});
```

## Install the policy

> [tab] Add during setup
>
> Managers or curators can install policies while the vault has zero AUM and fresh accounting.
>
> Read the [current Squads seed and transaction index](https://docs.exponent.finance/developer-strategy-vaults/reference/manage-policies.md#read-squads-settings) before building the instruction. Rebuild it if those values change before submission.
>
> ```typescript theme={null}
> import { SQUADS_PROGRAM_ID } from "@exponent-labs/exponent-sdk";
>
> const addPolicy = vault.ixAddPolicy({
>   payer: manager.publicKey,
>   policyConfig,
>   squadsProgram: SQUADS_PROGRAM_ID,
>   nextPolicySeed,
>   nextTransactionIndex,
> });
> ```
>
> Submit `addPolicy` with the manager as signer.

> [tab] Add through a proposal
>
> For a funded vault, a manager must create a [draft proposal](https://docs.exponent.finance/developer-strategy-vaults/reference/manage-policies.md) at `proposalAddress`. Append the policy below, then activate voting.
>
> `toCodamaPolicyConfig` converts the builder's configuration to the format used by proposals.
>
> ```typescript theme={null}
> import {
>   createAppendProposalActionsInstruction,
>   proposalAction,
> } from "@exponent-labs/exponent-sdk";
> import { SystemProgram } from "@solana/web3.js";
>
> const addPolicyAction = proposalAction("PolicyAction", [{
>   __kind: "Add",
>   fields: [vault.toCodamaPolicyConfig(policyConfig)],
> }]);
>
> const appendPolicy = createAppendProposalActionsInstruction(
>   {
>     payer: manager.publicKey,
>     manager: manager.publicKey,
>     vault: vault.selfAddress,
>     proposal: proposalAddress,
>     systemProgram: SystemProgram.programId,
>   },
>   { actions: [addPolicyAction] },
>   vault.programId,
> );
> ```
>
> The policy is installed when the approved proposal executes. Prepare its [Squads execution accounts](https://docs.exponent.finance/developer-strategy-vaults/reference/manage-policies.md#execute-a-policy-proposal) from the settings current at execution time.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.