cancel_request_withdraw_vault instruction cancels a pending withdrawal request. The escrowed LP tokens are refunded to the user (minus any redemption fee that may apply), and the receipt account is closed.
This instruction can be called at any time after a
request_withdraw_vault has been created, regardless of whether the waiting period has passed.Discriminator
Parameters
This instruction takes no parameters beyond the discriminator.Accounts
| Account | Mutability | Signer | Description |
|---|---|---|---|
user_transfer_authority | Mutable | Yes | The user cancelling the withdrawal; receives closed receipt’s rent |
protocol | Immutable | No | Global Ranger Earn protocol state account |
vault | Mutable | No | The vault state account |
vault_lp_mint | Mutable | No | The vault’s LP mint |
user_lp_ata | Mutable | No | The user’s LP token account (destination for refunded LP tokens) |
request_withdraw_lp_ata | Mutable | No | The receipt’s ATA holding escrowed LP tokens |
request_withdraw_vault_receipt | Mutable | No | The PDA receipt account (closed after cancellation) |
lp_token_program | Immutable | No | Token Program for LP tokens |
system_program | Immutable | No | Solana System Program |
CPI Struct
Implementation
After a successful
cancel_request_withdraw_vault call, the request_withdraw_vault_receipt account is closed and its rent is returned. The user may receive fewer LP tokens back than originally escrowed if the vault’s value has changed since the request was made.