# Green Tranche

<figure><img src="https://1325009965-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjH78RcYPfXK7KIyONQb%2Fuploads%2FpNJJj7sfD6yhd2IZje6t%2FGq_fw45aAAAmQhL.jpeg?alt=media&#x26;token=8fd36b04-0725-45f5-9b01-cb7ed8ca5eaa" alt=""><figcaption></figcaption></figure>

#### Main Smart Contract

* **GreenTrancheVault**:
  * Accepts deposits in $Tranche tokens and a risk score.
  * Diversifies investments into asset classes via MCP Funds Manager,, according to the score-based allocation logic.
  * Tracks all user investments, updates logs on every deposit/withdraw/claim.
  * Exposes functions: deposit, withdraw, claim, recordUpdate.

#### Subcontracts

* **MCP Funds Manager**:
  * Receives instructions from GreenTrancheVault to allocate funds.
  * Interacts with asset class contracts and GreenSwap for conversions.
  * Calls back recordUpdate on GreenTrancheVault after actions.
* **Swap MCP**:
  * Handles token swaps using DEX (e.g., Uniswap).
  * Supports single and double swaps.
* **Asset Classes**:
  * **GreenStable**: Invests in MakerDAO ($DAI).
  * **GreenRWAs**: Invests in real-world assets (uses Chainlink/Centrifuge).
  * **GreenSnipe**: Executes snipe strategies (uses BananaGun).
  * **GreenArbitrage**: Arbitrages between DEX/CEX (uses Chainlink, CEX APIs).

<mark style="color:red;">**Note:**</mark> <mark style="color:red;"></mark><mark style="color:red;">All operations will be executed by our smart agent using its dedicated wallet, ensuring minimal human involvement and a more autonomous system.</mark>
