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

# Architecture at a Glance

> The main components of Rialto and how an order flows through them.

## Components

**Liquidity sources:** propAMMs and conventional DEX pools that quote and fill orders.
Each propAMM is operated independently and prices from its own logic and inventory.

**Routing engine:** The layer that quotes every candidate source onchain for a given
order, ranks the results by output net of gas, and selects the route.

**Settlement contract:** The onchain contract that executes the selected route
atomically and verifies that the output meets the order's minimum.

**Swap API:** The integration surface that returns firm quotes and ready-to-send
transactions to wallets, frontends, and other routers.

## Order flow

1. An order is submitted through the Swap API.
2. The routing engine quotes all supported sources against live onchain state.
3. Quotes are ranked by output net of network costs and a route is selected.
4. The settlement contract executes the route onchain in a single transaction and
   enforces the minimum output.

## Where Rialto sits

Rialto operates between the application a user trades through and the underlying
liquidity. Applications integrate the Swap API for execution, including
rialto.xyz; liquidity sources integrate as quoting and settlement venues. Routing
and settlement remain onchain across both sides.
