For the complete documentation index, see llms.txt. This page is also available as Markdown.

On-chain Swaps

Fully on-chain execution through audited smart contracts — fast, transparent, and non-custodial.

On-chain Swaps

Swap or bridge any supported token through audited routers – your funds never leave your control.

What is an on-chain swap?

An on-chain swap is the most direct way to trade: execution happens entirely through smart contracts, and YiFi never takes possession of your funds at any point.

Rather than routing you to a single DEX, YiFi aggregates across on-chain route builders – on-chain providers –  comparing routes across DEXs, bridges, and cross-chain aggregators to find the best available output for your pair and amount.

Core features

  • Best available rate. Routes are compared across every connected on-chain builder before you sign, rather than checking one DEX at a time.

  • Fully non-custodial. Every swap is enforced by a smart contract and settles directly between your wallet and the liquidity source.

  • Fee transparency. Network gas and provider fees are factored into the quoted output before you sign – no surprises after the fact.

  • EVM, Solana and multiple L1 coverage. On-chain routing spans EVM networks, Solana and Layer 1 blockchains; see Coverage for the live, queryable list.

How it works

1

Request a quote

Enter your source and destination tokens and an amount. YiFi queries connected on-chain route builders and returns the best available route.

2

Approve, if needed

First-time swaps of a given token may require a one-time token approval.

3

Sign transaction calldata

Confirm the transaction in your wallet. Same-chain swaps settle atomically; cross-chain routes execute as a multi-step bridge-and-swap sequence.

4

Delivery

The destination token arrives in your wallet on the target chain.

Who it's for

Good fit for:

  • Traders who want the best available rate and lowest slippage

  • Users who want the fastest path for a same-chain or cross-chain move

  • Anyone who wants 100% on-chain, smart-contract-verifiable execution

Not the best fit for:

  • Privacy-focused users – on-chain swaps are fully public and traceable (use Private Swaps instead)

  • Users who'd rather not connect a wallet or sign a transaction (use the off-chain rail instead)

On-chain Swaps – Summary at a glance

  • Privacy: Low – fully public and verifiable on-chain.

  • Speed: Fast – typically seconds to a few minutes, depending on chain and route.

  • Custody: Non-custodial throughout.

  • Best for: Best-rate execution with full on-chain transparency.

Integrating

On-chain routes are quoted and executed through the same lifecycle as the other rails (quote → order → status). See the private routing endpoints in the API Reference.

Last updated

Was this helpful?