# AI-Managed Vault

The AI-Managed Vault is a fully functional, on-chain capital management system deployed on Base.

It combines the ERC-4626 tokenized vault standard with multi-strategy allocation, autonomous keeper-based rebalancing, and a comprehensive fee and safety system.

***

#### Architecture <a href="#id-52414bd1-ba91-4310-af62-ff83548432b1" id="id-52414bd1-ba91-4310-af62-ff83548432b1"></a>

The vault implements ERC-4626. Users deposit USDC and receive vault shares proportional to their deposit. The vault manages assets across multiple DeFi strategies through dedicated adapter contracts.

**Vault Contract:** `0x3E6bf646b379C75d47Cf91d5569621FD0df53d78` (Base Sepolia)

**Underlying Asset:** USDC (`0x25b56942824E65B5d83BD57f54e3518CccFcd088` — MockUSDC on testnet)

The total assets under management equals idle USDC in the vault plus the sum of assets deployed across all registered strategy adapters.

***

#### Strategy Adapters <a href="#cfaf48a2-398d-46f4-8864-b11862590737" id="cfaf48a2-398d-46f4-8864-b11862590737"></a>

The vault allocates capital through four dedicated adapter contracts:

* **Aave Adapter** — deposits into Aave lending pools
* **Compound Adapter** — deposits into Compound lending markets
* **Uniswap V3 Adapter** — concentrated liquidity positions
* **Aerodrome Adapter** — liquidity provision and gauge staking

Each adapter implements the `IStrategyAdapter` interface, providing standardized `deposit()`, `withdraw()`, and `totalAssets()` functions. New strategies can be added through the `addStrategy()` function with a configurable maximum exposure limit.

***

#### Keeper System <a href="#id-4a1ddb4d-9424-4468-aca0-8bf51ba6dac5" id="id-4a1ddb4d-9424-4468-aca0-8bf51ba6dac5"></a>

The keeper is a dedicated wallet authorized to execute rebalances on the vault contract. The `onlyKeeper` modifier restricts the `rebalance()` function to this address or the contract owner.

Rebalancing accepts an array of strategy addresses and target weights in basis points (summing to 10,000). The vault redistributes capital across strategies accordingly. The keeper can also trigger `harvestAll()` to collect rewards from all active strategies.

***

#### Fee Structure <a href="#id-4ea2788e-1bf9-433c-904a-e584d2a8c5b0" id="id-4ea2788e-1bf9-433c-904a-e584d2a8c5b0"></a>

The vault collects fees through four mechanisms:

* **Management Fee** — annual fee in basis points, accrued over time (maximum 5%)
* **Performance Fee** — charged on profits above the high watermark (maximum 30%)
* **Deposit Fee** — entry fee deducted from deposits
* **Withdrawal Fee** — exit fee deducted from withdrawals

Fees are collected to a designated treasury address. The high watermark ensures performance fees only apply to new profits — during recovery periods after a drawdown, no performance fees are charged.

***

#### Safety Mechanisms <a href="#id-3056f5b3-8a07-4323-90b6-45d9555d9b92" id="id-3056f5b3-8a07-4323-90b6-45d9555d9b92"></a>

The vault includes multiple layers of protection:

* **Pausable** — emergency pause halts all deposits, withdrawals, and rebalances instantly
* **ReentrancyGuard** — prevents reentrancy attacks on deposit and withdrawal functions
* **Ownable2Step** — two-step ownership transfer prevents accidental or malicious ownership changes
* **Max Drawdown Halt** — if vault value drops below the drawdown threshold (configurable, default 15%) relative to the initial share price, operations halt automatically
* **High Watermark** — tracks peak share price, preventing performance fee extraction during recovery

***

#### Mandate Enforcement <a href="#id-391ed2d2-ae8c-4f6f-91f7-5a3a93d58f01" id="id-391ed2d2-ae8c-4f6f-91f7-5a3a93d58f01"></a>

The off-chain allocation engine enforces all mandate constraints before submitting any rebalance transaction to the keeper. The keeper will not submit a transaction that violates the mandate.

The on-chain contract provides an additional safety layer through the pause mechanism and drawdown check, creating defense in depth.

***

#### Current Deployment <a href="#f313377c-8af7-4158-9912-d8acf00bb188" id="f313377c-8af7-4158-9912-d8acf00bb188"></a>

The vault is live on Base Sepolia testnet. All strategy adapters are deployed and registered. The keeper wallet is funded and operational. Mainnet deployment is planned following further testing and audit.


---

# 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://docs.raxprotocol.xyz/product-guides/ai-managed-vault.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.
