# Vault Architecture

Venzo vaults are implemented as upgradeable smart contracts deployed on supported EVM-compatible chains. Each vault operates as an independent, isolated pool of capital with its own strategy logic, risk parameters, and performance tracking.

***

### Smart Contract Design

Each Venzo vault is built on a modular smart contract architecture that separates concerns across three layers:

**Deposit/Withdrawal Layer:** This layer handles user-facing interactions, including deposits, withdrawals, and share token minting/burning. When a user deposits stablecoins into a vault, they receive vault share tokens (vTokens) that represent their proportional ownership of the vault's total assets. These vTokens are ERC-20 compliant and can be held, transferred, or used as collateral in other DeFi protocols.

**Strategy Layer:** This layer contains the specific yield-generation logic for each vault type. For Crypto Liquid Strategy vaults, this includes the delta-neutral hedging algorithms, position management, and rebalancing logic. For RWA vaults, this layer interfaces with off-chain asset managers through verified oracle feeds and attestation mechanisms.

**Accounting Layer:** This layer maintains the vault's net asset value (NAV), tracks fee accruals, and calculates share prices. The NAV is updated at regular intervals (typically daily for liquid strategies and weekly for illiquid strategies) based on the mark-to-market value of the underlying assets.

***

### Deposit and Withdrawal Flow

The deposit and withdrawal process follows a carefully designed flow to ensure security and fairness:

{% stepper %}
{% step %}
**Deposit Request:** The user submits a deposit transaction specifying the amount of stablecoins to deposit.
{% endstep %}

{% step %}
**Validation:** The smart contract validates the deposit against the vault's capacity limits, minimum deposit requirements, and any whitelist restrictions.
{% endstep %}

{% step %}
**Share Minting:** Upon successful validation, the contract calculates the number of vTokens to mint based on the current share price (NAV per share) and transfers them to the user's wallet.
{% endstep %}

{% step %}
**Capital Deployment:** The deposited stablecoins are queued for deployment into the underlying strategy during the next rebalancing cycle.
{% endstep %}
{% endstepper %}

Withdrawals follow a similar but reverse process, with additional safeguards:

{% stepper %}
{% step %}
**Withdrawal Request:** The user submits a withdrawal request specifying the number of vTokens to redeem.
{% endstep %}

{% step %}
**Queue Processing:** For liquid vaults, withdrawals are processed immediately if sufficient idle capital is available. For illiquid vaults, withdrawals enter a queue and are processed during the next epoch window.
{% endstep %}

{% step %}
**Share Burning:** Once the withdrawal is processed, the corresponding vTokens are burned and the underlying stablecoins are transferred to the user's wallet.
{% endstep %}

{% step %}
**Settlement:** The settlement period varies by vault type, ranging from instant (for cash management vaults) to 30-90 days (for private credit vaults).
{% endstep %}
{% endstepper %}


---

# 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://venzofinance.gitbook.io/venzofinance-docs/vault-architecture.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.
