> For the complete documentation index, see [llms.txt](https://docs.renzofinance.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.renzofinance.com/get-started/optimizer.md).

# Optimizer

The optimizer provides a smart select of basis strategies for better yield. It spreads your capital across a mix of basis markets, checks your positions daily and only moves money when a better market pays enough to cover the cost of switching.

### How to Deposit via the Optimizer

<figure><img src="https://2200787856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXtrI3YGWysOEHYt3fLKo%2Fuploads%2Fb6WDKkyo959Xt7i3yA5L%2Fimage.png?alt=media&amp;token=89ca431f-2d12-4aac-ad4c-ff2b3d98f7b6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2200787856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXtrI3YGWysOEHYt3fLKo%2Fuploads%2FTYknJIPtgZA5c7T5ven4%2Fimage.png?alt=media&amp;token=36dcce40-a0a8-46de-9e75-ca9eb919887f" alt=""><figcaption></figcaption></figure>

The Optimizer card sits at the top of the Basis Trade page in both Basic and Advanced mode. It shows today's market mix and the estimated APR.

1. Enter your deposit amount.
2. Confirm the transaction.

Your deposit is split across the markets shown in the mix. Est. APR is a forecast based on current rates and changes as markets move.

### How markets are ranked

The optimizer forecasts funding for each market by weighting two inputs equally:

* **Expected funding:** the implied rate on the coin's Boros market (Pendle's market for trading funding rates), averaged over the last 24 hours
* **Recent funding:** the average of the 7-day and 30-day realized funding rates

Strategies without a Boros market use the default [APR logic](https://docs.renzofinance.com/yield/apr-logic.md).

### Deposit size and mix

The mix depends on how much you deposit and on current rates. Smaller deposits often go into a single market, and larger deposits spread across more markets. There's no fixed cutoff: the point where a second market is added moves as rates and liquidity change.

<figure><img src="https://2200787856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXtrI3YGWysOEHYt3fLKo%2Fuploads%2FtusrxZJnCYuxOdEtEa0E%2Fimage.png?alt=media&amp;token=d84fb0cb-424a-4c4a-9975-8249a27e36b8" alt=""><figcaption></figcaption></figure>

The Optimizer page shows where sample deposits would go today, and the mix for your exact amount before you confirm.

### Rebalance & Monitoring

The optimizer monitors your positions once a day, and again on every deposit or withdrawal. A rebalance only happens when the expected gain over 30 days is at least 2x the cost of moving.

If part of a rebalance can’t be filled, that amount stays where it was until the next review. New deposits and funds already freed from a market stay in USDC. If the optimizer can’t exit a market, the position there stays open.

### Automations

Every market the optimizer holds runs with the full set of automations on:

* **Hedge guard:** sells unhedged spot if a short is reduced or closed, including through ADL
* **Yield guard:** exits a market when its funding no longer covers the cost of a round trip
* **Safety buffer:** shrinks both legs when a market nears liquidation
* **Trading key:** automates trades and never allows withdrawals

*NOTE: If a guard exits a market, that takes priority over anything the optimizer planned. The optimizer waits 24 hours before considering that market again.*

### FAQs

<details>

<summary><strong>Why isn't my whole deposit in the market with the highest APR?</strong></summary>

For larger deposits, the optimizer spreads capital across markets so no single market becomes your whole position, and each market is limited by how much its order books can absorb. Smaller deposits may still go into one market.

</details>

<details>

<summary><strong>Can the optimizer withdraw my funds?</strong></summary>

No. It trades through your trading key, which can open and close positions but cannot withdraw. Moving funds out of your account always needs your signature.

</details>

<details>

<summary><strong>Why does each market show a different leverage?</strong></summary>

Each market runs at its own leverage, shown next to the strategy. The APR displayed already accounts for it, so you can compare markets directly.

</details>

<details>

<summary><strong>Another market shows a higher APR. Why didn't the optimizer move my money?</strong></summary>

Moving costs fees and slippage. The optimizer only moves when the expected gain over 30 days is at least 2x that cost, so a small difference in APR isn't worth switching for.

</details>

<details>

<summary><strong>Why is my deposit in only one market?</strong></summary>

Smaller deposits often go into a single market. As the amount grows, the optimizer adds more. The cutoff isn't fixed and moves with rates and liquidity, so check the mix for your amount on the Optimizer page before depositing.

</details>

<details>

<summary><strong>What happens when I withdraw?</strong></summary>

The optimizer reduces your positions to match your withdrawal amount, then reviews what's left for next actions.

</details>

<details>

<summary><strong>Is the Est. APR guaranteed</strong></summary>

No. It's a forecast based on current and recent funding. Funding rates change, so what you earn could be higher or lower.

</details>
