Programs
Withdraw
Last updated August 27, 2026
What You'll Do
Recover MPL-Distro tokens from the vault:
- Withdraw as the distribution authority while the claim window is inactive
- Send tokens to the authority or to
--recipient
Summary
The mplx distro withdraw command transfers unclaimed tokens from the distribution vault to a recipient associated token account.
- Required argument: distribution public key
- Required flag:
--amountor--basisAmount(mutually exclusive) - Signer: the on-chain distribution authority
- Window: succeeds only when cluster time is before
startTimeor afterendTime
Available balance is totalAmount - claimAmount. See Funding and Recovery.
Jump to: Basic Usage · Options · Examples · Output · Common Errors · FAQ
Basic Usage
Withdraw to the authority wallet, or pass --recipient.
mplx distro withdraw <DISTRIBUTION> --amount 0.5
mplx distro withdraw <DISTRIBUTION> \
--basisAmount 500000 \
--recipient <WALLET>
Options
Exactly one amount flag is required. --recipient defaults to the authority.
| Flag | Short | Description | Required |
|---|---|---|---|
--amount <number> | -a | Human-readable amount using mint decimals | One of |
--basisAmount <integer> | -b | Amount in token base units | One of |
--recipient <string> | -r | Destination wallet (defaults to the authority) | No |
For a 6-decimal mint, --amount 0.5 and --basisAmount 500000 withdraw the same quantity.
Examples
Recover leftovers after the window ends:
mplx distro withdraw <DISTRIBUTION> --amount 0.5
Output
On success the command prints the withdrawn amount and remaining available balance.
Withdrew 0.5 tokens (500000 basis) from distribution
Distribution: <DISTRIBUTION>
Mint: <TOKEN_MINT>
Amount withdrawn: 0.5 tokens (500000 basis)
Recipient: <WALLET>
Remaining available for withdrawal: 0.5 tokens (500000 basis)
Transaction: <SIGNATURE>
Common Errors
These failures happen when the vault cannot be drained.
| Error | Cause | Fix |
|---|---|---|
| Only the distribution authority can withdraw | CLI identity is not the authority | Switch keypair to the authority |
| Insufficient available balance for withdrawal | Amount exceeds totalAmount - claimAmount | Lower the amount |
| Distribution does not have a token account | Nothing has been deposited | Deposit first, or skip withdraw |
| Withdrawal rejected during the active window | startTime <= now <= endTime | Wait until before start or after end |
InvalidPublicKeyError | The distribution argument is not a base58 public key | Pass the PDA printed by distro create |
The CLI does not pre-check the time window; the program returns the rejection.
Notes
Withdraw recovers tokens, not unused receipt-rent subsidy.
- The CLI has no
withdrawSubsidycommand. Recover subsidy SOL with the JavaScript SDK. - Create the distribution with a future
startTimeif you need to test withdraw before claims open. - Claimed tokens cannot be withdrawn.
FAQ
When does distro withdraw succeed? The authority can withdraw before startTime or after endTime. The program rejects withdrawals while the claim window is active.
Who can withdraw? Only the distribution authority. The CLI identity must match the on-chain authority.
