ixCancelWithdrawal
Cancels a previously queued withdrawal and returns the escrowed LP tokens to the depositor. Can only be called by the owner of the withdrawal account, and only before the withdrawal has been fully filled by the vault manager.Usage
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
owner | PublicKey | Yes | The depositor who queued the withdrawal (must be signer) |
withdrawalAccount | PublicKey | Yes | The withdrawal account to cancel |
tokenLpDst | PublicKey | No | Destination for returned LP tokens. Defaults to the owner’s ATA for the vault’s LP mint |
tokenProgram | PublicKey | No | SPL Token program. Defaults to TOKEN_PROGRAM_ID |
tokenLpEscrow | PublicKey | No | The vault’s LP token escrow. Auto-derived from vault state |
Returns
TransactionInstruction — a single instruction that cancels the withdrawal and returns LP tokens.
After cancellation, the withdrawal account is closed and its rent is returned to the owner. The LP tokens are transferred from the vault’s LP escrow back to the owner’s token account.