# Deposit in a vault

Any user can deposit in a vault. The user must deposit **base token**, which is the first token of the vault contained in the structure (in Solidity, at vault.tokens(0)). Most of the time it will be dollar pegged stablecoin. For a vault with \[USDC, WBTC, WETH, WMATIC], the deposited token must be USDC.

{% hint style="info" %}
The deposit transaction must not change the vault's current exposure to its underlying assets, so on each deposit the transaction takes as input calldata the associated swaps (generated by the Dex Aggregator API) to exchange the amount deposited.
{% endhint %}

## How to deposit in a vault

On the Vaults page you can decide on which vault you want to deposit. If you want more precision about a vault or deposit, you can click on "see details to deposit".

<figure><img src="https://4042996663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp22VZjhas5Bq2OgV9HzX%2Fuploads%2FXvnZt8slfKNwVgNUQ8ac%2FCapture%20d%E2%80%99e%CC%81cran%202022-10-24%20a%CC%80%2009.28.47.png?alt=media&#x26;token=828157d1-eba9-4a55-853e-ec0a62506c7e" alt=""><figcaption><p>Vaults</p></figcaption></figure>

Then click on "Deposit"

<figure><img src="https://4042996663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp22VZjhas5Bq2OgV9HzX%2Fuploads%2Fb9yvZDfITt68TIY1QaeK%2FCapture%20d%E2%80%99e%CC%81cran%202022-10-24%20a%CC%80%2009.30.56.png?alt=media&#x26;token=d35fd1b8-d7ec-4de7-adbb-dd495b3d0411" alt=""><figcaption><p>Vault Overview</p></figcaption></figure>

{% hint style="info" %}
As is usual in DeFi with protocols that use ERC20 contracts, you have to sign **2 transactions** to invest in a vault:

1. **Approval** transaction : Allow the protocol to interact with a quantity of ERC20 tokens that you own.
2. **Deposit** transaction : Execute the deposit transaction.&#x20;
   {% endhint %}

If you click on "Approved" you will see the amount of base token you have already approved and if you click on "Balance" you will see your base token balance.&#x20;

You will also find the essential information on the vault: &#x20;

* **Name :** Name of the vault
* **TVL :** Total value locked in the vault
* **Min deposit :** Minimum deposit amount of basic tokens allowed
* **Max AUM :** Maximum total market value of the vault

You can now enter the amount of base token to **approve** and click on "Approve SHPRD to access your ...". Here, the amount to approve is 6 BUSD.

<figure><img src="https://4042996663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp22VZjhas5Bq2OgV9HzX%2Fuploads%2FgwNb5oHAk8mcmXi2GD0p%2FCapture%20d%E2%80%99e%CC%81cran%202022-10-18%20a%CC%80%2017.39.13.png?alt=media&#x26;token=b3bf3c66-ed6b-48bb-a91c-1ba61f18b15f" alt=""><figcaption><p>Approve SHPRD to access your BUSD</p></figcaption></figure>

A Metamask pop-pup should now appear. Take the time to check the transaction and sign it.  As you can see below, this transaction allows the vault to interact with 6 BUSD.

{% hint style="info" %}
You will need some **BNB** on the BSC or **ETH** on Arbitrum to pay the **gas fee**.
{% endhint %}

<figure><img src="https://4042996663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp22VZjhas5Bq2OgV9HzX%2Fuploads%2F3hthHvtKkA1v7Hh15ett%2FCapture%20d%E2%80%99e%CC%81cran%202022-10-18%20a%CC%80%2017.40.58.png?alt=media&#x26;token=73720dd6-6dc1-4ff5-ae09-57de62295139" alt=""><figcaption><p>Metamask - Approval transaction</p></figcaption></figure>

After the end of the approval, you will be able to deposit. Click on "Deposit ...". Here the amount to deposit is 6 BUSD.&#x20;

<figure><img src="https://4042996663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp22VZjhas5Bq2OgV9HzX%2Fuploads%2FWIl1UvE9fCG2rssPghlM%2FCapture%20d%E2%80%99e%CC%81cran%202022-10-18%20a%CC%80%2017.41.48.png?alt=media&#x26;token=5918abcb-ec84-4b9b-b4f2-8aeb1151010e" alt=""><figcaption><p>Deposit funds in a vault</p></figcaption></figure>

A second pop-up window should appear, sign it to execute the deposit transaction. You are now the owner of some vault shares.

You can see all deposit you have made on this page : <https://beta.shprd.finance/app/wallet>
