The request_withdraw_vault instruction initiates a withdrawal by transferring the user's LP tokens into an escrow receipt account. This is the first step of the two-step withdrawal process.
After calling request_withdraw_vault, the user must wait for the vault's withdrawal_waiting_period to pass before calling withdraw_vault to claim the underlying assets.
The withdrawal amount (interpretation depends on is_amount_in_lp)
is_amount_in_lp
bool
If true, amount is in LP tokens. If false, amount is in underlying asset tokens
is_withdraw_all
bool
If true, withdraws the user's entire LP balance regardless of amount
Accounts
Account
Mutability
Signer
Description
payer
Mutable
Yes
Pays rent for the receipt account
user_transfer_authority
Immutable
Yes
The user requesting the withdrawal
protocol
Immutable
No
Global Voltr protocol state account
vault
Immutable
No
The vault to withdraw from
vault_lp_mint
Immutable
No
The vault's LP mint
user_lp_ata
Mutable
No
The user's LP token account (source)
request_withdraw_lp_ata
Mutable
No
The receipt's ATA to hold escrowed LP tokens
request_withdraw_vault_receipt
Mutable
No
PDA receipt account storing the request details
lp_token_program
Immutable
No
Token Program for LP tokens
system_program
Immutable
No
Solana System Program
CPI Struct
Implementation
The request_withdraw_vault_receipt PDA is derived from seeds ["request_withdraw_vault_receipt", vault_key, user_key]. This means each user can have one active withdrawal request per vault at a time.