Skip to main content
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.

Discriminator

Parameters

This instruction takes no parameters beyond the discriminator.

Accounts

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.
Full reference implementation: withdraw_vault.rs