# Shares price\&fees

#### Deposit

When depositing ERC-20 assets to the interest vault users receive a corresponding amount of asset shares which is calculated depending on the current share price. The formula to calculate the shares amount:

$$
\text{Share Price} = \frac{\text{Deposit Amount} \times \text{Shares Total Supply}}{\text{Total Deposits in the Vault}}
$$

When users contribute an ERC-20 asset to the vault, they are granted _Asset Shares_ correlating to the prevailing _Share Price_. These shares signify the holder's proportional claim to the vault's aggregate assets. The shares allocated upon deposit match the value of the user's input in relation to the entire asset pool at that time. The _Share Price_ adjusts exclusively in response to the accumulation of interest, which, being a non-negative value, ensures that the amount of ERC-20 assets each _Asset Share_ can be exchanged for will not reduce.

**For instance**

Consider Alice, who secured 10 USDT in the vault, when the initial Share Price was set at 1.00, earning her 10 receipt tokens. Following her contribution, the vault has generated 1 USDT in interest, making the _Asset Amount_ tally 11 (comprising her 10 USDT and the accrued 1 USDT).&#x20;

The updated _Share Price_ is now 1.10, calculated from dividing the new total USDT (11) by the original receipt tokens (10).

If Bob were to add 10 USDT at this stage, the _Asset Amount_ within the vault would rise by his 10 USDT. With the _Share Price_ at 1.10, Bob's contribution secures him 90.91 receipt tokens (calculated as 10 USDT divided by 1.10).

As the vault continues to earn interest over time, both Alice and Bob will be entitled to a progressively greater quantity of the foundational asset in exchange for their receipt tokens.

#### Withdraw

Users are eligible to withdraw their assets from the vault at any time, without delays.&#x20;

However, keep in mind 0.1% withdrawal fee charging, which is applied. This prevents short-term deposits and potential fraud caused by it.

$$
\text{Withdraw Amount} = \text{User's Position} -  \text{Withdraw Fee}
$$

Withdraw fee is set in smart contracts, and can be changed by the admin, and can't be more than _max\_withdraw\_fee_ which is predetermined to 5%.
