# Vault

## Overview

The `Vault` contract extends the ERC4626Fees contract to manage a financial vault with entry fees. It enables depositing and withdrawing assets in exchange for shares, incorporating an entry fee mechanism.

## Methods

## <mark style="color:blue;">`deposit`</mark>

Deposits assets into the vault in exchange for shares.

### Parameters

| **Parameter** | **Type**  | **Description**                           |
| ------------- | --------- | ----------------------------------------- |
| `assets`      | `uint256` | The amount of assets to deposit.          |
| `receiver`    | `address` | The address that will receive the shares. |

### Returns

| **Return** | **Type**  | **Description**              |
| ---------- | --------- | ---------------------------- |
| `shares`   | `uint256` | The number of shares issued. |

## <mark style="color:blue;">`mint`</mark>

Mints shares in the vault in exchange for assets.

### Parameters

| **Parameter** | **Type**  | **Description**                           |
| ------------- | --------- | ----------------------------------------- |
| `shares`      | `uint256` | The number of shares to mint.             |
| `receiver`    | `address` | The address that will receive the assets. |

### Returns

| **Return** | **Type**  | **Description**                 |
| ---------- | --------- | ------------------------------- |
| `assets`   | `uint256` | The number of assets deposited. |

## <mark style="color:blue;">`redeem`</mark>

Redeems shares from the vault in exchange for assets.

### Parameters

| **Parameter** | **Type**  | **Description**                           |
| ------------- | --------- | ----------------------------------------- |
| `shares`      | `uint256` | The number of shares to redeem.           |
| `receiver`    | `address` | The address that will receive the assets. |
| `owner`       | `address` | The address of the owner of the shares.   |

### Returns

| **Return** | **Type**  | **Description**                 |
| ---------- | --------- | ------------------------------- |
| `assets`   | `uint256` | The number of assets withdrawn. |

## <mark style="color:blue;">`withdraw`</mark>

Withdraws assets from the vault in exchange for shares.

### Parameters

| **Parameter** | **Type**  | **Description**                           |
| ------------- | --------- | ----------------------------------------- |
| `assets`      | `uint256` | The amount of assets to withdraw.         |
| `receiver`    | `address` | The address that will receive the assets. |
| `owner`       | `address` | The address of the owner of the assets.   |

### Returns

| **Return** | **Type**  | **Description**              |
| ---------- | --------- | ---------------------------- |
| `shares`   | `uint256` | The number of shares burned. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.volary.io/template-library/smart-contracts/vault.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
