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

# The Orchestrator

> What the Earn worker watches, how it decides, and why it can skip a move.

The orchestrator is the worker that turns the Earn policy into action. It does not own your funds. It watches for valid opportunities, prepares policy-bounded transactions, and records confirmed results.

Think of it as a cautious operator that must prove a move is allowed before it can send anything.

## What It Reads

| Source             | What it provides                                                                        |
| ------------------ | --------------------------------------------------------------------------------------- |
| Solana RPC         | The current Earn vault, USDC token account, policy account, and Kamino obligation state |
| Kamino market data | The reserve rates used to compare eligible USDC markets                                 |
| Yield Neon         | Active policies, managed vault records, confirmed events, and rebalance history         |
| Timescale          | Historical and current reserve data used for scoring                                    |

## The Decision Loop

<Steps>
  <Step title="Discover active Earn vaults">
    The worker loads active Earn vault and policy metadata from Loyal's control plane.
  </Step>

  <Step title="Reconcile from chain">
    It checks the actual vault and Kamino position before planning a move.
  </Step>

  <Step title="Score same-mint candidates">
    It compares approved USDC reserves and rejects cross-mint-only opportunities.
  </Step>

  <Step title="Preflight the policy">
    It checks that the on-chain policy allows the USDC route, including the required market list and instruction shape.
  </Step>

  <Step title="Submit and confirm">
    If simulation and preflight pass, it submits the route and records the confirmed result.
  </Step>
</Steps>

## Why It Skips

The orchestrator can skip when there is no position to move, no same-mint positive edge, unsupported amount semantics, stale market data, a cooldown after a recent move, a missing account that cannot be initialized through policy, an active decision already in progress, or a policy mismatch.

This is intentional. A skipped move is not a product failure when the safe action is to wait.

<Info>
  Yield Neon is the coordination and history layer. The live position still comes from on-chain accounts.
</Info>
