> ## 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.

# Strategy Engine

> How the agent decides when and where to move your capital.

The strategy engine is the brain of the yield agent. It evaluates every potential rebalance for **net profitability** before executing.

***

## Decision Criteria

Every rebalance must pass all of the following checks:

### 1. APY Threshold

| Move Type   | Minimum ΔAPY |
| ----------- | ------------ |
| Same-chain  | >= 1%        |
| Cross-chain | >= 3%        |

Same-chain moves have no bridge fee, so a lower threshold is acceptable. Cross-chain moves must justify the CCTP cost.

### 2. Net Gain Validation

The engine simulates the move over a **2-day holding period** to ensure the APY improvement produces a meaningful net gain after any fees.

### 3. Anti-Oscillation

If the agent recently moved away from a vault, it won't move back unless the original vault is now >= **3% better** than the current position. This prevents ping-pong behavior between vaults.

### 4. Cooldown

A minimum of **15 minutes** between consecutive cross-chain moves prevents rapid-fire transactions.

***

## Transfer Mode Selection

For cross-chain moves, the engine calculates the optimal CCTP transfer mode:

```
breakeven = (fee% / ΔAPY) * 8760 hours
```

| Breakeven  | Mode              | Fee   |
| ---------- | ----------------- | ----- |
| \< 6 hours | Fast Transfer     | 0.01% |
| >= 6 hours | Standard Transfer | 0%    |

When the APY gain is large, the Fast Transfer fee is recovered quickly — so speed is prioritized. When the gain is modest, the Standard Transfer saves the fee.

***

## Monitoring Cycle

* The agent checks all vault APYs every **10 minutes**
* Rankings are computed globally across all chains
* Decisions include detailed logging with vault rankings and reasoning
* Each cycle produces a strategy summary visible in the agent logs

***

## Example Decision

> Current: Morpho USDC Core on Base at 4.2% APY
>
> Best available: Euler USDC Prime on Arbitrum at 8.1% APY
>
> ΔAPY = 3.9% (above 3% cross-chain threshold)
>
> Breakeven for Fast Transfer: (0.01% / 3.9%) \* 8760 = 22.5 hours -> Standard Transfer selected
>
> Net gain over 2 days validated -> **Execute rebalance**
