# VLib

## Data Structures

### CreationProps

```solidity
struct CreationProps {
    string vaultName;
    string description;
    string shareName;
    string shareSymbol;
    address strategist; 
}
```

| Name          | Type    | Description               |
| ------------- | ------- | ------------------------- |
| `vaultName`   | string  | name of the vault         |
| `description` | string  | description of the vault  |
| `shareName`   | string  | name of vault's share     |
| `shareSymbol` | string  | symbol of the share       |
| `strategist`  | address | address of the strategist |

### Token

```solidity
struct Token {
    address tokenAddress;
    address priceFeedAddress;
    uint8 priceFeedPrecision;
    uint256 denominator;
}
```

| Name                 | Type    | Description                                                   |
| -------------------- | ------- | ------------------------------------------------------------- |
| `tokenAddress`       | address | address of a token                                            |
| `priceFeedAddress`   | address | address of the token's oracle                                 |
| `priceFeedPrecision` | uint8   | decimal of the response from the price feed. Usually $$10^8$$ |
| `denominator`        | uint256 | decimal of the token                                          |

## UserProps

```solidity
mapping(address => uint256) lastEntries;
```

## ConstantProps

```solidity
struct ConstantProps {
    address factory;
    uint256 createdAt; 
    address share;
}
```

| Name        | Type    | Description                       |
| ----------- | ------- | --------------------------------- |
| `factory`   | address | factory's address                 |
| `createdAt` | uint256 | block timestamp at vault creation |
| `share`     | address | address of vault's share          |

## HistoryProps

```solidity
struct HistoryProps {
    uint256 highWaterMark; 
    uint256[] prevRebalanceSignals; 
    uint256 prevSwap; 
    uint256 prevMngHarvest; 
}
```

| Name                   | Type       | Description                                            |
| ---------------------- | ---------- | ------------------------------------------------------ |
| `highWaterMark`        | uint256    | highest price peak of Vault share                      |
| `prevRebalanceSignals` | uint256\[] | last signal send by the strategist                     |
| `prevSwap`             | uint256    | last timestamp at which the Vault was rebalanced       |
| `prevMngHarvest`       | uint256    | last timestamp at which management fees were collected |

## FeesProps

```solidity
struct FeesProps {
    address beneficiary;
    uint256 exitFees; 
    uint256 managementFeesRate; 
    uint256 managementFeesToStrategist; 
    uint256 performanceFeesRate; 
    uint256 performanceFeesToStrategist; 
}
```

| Name                          | Type    | Description                                                |
| ----------------------------- | ------- | ---------------------------------------------------------- |
| `beneficiary`                 | address | strategist address                                         |
| `exitFees`                    | uint256 | fees in Basis Point : \[0, 10000]                          |
| `managementFeesRate`          | uint256 | from 0 to 1 000 000                                        |
| `managementFeesToStrategist`  | uint256 | fees to strategist in basis point - \[0, 5000]             |
| `performanceFeesRate`         | uint256 | performance fees rate in basis point - \[0, 7500]          |
| `performanceFeesToStrategist` | uint256 | performance fees to strategist in basis point - \[0, 5000] |

## ConfigProps

```solidity
struct ConfigProps {
    bool paused;
    uint8 verified;
    string name;
    string description;
}
```

| Name          | Type   | Description                        |
| ------------- | ------ | ---------------------------------- |
| `paused`      | bool   | indicates if the vault is paused   |
| `verified`    | uint8  | indicates if the vault is verified |
| `name`        | string | name of the vault                  |
| `description` | string | description of the vault           |

## SecurityProps

```solidity
struct SecurityProps {
    uint256 maxAUM; 
    uint256 maxLossSwap; 
    uint256 minAmountDeposit; 
    uint256 maxAmountDeposit; 
    uint256 minFrequencySwap; 
    uint256 minSecurityTime; 
    uint256 minHarvestThreshold; 
}
```

| Name                  | Type    | Description                                                          |
| --------------------- | ------- | -------------------------------------------------------------------- |
| `maxAUM`              | uint256 | maximum amount the vault can handle                                  |
| `maxLossSwap`         | uint256 | price Impact and Slippage                                            |
| `minAmountDeposit`    | uint256 | minimum amount a user can deposit to the vault                       |
| `maxAmountDeposit`    | uint256 | maximum amount a user can deposit to the vault                       |
| `minFrequencySwap`    | uint256 | minimum period during which the operator can not rebalance the vault |
| `minSecurityTime`     | uint256 | minimum time between two deposit/redeem                              |
| `minHarvestThreshold` | uint256 | minimum worth of share to mint from harvesting fees                  |


---

# 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.shprd.finance/technical-reference/core-contracts/vlib.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.
