Rialto Docs | Developer Introduction
The integration surface for onchain liquidity sources that want to compete in Rialto routing.
Integration Model
A propAMM plugs into Rialto as a candidate onchain liquidity source. The router needs two behaviors: a read-only function that returns the current output for an exact input, and a state-changing settlement function that can consume that input and deliver the required output.
Canonical Surface
quote(direction, amountIn) → amountOut
settle(direction, amountIn, minOut, recipient, deadline) → amountOutThe exact production ABI is deployment-specific, but the public integration model follows these semantics: quote first, then settle the selected leg with the authoritative input amount.
Quote Requirements
- Read-only and deterministic for the current contract state.
- Exact-input: output is calculated for the provided amount.
- Unsupported sizes should return no usable quote or revert.
- Price logic should be consistent with the logic used at settlement.
- Decimals and token ordering must match the configured pair.
Settlement Requirements
When a propAMM leg wins, settlement must deliver the output to the recipient and respect the minimum-output condition. The public Rialto integration model scopes token approval to the trade input and verifies the router’s output-token balance increase before accepting the fill.
Security Model
Allowlisted call surface
Only the intended integration call should be callable through the configured router path.
Scoped approvals
Input allowance should be limited to the amount needed for the current fill and removed afterward.
Output verification
Settlement should only succeed when the required output was actually delivered.
Source-owned risk
The propAMM owns its inventory, pricing model, freshness checks and market-making risk.
Onboarding Checklist
- Deploy and verify the pair or adapter contract.
- Confirm token ordering, decimals and supported directions.
- Test exact-input quotes over realistic order sizes.
- Confirm settlement sends output to the router recipient and reverts below minimum output.
- Provide realistic gas behavior for route scoring.
- Stress-test stale-price, low-inventory and unsupported-size conditions before production.
Adapter Strategy
If an existing market maker exposes different function names or argument order, an adapter can normalize it to the interface expected by the router without rewriting the underlying pricing engine. Confirm selector and calldata assumptions for the current Rialto deployment before production integration.
