The withdraw_vault instruction completes a withdrawal by burning the escrowed LP tokens and transferring the underlying assets back to the user. This is the second step of the two-step withdrawal process.
This instruction will fail with WithdrawalNotYetAvailable if the vault's withdrawal_waiting_period has not passed since the request_withdraw_vault call.
This instruction takes no parameters beyond the discriminator.
Accounts
Account
Mutability
Signer
Description
user_transfer_authority
Mutable
Yes
The user finalizing the withdrawal
protocol
Immutable
No
Global Voltr protocol state account
vault
Mutable
No
The vault state account
vault_asset_mint
Immutable
No
The mint of the asset being withdrawn
vault_lp_mint
Mutable
No
The vault's LP mint
request_withdraw_lp_ata
Mutable
No
The receipt's ATA holding escrowed LP tokens (source for burn)
vault_asset_idle_ata
Mutable
No
The vault's idle asset token account (source for transfer)
vault_asset_idle_auth
Mutable
No
PDA authority over vault_asset_idle_ata
user_asset_ata
Mutable
No
The user's asset token account (destination)
request_withdraw_vault_receipt
Mutable
No
The PDA receipt account (closed after withdrawal)
asset_token_program
Immutable
No
Token Program or Token-2022 for assets
lp_token_program
Immutable
No
Token Program for LP tokens
system_program
Immutable
No
Solana System Program
CPI Struct
Implementation
After a successful withdraw_vault call, the request_withdraw_vault_receipt account is closed and its rent is returned. The user can then create a new withdrawal request if needed.