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

# How It Works

> How the n0ir yield agent manages your USDC autonomously.

The yield agent is an autonomous AI that monitors lending vaults on Base and Arbitrum, automatically moving your USDC to the highest-yielding opportunity.

***

## 1. Connect & Setup

On connect, n0ir creates a **deterministic smart account** (ZeroDev Kernel) bound to your EOA. You sign once to approve the agent's session key with limited permissions.

Your EOA remains the root owner — you can revoke the agent or withdraw directly at any time.

## 2. Deposit

Deposit USDC on Base. The agent identifies the top net-yield vault and deposits automatically.

## 3. Continuous Monitoring

The agent scans all whitelisted vaults and tracks:

* **APY** across every vault on every supported chain
* **Net gain** validation over a 2-day holding period
* **Anti-oscillation** checks to prevent ping-pong between vaults

## 4. Intelligent Rebalancing

The agent moves funds **only when net-profitable**:

<CardGroup cols={2}>
  <Card title="Same-Chain Move" icon="arrows-rotate">
    Requires **ΔAPY >= 1%** to trigger a rebalance. No bridge fee.
  </Card>

  <Card title="Cross-Chain Move" icon="bridge">
    Requires **ΔAPY >= 3%** to justify the bridge cost via CCTP.
  </Card>
</CardGroup>

**Anti-oscillation**: the agent won't revert to a previous vault unless the new target is >= **3% better**.

## 5. Cross-Chain Transfers

For cross-chain moves between Base and Arbitrum, the agent uses **Circle CCTP** with dynamic mode selection:

| Mode                  | Fee   | When Used                             |
| --------------------- | ----- | ------------------------------------- |
| **Fast Transfer**     | 0.01% | Breakeven \< 6 hours (large APY gain) |
| **Standard Transfer** | 0%    | Breakeven >= 6 hours (saves fee)      |

The strategy engine automatically selects the optimal mode based on breakeven analysis.

## 6. Withdrawal

Request a withdrawal and the agent:

1. Exits all vault positions across chains
2. Bridges funds to your home chain (Base by default) via CCTP
3. Transfers USDC to your EOA

All gas is fully sponsored.
