Documentation Index
Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt
Use this file to discover all available pages before exploring further.
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
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.