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

# Route guards

> The Route section on the Buy tab: Buy any route, the guards on the hops and on the coin's buy, the gap between one hop and two, Buy smaller, Max hops, and unconfirmed pools, with defaults and examples.

The **Route** section on the **Buy** tab decides which routes a routed buy accepts and which it skips. It acts on routed buys alone: coins of a custom quote, and USD coins bought with SOL. A coin bought directly is not touched by it. What hops and routes are: [How a buy goes](https://docs.lasercat.gg/routing/overview.md).

![Buy tab of the snipe job Alpha devs, Route section: Buy any route off, the route guards' table Hops / Coin's buy, Max gap: one hop vs two, Buy smaller, Max hops, Coin's floor on chain, Unconfirmed pools](https://mintcdn.com/lasercat/HZjQHEaj6TOf9anq/images/en/routing-buy-route.png?fit=max\&auto=format\&n=HZjQHEaj6TOf9anq\&q=85\&s=107b9c2c2263896f11a829041d9b009b)

> [!NOTE]
>
> Snipe jobs and copy jobs have this section. A snipe job can take it from your [global settings](https://docs.lasercat.gg/jobs/global-settings.md) with the **Use global** switch by the section's name. Traders and Space Admins can edit it.

## At a glance

| Row | What it decides | Empty / default | Off |
| - | - | - | - |
| **Buy any route** | Lift every guard at once | Off | The guards below decide |
| **Route guards** → **Hops** | Price impact, depth, and price divergence on the hops | 3%, 2x, 10% | No limit of that kind |
| **Route guards** → **Coin's buy** | Price impact and depth on the coin's buy | none | No limit of that kind |
| **Max gap: one hop vs two** | Refuse a route whose one-hop and two-hop outputs disagree | 10% | The gap goes unchecked |
| **Buy smaller** | Buy part of the amount instead of skipping | On, down to 1% of the buy | A buy that does not pass whole is skipped |
| **Max hops** | The most swaps on the way into the quote | 3 | — |
| **Coin's floor on chain** | What the coin's minimum is counted from | On | A fixed minimum |
| **Unconfirmed pools** | Take a pool whose latest trade has not fully arrived | On | Such routes are refused |

**Coin's floor on chain** is about slippage: it is on [Slippage](https://docs.lasercat.gg/routing/slippage.md#coin’s-floor-on-chain).

## Buy any route

One switch for every guard in the section.

* **On**: every guard below is lifted: no limit on price impact or divergence, any depth, unconfirmed pools taken, the gap between one hop and two unchecked. The buy takes whatever route the router finds. **Max hops** stays as you set it.
* **Off**: the guards below decide. If the job had its own values before you turned it on, turning it off brings them back; if not, the defaults apply.

> [!WARNING]
>
> **On** means "the guards are lifted", not "the guards are on". It gives worse fills and more sandwich risk on thin pools: the panel warns so under the row.

![Route section with Buy any route on: the warning under the row, the guards' table at Off and a depth of 1x](https://mintcdn.com/lasercat/HZjQHEaj6TOf9anq/images/en/routing-route-any-on.png?fit=max\&auto=format\&n=HZjQHEaj6TOf9anq\&q=85\&s=422f1d319d15d419952c75015ff0e5ac)

## Guards on the hops and the coin's buy

The **Route guards** table has two columns:

* **Hops**: the swaps on the way into the quote.
* **Coin's buy**: the last swap, the coin's buy on its own venue.

| Guard | What it means | Range | Empty: **Hops** / **Coin's buy** |
| - | - | - | - |
| **Max price impact** | How far the trade may move a pool's price | 0.01–50%, or **Off** | 3% / none |
| **Min depth** | How many times the trade's amount a pool must take, else it is too thin | 1x–100x | 2x / none |
| **Max divergence** | How far a pool's price may lie from its pair's other pools | 1, 2, 3, 5, 10, or 20%, or **Off** | 10% / **No effect** |

An empty field keeps the default, shown in grey. A guard set to **Off** sets no limit of its kind. **Max divergence** has no effect on the coin's buy: divergence is checked on the hops alone, and on the coin's buy only price impact and depth count.

Examples:

* The hops' **Max price impact** at 3% (the default). A 2 SOL buy through a pool that 2 SOL moves by 5% does not pass. A 1 SOL buy that moves it by 2.4% does.
* The hops' **Min depth** at 3x. A 0.5 SOL buy passes only through pools that take at least 1.5 SOL. **1x** asks nothing past the amount itself.
* The hops' **Max divergence** at 5%. A pool whose price is 7% off its pair's other pools does not pass. A pool with nothing to compare passes.
* The coin's **Max price impact** at 10%. A coin in a thin pool, where your buy would move the price 15%, is not bought whole: with **Buy smaller** a smaller amount is bought, without it the buy is skipped.

Looser guards mean worse fills and more exposure to sandwiches on thin pools. Tighter guards skip more buys, or with **Buy smaller**, buy less. The panel says so under the table once you move a value from its default.

> [!TIP]
>
> The coin's **Max price impact** at **Off** saves too: where the last part of a buy gets almost no coins, it spends less, the least that still gets 99% of the coins. To always spend the whole amount, turn **Buy smaller** off.

## Max gap: one hop vs two

If the one-hop route and the two-hop route give outputs this far apart at the same amount, one pool's price is probably off, and the buy is refused: Activity shows **Route risky**.

| Value | What happens |
| - | - |
| Empty | 10% |
| 0.01–50% | Your own limit. Above 10%, routes whose pools' prices disagree more are bought; below it, more routes are refused. |
| **Off** | The gap goes unchecked. |

Example: one hop gives 50,000 PUMP, two hops 44,000 PUMP. The gap is 12%: with a 10% limit the buy is refused, with 15% or **Off** it goes.

Where several jobs buy one coin, the strictest limit among them applies.

Where the one-hop route is itself one the engine marks unsafe, the two-hop route is bought past the limit. With **Off**, the better of the two is taken, and an unsafe one-hop route is refused.

## Buy smaller

If the whole amount can't be bought safely (the route or the coin fails a guard), buy as much as can, down to this share of the amount, instead of skipping. A route of three hops that can take the whole amount is tried first.

| Value | What happens |
| - | - |
| On, empty | Down to 1% of the buy: "down to 1 % of the buy (default)". |
| On, your share | No less than this share, 0.01 to 99.99%. |
| **Off** | A buy that does not pass whole is skipped. |

Example: a 2 SOL buy, and the guards pass only 0.6 SOL (30%).

* **Buy smaller** down to 1%: 0.6 SOL is bought. Activity shows **Smaller buy:** and why.
* Down to 50%: 30% is under 50%, so the buy is skipped.
* **Off**: the buy is skipped.

## Max hops

The most swaps the way into the quote may take: **1** is one pool, **2** goes through one hub, **3** through two. Empty: 3.

Fewer hops make a shorter route, but a coin may be left with no route: Activity shows **Route missing**. For example, with **1** a coin quoted in PUMP is bought only if there is a SOL/PUMP pool; if PUMP trades against USDC alone, it needs 2 hops.

**Max hops** binds the job's top-ups and copy add-ons too: one whose route needs more hops is not bought.

## Unconfirmed pools

The way into the quote may take a pool whose latest transaction has not fully arrived. Its price may miss that trade, so a buy through it fails more often and loses its network fee.

* **On** (the default): such pools are allowed.
* **Off**: routes through such pools are refused: Activity shows **Route risky**. This holds for a migration top-up too, by the job's settings at the time of the top-up.

Where several jobs buy one coin, each of them must allow it: a job with **Off** refuses the route for the jobs after it.

## What Activity says

When a routed buy is skipped for its route, Activity gives the reason. What to do about it:

| Reason | What happened | What you can change |
| - | - | - |
| **Route missing** | No route to the quote can carry this amount, or the coin's venue takes no routed buy. | Raise **Max hops**, lower the amount. Sometimes there just is no route. |
| **100% hop slippage leaves nothing for this coin** | **Hop slippage** at 100% on a coin that can't be bought so. | Lower **Hop slippage**. |
| **Route risky** | The route failed the hops' guards, a pool was unconfirmed, or the gap between one hop and two was past its limit. | Loosen the **Hops** column, raise **Max gap: one hop vs two**, turn **Unconfirmed pools** on. |
| **Coin buy too risky** | The coin's buy failed the **Coin's buy** guards, and so did every smaller buy within **Buy smaller**. | Loosen the **Coin's buy** column, turn **Buy smaller** on, or lower its share. |
| **No three-hop route**, **Not enough liquidity**, **Three-hop route too risky** | No route of three hops fit. | Lower the amount. Often nothing: the quote has few pools. |
| **No way back** | The quote couldn't be sold back afterwards. | Nothing: the engine never buys what it can't sell. |
| **Route loading**, **Route stale** | The route to the quote is not ready yet, or is briefly unavailable. | Nothing: it clears by itself. |
| **Smaller buy: …** | Less than the amount was bought, by **Buy smaller** or because the coin's **Max price impact** is **Off**. | To buy the whole amount, loosen the guards or turn **Buy smaller** off. |

More on the reasons: [Decision reasons](https://docs.lasercat.gg/reference/decision-reasons.md).

## Next

> [card] [Slippage](https://docs.lasercat.gg/routing/slippage.md)
>
> Buy, hop, sell, and way-back slippage.

> [card] [Scenarios and common mistakes](https://docs.lasercat.gg/routing/scenarios.md)
>
> Ready setups, and what passes or gets skipped.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.