Deposit assets from a wallet into a vault using the deposit endpoint. Privy handles the ERC-20 approval and deposit in a single call. The wallet depositing funds and the admin wallet will receive shares corresponding to the fee share split.
View the full API reference for the deposit endpoint.
If your app has gas sponsorship configured, usage of the /earn/ethereum/deposit endpoint will be
gas-sponsored by default. There is no need to specify
additional parameters for sponsorship.
Privy approves the vault to spend the specified amount of the wallet’s ERC-20 tokens.
The vault converts the deposited assets into vault shares at the current share price.
Shares are split between the depositing wallet and your app’s admin wallet based on the fee percentage configured during setup.
The deposit is created as a wallet action with status pending. Privy prepares, signs, and broadcasts the transaction asynchronously. The status moves to succeeded once confirmed onchain.
The share_amount in the response is null while the action is pending. Once the action succeeds, it reflects the number of shares minted to the depositing wallet. To see the admin wallet’s fee shares, query the admin wallet’s position.
The wallet must hold enough of the deposit token to cover the full amount. If the balance is
insufficient, the deposit fails. Your app should check the wallet’s token balance before
initiating a deposit.
A rejected status means the action failed before any transaction was signed or broadcast — for
example, due to insufficient balance or a policy violation. Your app can safely retry the request.
A failed status means a transaction was broadcast but reverted onchain. Inspect the action’s
steps for details.