Routing on Unichain
Learn how to access and route liquidity across Unichain using Tycho.
Access Liquidity
Indexing, simulating, and encoding swaps across the many liquidity sources on Unichain can be challenging.
Tycho, built on Subtreams, gives you all simulation and execution logic for Unichain liquidity in a convenient open source library.
Quickstart: Trade on Unichain Liquidity
Clone the Tycho Simulation repository; you'll find the quickstart code there.
Then run:
More options for public RPCs.
In the above example, you're selling 10 USDC for WETH, at the best price available across all Uniswap pools on Unichain (v2, v3, and v4).
How it works
Tycho:
- Fetches all protocol states and finds all WETH/USDC Uniswap pools.
- Simulates a swap of 10 USDC to WETH on every pool.
- Encodes a swap for the pool that has the best price right now.
- If you approve, it automatically sets the right approval against the pool and executes your swap for you.
Example output:
For a more detailed quickstart to start trading on Unichain, you can visit Tycho Docs
If you develop a hook, lending market, stablecoin, or any protocol that needs to be accessible to professional routers, you can freely integrate with Tycho and receive orderflow from all solvers, fillers, and market makers.
To integrate your protocol, you can self-integrate by following the integration guide and submit a PR (requires Rust experience).
Last updated on