<!--
Parallel Documentation — this page, as markdown.
Index of every page: https://docs.parallel.best/llms.txt
The whole documentation in one file: https://docs.parallel.best/llms-full.txt
-->

# Opening a vault

:::warning
You're reading the legacy **v2** documentation. For current Parallel features, see [v3](/products/parallel-v3).
:::

To create a vault and deposit WETH collateral equal to `DEPOSIT_AMOUNT` to it, follow these steps:

* Approve the collateral ERC20 asset (WETH) to the [**VaultsCore** address](https://app.gitbook.com/@mimo-defi/s/mimo-defi/~/drafts/-MewpTJxUIffxdZakurk/developers/contract-addresses) equal to at least the `DEPOSIT_AMOUNT`.

```
WETH.approve(VaultsCore address, DEPOSIT_AMOUNT)
```

* Call the `VaultsCore.deposit()` function with the desired collateral address and deposit amount.

```
VaultsCore.deposit(WETH address, DEPOSIT_AMOUNT)
```

* You can view your vault details from the `VaultsCore.vaults()`view function.

```
myVaultId = VaultsDataProvider.vaultId(WETH address, your address);
myVault = VaultsDataProvider.vaults(vaultId)
```

* Each Vault has the following information:

```
struct Vault {
    address collateralType;
    address owner;
    uint256 collateralBalance;
    uint256 baseDebt;
    uint256 createdAt;
  }
```
