How-to for developers · Trading and DeFi

Deposit into a Vault

In plain words

This guide shows how to deposit assets into a single asset vault. In return you receive shares that represent your proportional ownership of the vault's assets.

Written by zerps in plain words, from the source linked below.
Section
Tutorials

What you need

You need access to an existing vault, a balance of the vault's asset and a client library: xrpl.js for JavaScript or xrpl-py for Python. For a private vault you also need valid credentials in the vault's permissioned domain. The feature requires the SingleAssetVault amendment. Always check that the vault owner and the vault settings meet your standards before you deposit.

The steps in short

Read the vault's current state with the vault_info method, including its total value and available liquidity. Check that the depositing account holds enough of the asset. Prepare a VaultDeposit transaction with the depositing account, the VaultID and the amount, then submit it.

When it fails

Without enough funds the transaction fails with tecINSUFFICIENT_FUNDS. If the asset in the Amount field does not match the vault's asset type, it fails with tecWRONG_ASSET. For a private vault, a depositor without valid credentials gets tecNO_AUTH.

When it succeeds

The assets move from the depositing account to the vault's pseudo-account, and the vault issues shares to the depositor. Transfer fees are not charged on VaultDeposit transactions. You can read the vault's new state from the transaction result without further requests. On a first deposit a new MPToken entry is created for the shares. On later deposits the existing share balance is updated.

Source: xrpl.org. Read 6 December 2026.

Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made

zerps Trading tokens on the XRP Ledger carries risk, including total loss. zerps is a self-custodial interface; it does not hold funds, give advice, or execute trades on your behalf.