# Tydro Vaults

Tydro Vaults are ERC-4626 compliant yield-bearing vaults that allow users to supply and withdraw ERC-20 tokens supported by Aave V3. Vaults manage the supply and withdrawal of assets in the Aave Protocol while enabling vault managers to take a fee on the yield earned.

To deploy a vault, clone and deploy from the [Aave Vault contract repository](https://github.com/aave/aave-vault/).

### Aave ERC-4626 Vaults

#### Overview

Aave Vaults follow the [ERC-4626 Tokenized Vault Standard](https://eips.ethereum.org/EIPS/eip-4626), which standardizes the interface for yield-bearing vaults. This standard simplifies integration with various applications and aggregators while improving interoperability across the DeFi ecosystem.

Each vault allows depositors to:

* Deposit supported tokens (assets) and receive vault shares in return
* Redeem vault shares for the underlying assets plus accrued yield
* Automatically earn yield from Aave V3 markets without direct interaction with the protocol

#### Architecture

Aave Vaults consist of three key components:

1. **ERC-4626 Interface**: Standardized methods for deposit, withdrawal, and accounting of assets.
2. **Yield Strategy**: Manages deposits into Aave V3 markets and handles yield accrual.
3. **Fee Management**: Enables vault managers to collect a percentage of the yield generated.

When a user deposits an asset into a vault:

* The vault mints proportional vault shares (ERC-20 tokens) to the user
* The vault deposits the underlying assets into the corresponding Aave V3 market
* The vault receives aTokens from Aave, which automatically accrue yield
* Yield is reflected in the increasing value of vault shares over time

#### Fee Structure

Vault managers can set a fee percentage on the yield generated by the vault. This fee structure includes:

* **Performance Fee**: A percentage of the yield earned that goes to the vault manager
* **Max Fee**: A maximum limit on the performance fee that can be charged
* **Fee Recipient**: The address that receives the collected fees

Fees are collected when yield is realized through:

* User withdrawals or redemptions
* Explicit fee collection by the vault manager

The fee is only applied to the yield portion of the assets and not to the principal amount deposited by users.

#### Interacting with Vaults

Vaults implement the standard ERC-4626 interface with methods such as:

* deposit(uint256 assets, address receiver): Deposit assets and receive vault shares
* withdraw(uint256 assets, address receiver, address owner): Withdraw assets by burning vault shares
* mint(uint256 shares, address receiver): Mint exact amount of shares by depositing assets
* redeem(uint256 shares, address receiver, address owner): Redeem shares for underlying assets

Additionally, vaults provide view functions to check:

* totalAssets(): Total assets managed by the vault
* convertToShares(uint256 assets): Convert asset amount to vault shares
* convertToAssets(uint256 shares): Convert vault shares to asset amount
* previewDeposit(uint256 assets): Preview shares received for a deposit
* previewWithdraw(uint256 assets): Preview shares needed for a withdrawal

For a detailed contract reference, see [here](https://aave.com/docs/smart-contracts/vaults).

#### Benefits for Users

* **Simplified Yield**: Earn yield from Aave V3 without managing multiple transactions
* **Gas Efficiency**: Lower gas costs compared to direct protocol interactions
* **Standard Interface**: Easier integration with other DeFi protocols and applications
* **Composability**: Vault shares can be used in other DeFi applications

#### Benefits for Vault Managers

* **Yield Capture**: Earn fees on yield generated by user deposits
* **Customization**: Configure fee parameters to suit different strategies
* **Standardization**: Leverage the ERC-4626 standard for broader integration


---

# 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.tydro.com/developers/tydro-vaults.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.
