Documentation

How to read and use the router.

Everything needed to verify the contract, integrate against it, or decide not to. The limitations section is not a footnote — read it first if you are considering size.

Deployment

Addresses

VunixRouter
Chain
Robinhood Chain · id 4663
RPC
https://rpc.mainnet.chain.robinhood.com
Registry
71 venues · 27 pairs · deepest $3,398,279 · block 53,253,320

Chain contracts

Identify contracts on this chain by ABI, never by name. The canonical Ethereum mainnet Uniswap router and quoter addresses both exist here and hold the same unrelated 2,109-byte contract. Ten contracts are named UniswapV3Factory.

Integration

Placing an order

Approve the router for tokenIn, then call swapExactIn. Legs must sum exactly to amountIn; the contract rejects anything else.

function swapExactIn(
  SwapRequest calldata request,   // tokenIn, tokenOut, amountIn,
                                  // minAmountOut, recipient, deadline
  Leg[] calldata legs             // { venueIndex, amountIn }[]
) external returns (uint256 amountOut);

Compute the legs off-chain with the engine, or read the book yourself. Two view functions expose everything the contract knows:

// what one venue would return for this size
function quoteVenue(address tokenIn, address tokenOut,
                    uint256 index, uint256 amountIn)
  external view returns (uint256 amountOut);

// the benchmark your order must beat
function bestSingleVenue(address tokenIn, address tokenOut,
                         uint256 amountIn)
  external view returns (uint256 bestOut, uint256 bestIndex);

Venue indices come from venueCount and venueAt. They are not stable: removeVenue swaps the last entry into the gap, so re-read them after any registry change rather than caching.

The guarantee

What is actually proven

Before any leg executes, the router quotes every registered venue for the pair at the full order size. After executing, it compares the fill against that benchmark:

if (amountOut < bestSingleVenueOut)
    revert CannotProveBestExecution(amountOut, alternative, venueIndex);

Quoting happens before execution on purpose. Quoting afterwards would let someone move an unrelated pool inside the same block to manufacture a better-looking alternative and force your order to revert — cheap griefing.

There is no tolerance. A split settles only when it strictly beats the best single venue, which is the intended reading: a split that cannot beat single-venue routing has no reason to execute.

Curation

How a venue gets admitted

Every filter is deny-by-default. A venue is admitted only by passing all of them:

Asset identity
answers uiMultiplier() — clones revert
Quote asset
USDG or WETH, pinned addresses
Hooks
must be address(0)
Fee
≤ 1% — v4 permits up to 100%
Depth to route
≥ $2,500 to move price 1%
Depth to appear
none — a venue that has drained to nothing still shows
On-chain check
v3 must match factory.getPool; v4 key must be initialised

One floor, not two, because reading a venue and routing to it are different jobs. Depth decides only what may receive an order, and that set is exactly what the router holds. Nothing is hidden from the book for being thin — a pool that has drained to nothing and still advertises a price is the clearest example of the problem this exists to solve, and an earlier version of these rules filtered precisely those pools out.

Depth is the quote notional required to move a venue’s price by 1%, derived from active liquidity. Not from balanceOf — v4 is a singleton, so its balance is the total across every pool it holds and describes none of them. Not from liquidity() either: a fake pool holding a few dollars of real value has reported a liquidity scalar of 4.19e23.

Read this part

Limitations

Unaudited

Written and tested over a single session. 22 tests pass against live chain state, including a real order settling at a price matching its own on-chain quote. That is evidence, not an audit.

The proof is scoped to the registry

Best execution is proven against registered venues only. A pool outside the registry is not considered, so the guarantee is exactly as good as the curation — which is published, and driven by depth rather than by advertised price.

The owner curates

The owner can add and remove venues. Entries are validated against the canonical factory and the PoolManager, so a compromised owner cannot route your order into their own contract — but they can still decide which real pools are eligible.

Assertion gas scales with venue count

Every registered venue is re-quoted on every order. A normal venue costs roughly 29k gas to quote; a thin one with tight tick spacing can walk to the crossing cap and cost ~790k on its own. That is why the depth floor exists, and why it was raised after launch.

Splitting rarely helps

Measured at 0.0 bps improvement from $1,000 to $100,000 across every asset tested. Multi-leg routing exists and works, but on this chain the cheapest venue is usually the deepest, so the solver normally picks one venue.