Withdraw the token from the pool at the current ratio.
Succeeds if the stake account has enough SOL to cover the desired
amount of pool tokens, and if the withdrawal keeps the total
staked amount above the minimum of rent-exempt amount plus max( crate::MINIMUM_ACTIVE_STAKE, solana_program::stake::tools::get_minimum_delegation() ).
When allowing withdrawals, the order of priority goes:
reserve stake account OR totally remove validator stake accounts
A user can freely withdraw from a validator stake account, and if they
are all at the minimum, then they can withdraw from transient stake
accounts, and if they are all at minimum, then they can withdraw from
the reserve or remove any validator from the pool.
[w] Stake pool
[w] Validator stake list storage account
[] Stake pool withdraw authority
[w] Validator or reserve stake account to split
[w] Uninitialized stake account to receive withdrawal
[] User account to set as a new withdraw authority
[s] User transfer authority, for pool token account
[w] User account with pool tokens to burn from
[w] Account to receive pool fee tokens
[w] Pool token mint account
[] Sysvar clock account (required)
[] Pool token program id
[] Stake program id,
User data: amount of pool tokens to withdraw
Withdraw the token from the pool at the current ratio. Succeeds if the stake account has enough SOL to cover the desired amount of pool tokens, and if the withdrawal keeps the total staked amount above the minimum of rent-exempt amount plus
max( crate::MINIMUM_ACTIVE_STAKE, solana_program::stake::tools::get_minimum_delegation() ). When allowing withdrawals, the order of priority goes:[w]Stake pool[w]Validator stake list storage account[]Stake pool withdraw authority[w]Validator or reserve stake account to split[w]Uninitialized stake account to receive withdrawal[]User account to set as a new withdraw authority[s]User transfer authority, for pool token account[w]User account with pool tokens to burn from[w]Account to receive pool fee tokens[w]Pool token mint account[]Sysvar clock account (required)[]Pool token program id[]Stake program id, User data: amount of pool tokens to withdraw