Skip to main content
A deposit moves assets from a user’s wallet into your organization’s fee wrapper for a vault. The token approval and the vault deposit execute as a single atomic batch transaction, so there is no separate approval step to manage.
Earn is in private beta. Contact us to enable it for your organization.

Prerequisites

  • Your organization has deployed a wrapper for the vault, and its deployment status is COMPLETED. Deposits targeting an address with no deployed wrapper fail with EARN_SETUP_REQUIRED.
  • The signWith wallet holds enough of the vault’s underlying asset. For non-sponsored deposits it also needs the chain’s native token for gas.
Sub-organization wallets can deposit into (and withdraw from) wrappers deployed by their parent organization. The wrapper configuration lives on the parent, the sub-org wallet signs, and no per-sub-org deployment is needed.

Submit the deposit

enum<string>
required
ACTIVITY_TYPE_EARN_DEPOSIT
string
required
Timestamp (in milliseconds) of the request, used to verify liveness.
string
required
Unique identifier for your organization (or the sub-organization whose wallet is depositing).
string
required
Address of the deployed fee wrapper to deposit into, from earn_enabled_vaults.
string
required
The wallet account address to deposit from and sign with.
string
required
Amount of the underlying asset to deposit, in raw on-chain units (e.g. "1000000" for 1 USDC at 6 decimals).
string
required
CAIP-2 chain identifier, e.g. eip155:8453.
boolean
Whether to sponsor the transaction’s gas via Gas Station. Defaults to false.
The result contains only a poll handle:

Gas: sponsored vs self-funded

With sponsor: true, Gas Station pays the gas and the batch executes as an EIP-7702 sponsored transaction. The signWith wallet needs no native token at all. This requires a Pro plan or higher. With sponsor: false, the signWith wallet pays gas itself, so fund it with the chain’s native token before depositing.

Poll deposit status (required)

A COMPLETED activity means the transaction was enqueued for broadcast, not that it landed on-chain. A transaction that later fails (for example, from an insufficient token balance) is invisible in the activity result. Poll earn_deposit_status until it reports COMPLETED (included on-chain) or FAILED.
status is PENDING, COMPLETED, or FAILED. On FAILED, the response includes an error field with the reason. See Submissions for general activity semantics.

Next steps