On-chain FX routing is the practice of converting one currency into another directly on a blockchain. Instead of asking a bank or broker for a rate, a payment provider or user swaps a token tied to one currency, such as a US dollar stablecoin, for a token tied to another, such as a euro stablecoin, through a liquidity pool or on-chain exchange. Routing refers to choosing the path: which venue, which intermediate tokens and which order of trades give the best result.
It is the counterpart of off-chain FX routing, in which the blockchain may carry the payment but the conversion happens with banks, market makers or a provider's own treasury. Firms building stablecoin-based money transfer often combine both, using on-chain swaps where the pools are deep enough and traditional foreign exchange desks where they are not.
On-chain FX routing in plain terms
Imagine an airport exchange hall with several booths, each holding piles of two currencies. A machine at the entrance looks at all the booths' current piles, works out which one, or which combination of two booths, would give you the most euros for your dollars, and sends your money there automatically.
On-chain FX routing is that machine, built in software on a blockchain. The booths are liquidity pools, the currencies are tokens, and the rules for prices are written into code that anyone can inspect. There is no clerk to negotiate with, but if a booth is nearly empty the price gets worse with every note you exchange.
How a route is executed
- Quote. A router or aggregator reads prices from on-chain venues, mostly automated market makers and some on-chain order books.
- Path finding. It compares a direct swap (for example a dollar token straight to a euro token) with multi-step routes (dollar token to a second dollar token, then to euro) and may split the order across several pools to reduce price impact.
- Execution. A smart contract performs all legs in one transaction with a minimum acceptable output; if the result would fall below it, the whole transaction fails rather than settling partially.
- Delivery. The output token lands in the recipient's wallet or is passed to an off-ramp that pays out local currency.
Because every leg sits in one transaction on one chain, the conversion and the transfer settle together. This is a form of payment-versus-payment settlement that removes the gap between paying away one currency and receiving the other, the gap known in traditional markets as Herstatt or settlement risk.
Pricing and cost
An on-chain route carries several costs:
- The pool fee charged by each liquidity pool used, paid to its liquidity providers.
- Slippage, the difference between the quoted price and the price obtained as the trade moves the pool's balance; it grows with trade size and shrinks with pool depth.
- Network gas fees, which rise with the number of steps in the route.
- Divergence from the market rate. Pool prices only follow the wider market when arbitrageurs trade them back into line, so a pool can briefly drift away from the mid-market rate.
The mathematics of how pool prices move is set out in formulas for automated market makers.
Where it is used
Dollar stablecoins dominate on-chain liquidity, so swaps between two dollar tokens are deep and cheap, while pools for euro, sterling or emerging-market currency tokens are much thinner as of 2026. On-chain FX routing is therefore most practical for large currency pairs and for providers that only need the blockchain leg to bridge between two fiat endpoints. Payment companies use it to reduce the need for prefunding in destination countries, and some decentralised exchanges such as Uniswap and Curve host the pools these routers draw on.
Central banks have tested the idea too. In Project Mariana, launched in 2022 and reported on in 2023 by the BIS Innovation Hub with the Banque de France, the Monetary Authority of Singapore and the Swiss National Bank, an automated market maker traded hypothetical wholesale central bank digital currencies in euro, Singapore dollars and Swiss francs. The final report found the approach technically feasible but noted that AMMs need liquidity to be prefunded, unlike today's FX markets.
Risks and limitations
- Thin liquidity outside the dollar makes large non-dollar trades expensive.
- Smart contract bugs, oracle failures and price manipulation can cause losses.
- Public transactions can be front-run by bots that see an order before it is confirmed.
- Stablecoins carry issuer and reserve risk; a token that loses its peg breaks the route.
- Regulated firms still need sanctions screening and licensing for the fiat legs, and may be limited in which pools and tokens they can touch.