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.
Proposal Finalization and Execution
After the voting period ends, proposals must be finalized to determine the outcome, then executed after the timelock passes.
Finalize Proposal
createFinalizeProposalInstruction
Finalizes a proposal after its voting period has ended. Determines whether the proposal passed or was rejected based on the rejection threshold. Anyone can call this instruction.
import { createFinalizeProposalInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
const ix = createFinalizeProposalInstruction({
payer: wallet.publicKey,
vault: vaultAddress,
mintLp: vaultMintLp,
proposal: proposalAddress,
});
Accounts
| Name | Signer | Writable | Description |
|---|
payer | Yes | Yes | Transaction fee payer |
vault | No | No | The vault account |
mintLp | No | No | Vault LP mint (used to check total supply for threshold calculation) |
proposal | No | Yes | The proposal to finalize |
Execute Proposal
createExecuteProposalInstruction
Executes an approved proposal after the timelock period has passed. Applies the proposed VaultSettingsAction or PositionUpdate to the vault. Anyone can call this instruction.
import { createExecuteProposalInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
const ix = createExecuteProposalInstruction({
payer: wallet.publicKey,
vault: vaultAddress,
proposal: proposalAddress,
exponentPrices: exponentPricesPda,
systemProgram: SystemProgram.programId,
});
Accounts
| Name | Signer | Writable | Description |
|---|
payer | Yes | Yes | Transaction fee payer |
vault | No | Yes | The vault account (modified by the proposal action) |
proposal | No | Yes | The approved proposal to execute |
exponentPrices | No | Yes | ExponentPrices account |
systemProgram | No | No | System program |
Cancel Proposal
createCancelProposalInstruction
Cancels an active proposal before execution. Only the vault manager (or Exponent sentinel) can cancel proposals.
import { createCancelProposalInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
const ix = createCancelProposalInstruction({
authority: wallet.publicKey, // manager or Exponent sentinel
vault: vaultAddress,
proposal: proposalAddress,
});
Accounts
| Name | Signer | Writable | Description |
|---|
authority | Yes | No | Manager (or Exponent sentinel) with cancellation rights |
vault | No | No | The vault account |
proposal | No | Yes | The proposal to cancel |