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: --amount or --basisAmount (mutually exclusive)
  • Signer: the on-chain distribution authority
  • Window: succeeds only when cluster time is before startTime or after endTime

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.

Withdraw 0.5 tokens to the authority
mplx distro withdraw <DISTRIBUTION> --amount 0.5
Withdraw base units to another wallet
mplx distro withdraw <DISTRIBUTION> \
--basisAmount 500000 \
--recipient <WALLET>

Options

Exactly one amount flag is required. --recipient defaults to the authority.

FlagShortDescriptionRequired
--amount <number>-aHuman-readable amount using mint decimalsOne of
--basisAmount <integer>-bAmount in token base unitsOne of
--recipient <string>-rDestination 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:

Recover remaining vault tokens
mplx distro withdraw <DISTRIBUTION> --amount 0.5

Output

On success the command prints the withdrawn amount and remaining available balance.

Expected output
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.

ErrorCauseFix
Only the distribution authority can withdrawCLI identity is not the authoritySwitch keypair to the authority
Insufficient available balance for withdrawalAmount exceeds totalAmount - claimAmountLower the amount
Distribution does not have a token accountNothing has been depositedDeposit first, or skip withdraw
Withdrawal rejected during the active windowstartTime <= now <= endTimeWait until before start or after end
InvalidPublicKeyErrorThe distribution argument is not a base58 public keyPass 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 withdrawSubsidy command. Recover subsidy SOL with the JavaScript SDK.
  • Create the distribution with a future startTime if 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.

Previous
Fetch