> For the complete documentation index, see [llms.txt](https://docs.diversifi.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diversifi.trade/vault-system.md).

# Vault system

A vault is a program-controlled account on Solana that securely holds the portfolio assets for a given **DiversiFi Strategy** or custom portfolio. Each vault corresponds 1:1 with a portfolio configuration and operates as an isolated unit.

***

### **Core Mechanics**

* Deposits:
  * Users deposit USDC into the vault interface.
  * The backend executes token swaps (via Jupiter) into the portfolio’s target token allocation. The deposit account keeps track of the vault's accountability. As long as the swaps haven't gone through, the user can reclaim the deposit before it happens.
  * The vault receives the resulting tokens.
* dToken Minting:
  * Users receive portfolio tokens (**dTokens**, SPL tokens) that represent their proportional exposure to the vault's value.
  * These tokens are minted on deposit and burned on withdrawal.
* Withdrawals:

  * Users can redeem their position from dTokens back to USDC at any time.
  * The backend performs proportional swaps from vault assets back to USDC and sends the result to the user. The withdrawal account keeps track of the vault's accountability. As long as the swaps haven't gone through, the user can reclaim the withdrawal before it happens.

  *Users do not directly hold, own, or control the underlying assets at any point. The underlying assets are held by the vault program, not the user.*

***

### **On-Chain Logic & Safety**

* Non-Custodial:
  * Vaults are program-controlled. Users always hold dTokens that entitle them to redeem their share.
  * No user funds are held by the team or in off-chain systems.
* Isolation:
  * Each portfolio vault is isolated. In the unlikely case of a misbehavior in one vault, it would not affect others.
  * Each vault has its own token mint, account structure, and oracle feed.
* Transparency:
  * Balances, weights, performance data, and vault contents are visible and auditable directly onchain.

***

### Roles & Permissions

DiversiFi separates operational and strategic control across two distinct roles: the **Platform Admin** and **Strategy Managers / Partners**.

🔸 **The Admin**

The Admin is the operational controller of the protocol. It is a multisig controlled by the SolutioFi core team. The Admin does NOT have control over the funds (withdrawals).

🔸 **Partners / Strategy Managers**

A Partner is any external contributor who builds on DiversiFi, either by:

* Creating and managing a strategy or portfolio via our permissioned infrastructure (as a Strategy Manager)
* Integrating DiversiFi vaults into their own app or frontend via our SDK and API

Partners can bring new strategies to the platform or distribute existing ones to their own audiences, without handling infrastructure.

🔸 **Users**

* Can initiate deposits (send USDC) or withdrawals (send dTokens).
* Can cancel/refund a pending deposit or withdrawal if not yet processed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.diversifi.trade/vault-system.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
