> ## Documentation Index
> Fetch the complete documentation index at: https://docs.turtle.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Deposit Modes

> Two things vary per opportunity: which token a deposit accepts, and whether it settles in one step or asynchronously

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 [Distribution overview](https://docs.turtle.xyz/partner-products/distribution/overview.md).

## Direct vs swap

Direct and swap are the two values of the `mode` field on a deposit request.

| Mode | What it does | Available when |
| - | - | - |
| `direct` | The user deposits the vault's native token directly. | `meta.directInteractionEnabled` is `true` |
| `swap` | The 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:

| Scenario | `meta.directInteractionEnabled` | `meta.routedSwapEnabled` |
| - | - | - |
| Direct deposit only | `true` | `false` |
| Swap deposit only | `false` | `true` |
| Both modes available | `true` | `true` |

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](https://docs.turtle.xyz/sdk/earn/deposit.md).

## 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.

| Settlement | What happens | What you do next |
| - | - | - |
| Instant | The deposit transaction completes the position in one shot. | Nothing. The position is live. |
| Async | The 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](https://docs.turtle.xyz/sdk/earn/async-deposits.md).

## 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](https://docs.turtle.xyz/sdk/earn/deposit.md) and [Async Deposits](https://docs.turtle.xyz/sdk/earn/async-deposits.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.