Deposit flow
- 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 tosucceededonce confirmed onchain.
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.
Usage
- REST API
To deposit funds via REST API, make a
POST request to:Parameters
The unique identifier for the vault. Copy this from the Privy Dashboard after deploying a fee wrapper.
Human-readable decimal amount to deposit (e.g.
"1.5" for 1.5 USDC). Exactly one of amount or raw_amount must be provided.Amount to deposit in the token’s smallest unit (e.g.
"1500000" for 1.5 USDC with 6 decimals). Exactly one of amount or raw_amount must be provided.Wallets with
owner_id present must provide an authorization
signature as a request header for deposit operations.Returns
The wallet action ID. Use this to poll status with get wallet action.
The ID of the wallet that deposited funds.
The action type. Always
"earn_deposit" for this endpoint.The current status of the deposit action.
CAIP-2 chain identifier for the deposit (e.g.
"eip155:8453").The ID of the vault receiving the deposit.
The ERC-4626 vault contract address.
The address of the underlying asset token.
Amount deposited in the token’s smallest unit.
Human-readable decimal amount (e.g.
"1.5"). Only present when the token is known in the asset registry.Asset identifier (e.g.
"usdc"). Only present when the token is known in the asset registry.Number of decimals for the underlying asset. Only present when the token is known in the asset registry.
Vault shares received in base units.
null until the action succeeds.ISO 8601 timestamp of when the action was created.
The execution steps. Only returned if
?include=steps is provided on a GET request.Example
Example response
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.Next steps
Setup
Deploy a fee wrapper and configure a vault.
Withdraw and claim
Withdraw deposited assets with accrued yield and claim reward incentives.
Manage positions
Query vault positions and track activity with webhooks.

