Skip to main content
Two properties of an opportunity decide how a deposit behaves. They are independent of each other.
  • Input token: does the vault take its own deposit token directly, or will the API swap another token in for you? This is the direct vs swap distinction.
  • Settlement: does the deposit complete in one transaction, or does it queue and require a follow-up claim? This is the instant vs async distinction.
Read both off the opportunity object before you build the deposit. For the why and the partner-facing framing, see the Turtle Earn overview.

Direct vs swap

Direct and swap are the two values of the mode field on a deposit request.
ModeWhat it doesAvailable when
directThe user deposits the vault’s native token directly.meta.directInteractionEnabled is true
swapThe user supplies a different input token and the API routes it through a DEX before depositing.meta.routedSwapEnabled is true
Both flags can be true on the same opportunity, in which case you choose the mode. Both can describe the same vault from opposite ends:
Scenariometa.directInteractionEnabledmeta.routedSwapEnabled
Direct deposit onlytruefalse
Swap deposit onlyfalsetrue
Both modes availabletruetrue
Swap mode adds one parameter, slippageBps, the maximum acceptable slippage in basis points. The exact request shape for both modes, including how slippageBps defaults and bounds, is on Deposit.

Instant vs async

Most vaults settle a deposit in a single transaction. Some, including Mellow and Lagoon, queue the deposit and require a second step once the vault processes it.
SettlementWhat happensWhat you do next
InstantThe deposit transaction completes the position in one shot.Nothing. The position is live.
AsyncThe deposit enters a pending state in the vault.Wait for the vault to process it, then claim to finalize (or cancel to abort).
Detect this by reading the boolean settlement flags off the opportunity object:
  • meta.asyncDeposit is false: the deposit completes in a single transaction.
  • meta.asyncDeposit is true: the deposit needs a separate claim step after the vault processes the request. meta.asyncWithdraw signals the same for withdrawals.
For the claim and cancel flow on an async deposit, see Async Deposits.

Putting it together

The two axes combine freely. An opportunity can be direct + instant, swap + instant, direct + async, or swap + async. Resolve both before generating the deposit:
1

Read the input flags

Check meta.directInteractionEnabled and meta.routedSwapEnabled to decide whether you can deposit the user’s token directly or need swap mode.
2

Read the settlement flag

Check meta.asyncDeposit to know whether to expect a follow-up claim.
3

Build the deposit accordingly

Set mode, and if async, plan for the claim step. See Deposit and Async Deposits.