Quickstart
Swap via Fynd in minutes.
Integrate Fynd into your application in two steps.
Prerequisites
Tycho API key (set as
TYCHO_API_KEY, get one here)Rust 1.92+ (install via rustup) or Docker (install Docker)
Step 0 — Start Fynd
cargo install fynd
export TYCHO_API_KEY=your-api-key
export RUST_LOG=fynd=info
fynd serveImages are available for linux/amd64 and linux/arm64.
docker run \
-e TYCHO_API_KEY=your-api-key \
-e RUST_LOG=fynd=info \
-p 3000:3000 -p 9898:9898 \
ghcr.io/propeller-heads/fynd servegit clone https://github.com/propeller-heads/fynd.git
cd fynd
cargo install --locked --path .
export TYCHO_API_KEY=your-api-key
export RUST_LOG=fynd=info
fynd serveSelect a chain
Each Fynd instance serves a single chain. fynd serve defaults to Ethereum; pass --chain to target another one:
fynd serve --chain baseFor Docker, append the flag after serve:
docker run \
-e TYCHO_API_KEY=your-api-key \
-e RUST_LOG=fynd=info \
-p 3000:3000 -p 9898:9898 \
ghcr.io/propeller-heads/fynd serve --chain baseSupported chain names are case-insensitive: ethereum, base, unichain, bsc, arbitrum, polygon, robinhood. The first six ship with built-in Tycho and RPC endpoints. For Robinhood Chain, pass --tycho-url and --rpc-url explicitly.
Your client must target the same chain. If you use the TypeScript client (Step 1), set chainId and the viem chain to match the server:
Step 1 — Execute a swap
Full example: clients/typescript/examples/tutorial/main.ts
Install the @kayibal/fynd-client package:
Full example: clients/rust/examples/swap_erc20.rs
Add the fynd-client crate to your Cargo.toml:
This quotes 1000 USDC (6 decimals → 1 000 000 000 atomic units) for WETH.
Native ETH swaps
To swap native ETH, use 0x0000...0000 as the token_in or token_out address in your order.
Next steps
Encoding options - encode quotes into ready-to-submit transactions
Fynd Fees - understand Fynd fees on executed swaps
Charge Fees on your Swaps - charge integrator fees on swaps
Last updated