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

# Yield Vaults

> Passive yield for AI agents via autonomous vaults

<Info>
  **Live on Arc Testnet** — The Aegis Yield system is fully operational. Agents
  can deposit USDC, track their `aUSDC` shares, and withdraw with accrued yield.
</Info>

## Autonomous Yield Generation

Aegis provides yield vaults on the Arc Testnet. AI agents can deposit idle USDC to earn yield.

Depositing USDC returns `aUSDC` (Aegis USDC) shares. The system injects USDC yield directly into the vault onchain, which drives up `pricePerShare`. On withdrawal, the agent burns `aUSDC` for the original deposit plus the accrued yield.

## Smart Contract Integration

The Aegis Yield Vault is live on the Arc Testnet.

**Vault Contract Address:** [`0xAf5f79495285b1d180858a225aDE518d371e0167`](https://testnet.arcscan.app/address/0xAf5f79495285b1d180858a225aDE518d371e0167)

### Automatic Allowlisting

The vault uses a strict allowlist to prevent sybil extraction. The backend handles this.

When an agent is boarded, Aegis automatically allows its wallet onchain. The agent is pre-approved to deposit USDC immediately.

## How It Works

<Steps>
  <Step title="Check the Live Vault State">
    Before depositing, your agent can view the active vault APY and share price:

    ```bash theme={null}
    curl -X GET https://api.aegisintent.xyz/v1/actions/yield/vault \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "X-Aegis-Email: agent@example.com"
    ```

    The response returns live metrics from the smart contract:

    ```json theme={null}
    {
      "success": true,
      "vault": {
        "address": "0xAf5f79495285b1d180858a225aDE518d371e0167",
        "totalAssets": "10000000000",
        "totalShares": "10000000000",
        "pricePerShare": "1.000000",
        "estimatedAPYPercent": 2.0
      }
    }
    ```
  </Step>

  <Step title="Deposit USDC">
    Submit the deposit with an idempotency key and nonce. Aegis handles the onchain USDC approval and deposit.

    ```bash theme={null}
    curl -X POST https://api.aegisintent.xyz/v1/actions/yield/deposit \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "X-Aegis-Email: agent@example.com" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
      -H "X-Aegis-Nonce: 0" \
      -d '{
        "amount": "20.00"
      }'
    ```

    A successful deposit returns the confirmed transaction details:

    ```json theme={null}
    {
      "success": true,
      "result": {
        "action": "YIELD_DEPOSIT",
        "vault": "0xAf5f79495285b1d180858a225aDE518d371e0167",
        "amount": "20.00",
        "txHash": "0x123abc...",
        "status": "COMPLETE"
      }
    }
    ```
  </Step>

  <Step title="Check Agent Yield Balance">
    Track the exact number of `aUSDC` shares the agent holds and their USDC value:

    ```bash theme={null}
    curl -X GET https://api.aegisintent.xyz/v1/actions/yield/balance \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "X-Aegis-Email: agent@example.com"
    ```

    ```json theme={null}
    {
      "success": true,
      "balance": {
        "vaultAddress": "0xAf5f79495285b1d180858a225aDE518d371e0167",
        "shares": "20.00",
        "usdcValue": "20.04",
        "lockExpiresAt": "2026-05-21T13:00:00.000Z"
      }
    }
    ```
  </Step>

  <Step title="Withdraw USDC">
    When ready, the agent can withdraw its `aUSDC` shares. The smart contract exchanges them for the original USDC plus accrued yield.

    ```bash theme={null}
    curl -X POST https://api.aegisintent.xyz/v1/actions/yield/withdraw \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "X-Aegis-Email: agent@example.com" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: 7b1c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e" \
      -H "X-Aegis-Nonce: 1" \
      -d '{
        "amount": "20.00"
      }'
    ```

    A successful withdrawal returns:

    ```json theme={null}
    {
      "success": true,
      "result": {
        "action": "YIELD_WITHDRAW",
        "vault": "0xAf5f79495285b1d180858a225aDE518d371e0167",
        "amount": "20.00",
        "txHash": "0x456def...",
        "status": "COMPLETE"
      }
    }
    ```
  </Step>
</Steps>

## Endpoint Parameters

| Field    | Type   | Required | Endpoint   | Description                                           |
| -------- | ------ | -------- | ---------- | ----------------------------------------------------- |
| `amount` | string | Yes      | `deposit`  | Amount of USDC to deposit (e.g. `"20.00"`)            |
| `amount` | string | Yes      | `withdraw` | Amount of `aUSDC` shares to withdraw (e.g. `"20.00"`) |

## Auto-Compounding

Yield injects directly into the smart contract. Because share pricing scales with total assets, yield auto-compounds. Agents do not need to claim or reinvest.

<Tip>
  Always fetch `GET /v1/actions/nonce` before executing a `deposit` or
  `withdraw`. These are state-mutating financial actions. They enforce
  nonce protection.
</Tip>

## Multi-Protocol Yield

Beyond the Aegis aUSDC Vault, agents can allocate capital into **Synthra V3 concentrated liquidity** for potentially higher returns. The [Wealth Engine](/features/wealth-engine) provides a `multiYield` endpoint that splits a single deposit across both protocols atomically:

```bash theme={null}
curl -X POST https://api.aegisintent.xyz/v1/actions/wealth/multiYield \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Aegis-Email: agent@example.com" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: c9d8e7f6-a5b4-3c2d-1e0f-9a8b7c6d5e4f" \
  -H "X-Aegis-Nonce: 2" \
  -d '{
    "amountUsdc": "100.00",
    "aegisWeight": 60,
    "synthraWeight": 40
  }'
```

To close a Synthra V3 position and collect fees, use the [Synthra V3 Withdraw](/api-reference/actions/wealth-synthra-withdraw) endpoint.

For details on limit orders, DCA schedules, and portfolio metrics, see the [Wealth Engine](/features/wealth-engine) documentation.
