# Tranche-Based Yield Vault Architecture
This document outlines a tentative design for a **DeFi tranche vault**, an asset management vault designed to cater to different risk and return preferences. The core concept involves segmenting the returns and risks associated with underlying DeFi protocols into distinct tranches: the **Fixed Yield** tranche and the **Variable Yield** tranche.
The **Fixed Yield** option is designed to attract investors with low risk tolerance, potentially including those from traditional finance (TradFi) and retail sectors who may be new to blockchain and DeFi. These depositors aim to receive a relatively **guaranteed** fixed-percentage yield at the end of a defined cycle.
In contrast, the **Variable Yield** option targets DeFi users who seek higher returns and are willing to accept greater potential drawdowns and systematic risks. These users receive the remaining returns after the fixed yield obligations are met.

## Motivation
The motivation behind this design is to create an equilibrium where the fixed-yield rate becomes more attractive than traditional risk-free rates, thus drawing in a wider range of investors. This increased participation and the potential for excess returns then serve to boost the variable yield, further enhancing the attractiveness of both tranches.
### Related Solutions
Protocols like *Ondo Finance* also employ a similar structure with *Fixed Yield (FY)* depositors and *Variable Yield (VY)* depositors within their Ondo Vaults. These vaults aim to make DeFi yields accessible to investors with varying risk appetites by offering risk-isolated, fixed yield opportunities.
Similarly, *Idle Finance* features Yield Tranches as part of its product suite. The design of these tranche vaults typically involves an operation manager who sets a fixed-yield rate and determines the allocation of deposited assets across various DeFi protocols based on estimated yields, risk levels, and the capital distribution between the Fixed Yield and Variable Yield options.
## Vault Design and Operations
The design of a DeFi tranche vault generally follows a cyclical process with distinct stages, as outlined in the references and our discussion.
### Cycle Initialization by the Operation Manager
Before each investment cycle begins, the operation manager plays a crucial role in defining the vault's parameters. This includes:
* **Releasing a fixed-yield rate:** This is the "guaranteed" percentage yield that Fixed Yield depositors can expect to receive at the end of the cycle.
* **Identifying potential DeFi protocols:** The manager specifies the DeFi protocols where the deposited assets will be deployed to generate yield.
### User Deposits and Tranche Selection
* Users deposit a **base token** (e.g., USDC) into the tranche vault.
* At the time of deposit, users choose their preferred yield option: **Fixed Yield** or **Variable Yield**, based on their risk and return appetite.
### Asset Allocation by the Manager
The operation manager is responsible for allocating the deposited capital across the identified DeFi protocols. This crucial decision is based on several factors, including:
* **Estimated yields** of the various protocols.
* **Risk levels** associated with each protocol.
* The **fund ratio between the Fixed Yield and Variable Yield options** (i.e., the total amount deposited into each tranche).
The manager aims to optimize the allocation to achieve the target fixed-yield rate while maximizing potential returns for Variable Yield depositors.
#### A Tentative Algorithm
The manager determines the fixed rate and allocation weights by solving the following optimization:
$$
\max_{\mathbf{w}} \sum_i w_i r^\alpha_i - \lambda(\beta) \sum_i w_i \ln w_i - \sum_i \lambda_i (w_i - w^r_i)_+
$$
where
* $\mathbf{w} = (w_1, \dots, w_n)$ is the weight vector.
* $r^\alpha_i$ is the estimated $\alpha$-quantitle of the return for the $i$-th yield protocol.
* $\lambda(\beta)$ is the diversification penalty parameter as a function of the fixed-variable ratio $\beta$.
* $\lambda_i$ is the concentration risk penalty parameter for the $i$-th yield protocol.
* $w^r_i$ is the soft cap for the $i$-th yield protocol.
The fixed-yield rate is given by $\sum_i w_i r^\alpha_i$.
### Deployment and Yield Generation
Once the allocation is determined, the vault deploys the deposited assets into the chosen DeFi protocols to generate yield over a **preset duration or cycle**.
### Maturity and Distribution of Returns
* At the end of the predetermined cycle, the vault withdraws the assets from the DeFi protocols.
* Fixed Yield depositors are paid back their original principal along with the preset fixed yield.
* Variable Yield depositors receive the remaining assets after the Fixed Yield obligations have been met. They bear the brunt of potential drawdowns but also benefit from excess returns generated beyond the fixed yield.

### Fee Structure
* The manager may charge a **fixed-percentage fee** based on the generated yield: $$\gamma \cdot \max (\sum_i w_i r_i, 0)$$
* An **exit fee** might also be implemented to encourage long-term investment and fund stability. These fees could be redistributed to all vault users.
The design aims to create a system where investors with different risk tolerances can participate in DeFi yield generation through a structured and segmented approach.
## References
* https://docs.idle.finance/
* https://medium.com/idle-finance/ethena-usde-yield-tranches-4e3e7d360b8b
* https://blog.ondo.finance/introducing-ondo-finance/
* https://blog.ondo.finance/analyzing-return-scenarios/