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

# Vault zaps

> Deposit any token into a supported ERC-4626 vault, or redeem vault shares into any token, in one transaction.

Robinhood Chain. A zap is a normal [`/quote`](https://docs.route.fun/api-reference/quote) where `out` (zap in) or `in` (zap out) is a supported vault.
Route swaps to or from the vault's asset and deposits or redeems in the same transaction.

| Direction | `in` | `out` | `amount` |
| - | - | - | - |
| Zap in | Any token | The vault | Input token, raw units |
| Zap out | The vault | Any token | Vault shares, raw units |

The supported vaults are listed on chain: `vaults()` on the
[VaultRegistryModule](https://robin.etherscan.io/address/0x4b7690660748e5cf4be38f8a1efd3e72c9b94643#readContract). Vault to vault
is not supported. Zaps cannot be streamed or combined with `prefer` or `gasless`.

The response has a `zap` object:

| Field | Meaning |
| - | - |
| `zap.vault` | The vault |
| `zap.direction` | `in` or `out` |
| `zap.asset` | The vault's underlying asset |
| `zap.shares` | Shares received (zap in) or redeemed (zap out) |
| `zap.assets` | Assets deposited (zap in, after fees) or paid out by the redeem (zap out) |
| `zap.feeBps`, `zap.partnerFeeBps` | The fees on this zap. Zaps report fees here, not in `fee`. |

A zap out the vault cannot pay right now fails with `vault liquidity insufficient` and `available`: the assets the vault can pay
out now.

With `recipient`, the transaction targets RouteEntry like any other build; approve `swap.spender` for the input token (or for the
vault shares on a zap out).


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