Withdraw from a Vault
This tutorial shows how to withdraw assets from a single asset vault on the XRP Ledger. You state either how many assets you want to receive or how many shares you want to redeem. The vault burns the necessary shares and transfers the corresponding assets to your account.
- Section
- Tutorials
What you need
You need a basic understanding of the XRP Ledger and an account that has already deposited into a vault. You also need a client library: the examples use JavaScript with xrpl.js and Python with xrpl-py. The tutorial requires the SingleAssetVault amendment, which the source lists as open for voting, and the LendingProtocolV1_1 amendment updates it. The JavaScript code expects both amendments, the Python code only SingleAssetVault.
Before you withdraw
You install what the code depends on with npm or pip, connect a client, and provide the depositor account and the vault details. Then you check the vault's current state to see its total assets and available liquidity. You also verify that the depositor account has vault shares to redeem. Without shares, the transaction fails with a tecINSUFFICIENT_FUNDS error.
The withdrawal itself
You create a VaultWithdraw transaction. It names the account requesting the withdrawal, the vault's unique identifier in VaultID, and the amount in Amount. If you give an asset amount, the vault burns the shares needed to provide it. If you give a share amount, the vault converts those shares into the corresponding asset amount. You may add a destination account to receive the assets. If you leave it out, they go to the account that submits the transaction.
After it succeeds
The vault calculates how many shares to burn and transfers the assets from its pseudo-account to the depositor or the destination account. Transfer fees are not charged on VaultWithdraw transactions. To verify, you read the vault's state from the transaction metadata, then check the depositor's share balance and the asset amount received.
Good to know
You can withdraw from a vault whether it is private or public. If you hold vault shares, you can always redeem them. That holds even if your credentials in a private vault's permissioned domain have expired or been revoked.
Source: xrpl.org. Read 6 December 2026.
Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made