These flows use many instructions. If you hit compute limits, add
ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000 }) (or higher) as the first instruction in your transaction.- Withdraw pool tokens from vault via
getOperateIx(negative colAmount) - Burn pool tokens with
SinglePoolProgram.withdraw→ receive stake account
Withdraw
Withdraw Pool Tokens from Vault
Use
getOperateIx with MAX_WITHDRAW_AMOUNT to withdraw all collateral. As with a regular withdraw, this only succeeds if the resulting position stays within LTV, so repay debt first if needed.Burn Pool Tokens and Receive Stake
Use
SinglePoolProgram.withdraw to burn pool tokens and receive a new stake account.