# Architecture Overview

### Metavault Interface

The **user facing Metavault interface** is the `MetavaultWrapper` contract. It is an [**ERC-7540**](https://eips.ethereum.org/EIPS/eip-7540) compliant asynchronous vault wrapper that provides a standardized interface for users to interact with underlying infrastructure vaults.&#x20;

The wrapper **implements the full** [**ERC-7540**](https://eips.ethereum.org/EIPS/eip-7540) **standard**, including asynchronous deposit and redeem request flows, operator approvals, and epoch-based share tracking. This design enables seamless migration between different infrastructure vault implementations without requiring users to withdraw their shares, while maintaining consistent backend integration through standardized interfaces.

Key features of the `MetavaultWrapper` include:

* **Asynchronous Operations**: Implements request/claim patterns for deposits and redemptions across epochs
* **Operator Delegation**: Allows controllers to delegate claim rights to approved operators
* **Vault Agnostic Design**: Abstracts underlying infrastructure vault details, enabling future migrations
* **Epoch Synchronization**: Maintains state consistency with the underlying vault's epoch system
* **Share Value Preservation**: Ensures fair share distribution during vault migrations

<figure><img src="/files/ZCZoJyLqDFFSo5KXc7wq" alt=""><figcaption></figcaption></figure>

#### Documentation & Audits

* [ERC-7540](https://eips.ethereum.org/EIPS/eip-7540)

### Infrastructure Async Vault

The underlying yield aggregation vault used to manage liquidity is the `AsyncVault` of Amphor. The metavault system is designed to be vault agnostic, allowing migration to a different deposit vault if needed.

<figure><img src="/files/6sLS5tXXhnehSallN46V" alt=""><figcaption></figcaption></figure>

#### Documentation & Audits

* [**Amphor GitBook Documentation**](https://defivaults.gitbook.io/amphor)
* [**GitHub Audit Reports**](https://github.com/AmphorProtocol/asynchronous-vault/tree/main/audits)
* [**Security Audit Documentation**](https://defivaults.gitbook.io/amphor/smart-contract-audits)

### Zodiac - SAFE - Curation Layer

The Metavault system uses Zodiac contracts for granular role allocation and responsibility segregation. This represents the access control layer where accountants and curators will act through the SAFE, with guardians providing oversight.

**Accountants** are responsible for settling the vault's value in assets, tracking performance metrics, and updating conversion rates between vault shares and underlying assets. They handle the financial reporting and ensure accurate share valuations across epochs.

**Curators** manage liquidity allocation across Spectra markets, deploy investment strategies, and optimize yield generation. They make decisions about which markets to enter, position sizing, and when to rebalance the portfolio to maximize returns for vault participants.

**Guardians** provide oversight and security by monitoring delayed actions, verifying critical operations, and ensuring compliance. They act as a safety mechanism for time-sensitive decisions that require additional verification.

The Role modifier enables whitelisted actions for curators and accountants, while the delay modifier implements timelocked actions requiring guardian verification.

<figure><img src="/files/490uk9O35YKHHqG7GsFl" alt=""><figcaption></figcaption></figure>

#### Documentation

* [**Zodiac Documentation**](https://www.zodiac.wiki/)
* Key Contracts:
  * `Roles.sol` - Manages SAFE permissions for access control
    * [**Github Repository**](https://github.com/gnosisguild/zodiac-modifier-roles/tree/main)
  * `Delay.sol` - Implements time-locked operation functionality
    * [**Github Repository**](https://github.com/gnosisguild/zodiac-modifier-delay)

## Interacting with the Metavault SAFE using Zodiac

While most common actions will be doable from the curator console, more complex and non-standard operations might require a custom system and calls made outside the UI.

{% hint style="info" %}
Refer to the curator console documentation page to learn about available features and monitoring capabilities:
{% endhint %}

Curators can use the Zodiac Pilot extension to connect and propose transactions to the Gnosis SAFE directly from web3 interfaces, using the default timelock delay module as the execution route: [**Zodiac Pilot**](https://pilot.gnosisguild.org/)

1. Download the Pilot Chrome extension
2. Configure the Metavault SAFE account with:
   * SAFE address
   * Set the route to the delay module
   * Select and connect with an account that has the CURATOR role as Pilot signer
3. When launching an app, the Pilot extension should connect directly to the wallet client of the app


---

# 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://curator.docs.spectra.finance/technical/architecture-overview.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.
