- 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.
Direct vs swap
Direct and swap are the two values of themode field on a deposit request.
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:
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.
Detect this by reading the boolean settlement flags off the opportunity object:
meta.asyncDepositisfalse: the deposit completes in a single transaction.meta.asyncDepositistrue: the deposit needs a separate claim step after the vault processes the request.meta.asyncWithdrawsignals the same for withdrawals.
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.
