Architecture Overview
How YiFi's routing engine connects on-chain, off-chain, and private liquidity behind one API.
Architecture
The routing engine that compares CEX, DEX, and private liquidity, then orchestrates execution through one API.
System architecture
YiFi sits between your application and every liquidity source it supports. It queries providers, ranks the results, and orchestrates execution through whichever one wins the route.
Key components
1. Your application
Integrates with YiFi through:
REST API – direct HTTP calls for full control over quoting, order creation, and status tracking.
Widget – an embeddable swap interface for a minimal-integration path.
See API Reference.
2. Routing engine
The core YiFi Swap orchestration layer.
Queries all connected providers across the three rails for a given request.
Ranks routes by expected output, fees, and estimated time.
Builds the transaction (on-chain) or deposit instruction (off-chain / private) for the selected route.
Tracks order state through to settlement and exposes it via the status endpoint.
3. On-chain DEX aggregation
Non-custodial execution through audited smart contracts; same-chain swaps are atomic, cross-chain routes are multi-step.
4. Off-chain CEX exchange partners
One-to-one deposit-and-forward execution; no wallet connection or gas required from the user.
5. Private routing
Two-leg execution through partner exchanges with an intermediate hop. See Private Swaps.
6. Recipient wallet
Funds are sent to the address the user specifies – a standard receiving wallet address.
Routing strategies
DEX Routes
Transparent, non-custodial, atomic on same chain
CEX Routes
No wallet or gas, widest coverage
Private Routes
Untraceable on-chain. No wallet connection required.
Each strategy can be requested independently through the API – see API Reference for the relevant endpoints.
Last updated
Was this helpful?