> ## Documentation Index
> Fetch the complete documentation index at: https://yieldxyz.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart contract addendum

> A conceptual, contract-level view of the Meta Vault: its components, its roles, and the invariants that hold across them.

This addendum complements the product-level [Meta Vaults overview](/documentation/platform/vaults/meta-vaults/index) with a contract-level view: the components involved, how they relate, and the invariants worth knowing before you rely on one. It describes the contract conceptually rather than function by function; see [Architecture](/documentation/platform/vaults/meta-vaults/architecture) for the operational flow.

## Components

| Component | Role |
| - | - |
| Vault contract | The ERC-4626 entrypoint. Holds the whitelisted strategy set, target weights, and idle target; exposes the standard user functions plus role-gated management functions |
| Strategy set | Each entry is itself an ERC-4626 vault. Yield sources that are not natively ERC-4626 are wrapped in a minimal adapter that presents one, the same wrapper pattern OAVs use |
| Compounding pipeline | A configurable reinvestor component the vault delegates reward claiming and swapping to, so the core vault contract does not embed swap logic directly |
| Off-chain allocation service | Reads on-chain state, proposes weight changes, and, where enabled, submits them; described in [Architecture](/documentation/platform/vaults/meta-vaults/architecture) |

## Core mechanics

**Deposits and withdrawals.** `deposit` and `mint` take the underlying asset from the caller and mint shares against the vault's current total value; `withdraw` and `redeem` burn shares and return the underlying asset. Newly deposited assets can sit idle until a role holder deploys them into a strategy, rather than being split across strategies inside the deposit transaction itself.

**Allocation.** The vault tracks two things per strategy: how much of the portfolio it currently holds, and how much it is targeted to hold. A portfolio rebalance reconciles the two by moving capital out of over-allocated positions and into under-allocated ones; a targeted allocate or exit call can also move capital into or out of one specific strategy without touching the rest of the portfolio.

**Fees.** Deposit, management, and performance fees are configured together and enforced through share minting rather than asset withdrawal: a deposit fee mints fee shares alongside the depositor's shares, and management and performance fees are realized at harvest based on elapsed time and portfolio value growth since the last checkpoint.

## Roles

The vault separates administration, emergency pausing, economic configuration, strategy composition, allocation, and fee realization into distinct roles, so no single key holds all of them. See [Roles & signing models](/documentation/platform/vaults/meta-vaults/vault-mechanics/roles-signing-models) for the full reference and who typically signs for each. End users never hold a role. Exact function gating per role is not published here; confirm it with yield.xyz before assigning a role to your own signer.

## Invariants worth knowing

* **One share price for the whole portfolio.** The vault's total value is always the sum of its idle balance and the redeemable value of every strategy position, so a single conversion rate applies to every share regardless of how many strategies are behind it.
* **Weight changes do not move capital.** Setting a new target only changes what the vault is aiming for. Capital moves only when a rebalance, or a targeted allocate or exit call, actually executes.
* **Fees dilute, they do not withdraw.** Every fee is collected by minting shares to the fee recipient, never by pulling assets out of a strategy, so realizing a fee cannot itself disturb the portfolio's positions.
* **Role functions don't send assets to arbitrary addresses.** They move capital between idle and whitelisted strategies; strategy whitelisting and contract upgrades remain privileged actions held by yield.xyz.

## Next steps

<Columns cols={2}>
  <Card title="Architecture" icon="sitemap" href="/documentation/platform/vaults/meta-vaults/architecture">
    The operational view of the same components.
  </Card>

  <Card title="Accounting and share price" icon="calculator" href="/documentation/platform/vaults/meta-vaults/vault-mechanics/accounting-share-price">
    The share-based accounting model in detail.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.