Skip to main content

Routing

Vulcx evaluates multiple paths to find the best execution for every swap.
Vulcx routing: a quote request (tokenIn, tokenOut, amount, mode) enters the Vulcx routing engine, which searches every pool on Valiant, Fluxbeam, and Moonit for the best price. It picks the best of a direct swap, a multi-hop route (up to 5 hops), or a split route across several pools, then returns a quote response (amountOut, price impact, route) that POST /swap turns into an unsigned transaction.

A quote request goes into the routing engine, which compares direct, multi-hop, and split routes across every pool and returns the best-price quote.

Direct swaps

For common pairs with deep liquidity (e.g., FOGO/USDC), a single pool often provides the best price. Vulcx compares rates across all supported pools and picks the one with the lowest price impact.

Multi-hop routing

When a direct swap isn’t optimal, Vulcx routes through intermediate tokens. For example, swapping Token A → Token B might execute as:
Each hop uses the best available pool. The routing engine evaluates all viable paths and selects the one that maximizes output (ExactIn) or minimizes input (ExactOut). The routing engine supports up to 5 hops on Fogo.

Supported liquidity sources

Price impact

Every quote includes price impact data:

Slippage protection

The slippageBps parameter sets the maximum acceptable price deviation. If the on-chain execution price is worse than the threshold, the transaction reverts atomically. No partial fills.
Last modified on August 31, 2026