Withdrawing
Vault withdrawals take two steps: request, wait 7 days, then complete.
:::warning No vault on testnet today
The V1 vault on Arbitrum Sepolia was retired on 2026-11-25 and Vault V2 is not deployed yet, so on network: 'testnet' every call below throws ConfigError: tradingVault is not deployed on testnet yet. The SDK also refuses every withdrawal write against the retired V1 vault, even when you pass its address through contracts.
:::
| Step | Contract call | In the SDK |
|---|---|---|
| 1. Request | requestWithdrawal(shares) | client.vault.requestWithdrawal(shares) |
| 2. Wait 7 days | client.vault.getWithdrawalRequest(address) shows when it unlocks | |
| 3. Complete | processWithdrawal() | client.vault.completeWithdrawal() |
| Cancel (any time before completing) | cancelWithdrawal() | client.vault.cancelWithdrawal() |
Every write needs a privateKey. vault.withdraw(shares) from 0.1 still works, but it is deprecated: it only requests.
1. Request
// The argument is SHARES, not USDC. Vault shares have 6 decimals.
const { txHash } = await client.vault.requestWithdrawal('100');
The requested shares are locked in the vault, and the 7-day delay starts. You can have one request at a time.
To withdraw a USDC amount, convert it to shares first:
const price = Number(await client.vault.sharePrice()); // USDC per share
const shares = (500 / price).toFixed(6);
await client.vault.requestWithdrawal(shares);
2. Check the request
const req = await client.vault.getWithdrawalRequest(address);
// {
// shares: '100.0', // locked shares
// requestTime, unlockTime, // unix seconds
// processed: false,
// pending: true, // a request exists and is not completed or cancelled
// unlocked: false, // pending and the 7 days have passed
// }
const payout = await client.vault.previewRedeem(req.shares); // USDC at today's share price
const idle = await client.vault.getIdleLiquidity(); // USDC the vault holds right now
const canComplete = req.unlocked && Number(idle) >= Number(payout);
3. Complete or cancel
if (canComplete) {
await client.vault.completeWithdrawal(); // burns the shares, sends USDC to your wallet
}
// or, before completing:
await client.vault.cancelWithdrawal(); // the locked shares come back
completeWithdrawal() reverts before the lock ends, and also when the vault holds less idle USDC than the payout. The SDK surfaces the revert as a ContractError.
What to expect
- Price at completion. The payout uses the share price at completion. Locked shares still move with NAV during the delay.
- Liquidity. Completion needs enough idle USDC in the vault. Capital out trading has to return first, so completion can wait past 7 days. See Capital Flow.
- Pause. On the current vault, completion is blocked while the vault is paused. Cancelling still works. The new vault build (pending contract approval, not deployed yet) lets you complete and cancel while paused; only new requests are blocked.
- Fees. There is no exit fee.
- Standard ERC-4626
withdraw/redeemrevert. Don't use them.
Next: Checking Balances.