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

# Stake Vote

> Low-level instruction to stake LP tokens to vote on a governance proposal

# createStakeVoteInstruction

Builds a raw instruction to stake LP tokens to vote on an active governance proposal. LP holders choose either Reject (to block the proposal from passing) or OptOut (to not block the proposal but queue their LP tokens for withdrawal if it passes). The staked LP amount determines the voter's weight.

## Usage

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

const ix = createStakeVoteInstruction(
  {
    voter: voterKeypair.publicKey,
    vault: vaultAddress,
    proposal: proposalAddress,
    voteAccount: voteAccountAddress,
    tokenLpSrc: voterLpTokenAccount,
    tokenLpEscrow: proposalLpEscrow,
    mintLp: lpMintAddress,
    tokenProgram: TOKEN_PROGRAM_ID,
    systemProgram: SystemProgram.programId,
  },
  {
    voteChoice: { reject: {} },
    lpAmount: BigInt(50_000_000),
  }
);
```

## Accounts

| Name            | Signer | Writable | Description                                |
| --------------- | ------ | -------- | ------------------------------------------ |
| `voter`         | Yes    | Yes      | The LP holder casting a vote               |
| `vault`         | No     | No       | Vault account associated with the proposal |
| `proposal`      | No     | Yes      | Active proposal being voted on             |
| `voteAccount`   | No     | Yes      | Per-voter account tracking their vote      |
| `tokenLpSrc`    | No     | Yes      | Voter's LP token account (source)          |
| `tokenLpEscrow` | No     | Yes      | Escrow account holding staked LP tokens    |
| `mintLp`        | No     | No       | LP token mint                              |
| `tokenProgram`  | No     | No       | SPL Token program                          |
| `systemProgram` | No     | No       | System program                             |

## Args

| Name         | Type         | Description                                     |
| ------------ | ------------ | ----------------------------------------------- |
| `voteChoice` | `VoteChoice` | Vote type: `{ reject: {} }` or `{ optOut: {} }` |
| `lpAmount`   | `u64`        | Amount of LP tokens to stake as vote weight     |

## Returns

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