# Deposit from a source chain
Source: https://docs.chain.link/solutions/cross-chain-vault-adapter/guides/deposit-from-source-chain

> For the complete documentation index, see [llms.txt](/llms.txt).

The steps we undertook in the previous two tutorials make it possible for us to work with the Cross-Chain Vault Adapter and perform cross-chain deposits seamlessly.

On this page, your wallet acts as a user on Arbitrum Sepolia: \
It sends one CCIP message and deploys nothing. [Deposit flow](/solutions/cross-chain-vault-adapter/overview/how-it-works#deposit-flow) shows each step the adapter takes.

> This tutorial continues from [Deploy the adapter](/solutions/cross-chain-vault-adapter/guides/deploy-the-adapter), which deploys an adapter for Vault CCIP-BnM (vCCIP-BnM) that accepts requests from Arbitrum Sepolia and charges a 0.001 CCIP-BnM adapter fee on output that returns there.

With the adapter deployed and configured, you will be able to deposit into an ERC-4626 vault on Ethereum Sepolia from Arbitrum Sepolia with one CCIP message, and receive the vault's shares on Arbitrum Sepolia.

The hub chain is the chain where the vault and the adapter are deployed, and a source chain is any other chain that users send deposits and redemptions from. Here, Ethereum Sepolia is the hub chain and Arbitrum Sepolia is the source chain.

The tutorial walks you through four main steps:

1. Get CCIP-BnM on Arbitrum Sepolia.
2. Preview a deposit of 0.1 CCIP-BnM and set a minimum output 1% below the preview.
3. Build the payload and send it with 0.1 CCIP-BnM from Arbitrum Sepolia to the adapter.
4. Confirm that the adapter deposited into the vault, find the return leg, and check that 0.099 vCCIP-BnM reached your wallet on Arbitrum Sepolia.

## Before you begin

You need:

- ccip-cli, Foundry, Node.js, and the `cross-chain-vault-adapters` repository, set up in [Set up your development environment](/solutions/cross-chain-vault-adapter/guides/deploy-the-vault#set-up-your-development-environment).
- A Foundry keystore for your wallet, which acts as a user on Arbitrum Sepolia in this tutorial. Use the same keystore in every tutorial of this solution.
- An ERC-4626 vault on Ethereum Sepolia whose share token is a CCIP cross-chain token between Ethereum Sepolia and Arbitrum Sepolia. [Deploy the vault and set up its share token](/solutions/cross-chain-vault-adapter/guides/deploy-the-vault) sets one up.
- An adapter on Ethereum Sepolia for that vault that accepts requests from Arbitrum Sepolia and has deposits enabled. [Deploy the adapter](/solutions/cross-chain-vault-adapter/guides/deploy-the-adapter) deploys one.

> **CAUTION: Before you continue**
>
> - **Arbitrum Sepolia ETH**: required for Arbitrum Sepolia transactions and for the CCIP fee of your request, about 0.0023 Arbitrum Sepolia ETH at the time of writing. Get it from the [Chainlink faucet](https://faucets.chain.link).
> - **CCIP-BnM on Arbitrum Sepolia**: at least 0.1, the amount you deposit. [Get CCIP-BnM on Arbitrum Sepolia](#get-ccip-bnm-on-arbitrum-sepolia) shows how.
> - **Ethereum Sepolia ETH in the adapter**: at least 0.001 Ethereum Sepolia ETH, which pays the return leg's CCIP fee. [Check the adapter](#check-the-adapter) reads the balance. Topping it up takes Ethereum Sepolia ETH from your wallet.

> **TIP: Bringing your own vault or adapter?**
>
> Skip only what you already have:
>
> - If you ran both previous tutorials in this terminal, run only the first command block in [Set your shell variables](#set-your-shell-variables), then continue with [Check the adapter](#check-the-adapter).
> - If you bring your own vault, adapter, or share token, set the variables in [Set your shell variables](#set-your-shell-variables) to your addresses. Set `ETHEREUM_SEPOLIA_CCIP_BNM` to your vault's asset on Ethereum Sepolia and `ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_CCIP_BNM` to the same token on Arbitrum Sepolia. In the `preview` call and in the payload builder's `AMOUNT`, scale `100000000000000000` (0.1 of an 18-decimal asset) to your asset's decimals. `ccip-cli` takes whole tokens, so `=0.1` stays the same.
> - Your adapter must accept Arbitrum Sepolia as a source chain, allowlist your vault, allow deposits, and hold Ethereum Sepolia ETH. Your share token must be a cross-chain token between Ethereum Sepolia and Arbitrum Sepolia.
> - If you already hold at least 0.1 CCIP-BnM on Arbitrum Sepolia, skip `drip` in [Get CCIP-BnM on Arbitrum Sepolia](#get-ccip-bnm-on-arbitrum-sepolia). If your starting balances differ from the values shown, compare the changes instead. If you did not set up the share token with the Lock & Mint tutorial, skip the lockbox check in [Confirm the balances](#confirm-the-balances).

## Build the request

## Send the request

## Check the result

In the transaction that executed your request, the CCIP-BnM pool on Ethereum Sepolia minted 0.1 CCIP-BnM to the adapter. The token the adapter received is the vault's asset, so the adapter treated the request as a deposit. In the same transaction, the adapter:

1. Kept the 0.001 CCIP-BnM adapter fee.
2. Deposited the remaining 0.099 CCIP-BnM into the vault, which in turn minted 0.099 vCCIP-BnM back to the adapter.
3. The adapter then checked the 0.099 vCCIP-BnM against your `minimumOut` of 0.09801 vCCIP-BnM.
4. Sent the 0.099 vCCIP-BnM to your wallet on Arbitrum Sepolia in the return leg, and paid the CCIP fee from its Ethereum Sepolia ETH.
5. The Lock & Release pool locked the shares in the lockbox on Ethereum Sepolia, while you received the corresponding vCCIP-BnM on Arbitrum Sepolia.

> **NOTE: Where to go next**
>
> [Redeem from a source chain](/solutions/cross-chain-vault-adapter/guides/redeem-from-source-chain): redeem 0.1
> vCCIP-BnM from Arbitrum Sepolia for CCIP-BnM, withdraw the adapter fees as the vault operator, and review all four
> CCIP messages. Stay in this terminal and in the `cross-chain-vault-adapters` directory.