> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thiqwave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# On-chain FX

> Convert between stablecoins and transfer across blockchain networks

On-chain FX lets you move stablecoins across chains and convert between different stablecoins. Whether you need USDT on Ethereum to become USDC on Polygon, or USDC to cross from Solana to Base, Thiqwave routes the transaction through the optimal path.

## Conversion Types

### Cross-Stablecoin

Convert between USDT and USDC (or other supported stablecoins).

```
USDT → USDC
```

Both tokens represent similar value but may have different liquidity, fee structures, or ecosystem integrations. On-chain FX handles the atomic swap and settlement.

***

### Cross-Chain

Transfer the same stablecoin across different blockchains.

```
USDC on Ethereum → USDC on Polygon
```

Useful for moving liquidity between chains, routing to cheaper networks, or accessing protocol-specific versions of the same token.

***

### Cross-Stablecoin + Cross-Chain

Simultaneously convert stablecoin type and move across chains.

```
USDT on Ethereum → USDC on Solana
```

This is the most complex settlement pattern. Thiqwave finds the optimal route—whether that's a DEX, bridge, or direct settlement—and executes atomically.

***

## Supported Stablecoins

* USDT (multi-chain)
* USDC (multi-chain)
* Local non-USD stablecoins (corridor-dependent)

***

## Supported Chains

* Ethereum
* Avalanche
* Arbitrum
* Base
* Polygon
* Tron
* Stellar
* Solana
* XRPL
* Algorand
* Sui

***

## Quote-Driven Settlement

All on-chain FX transactions require a quote:

<Steps>
  <Step title="Request Quote">
    Specify source stablecoin, source chain, destination stablecoin, destination chain, and amount
  </Step>

  <Step title="Receive Rate">
    Get destination amount, fees, and 3-minute lock window
  </Step>

  <Step title="Execute FX">
    Initiate the conversion and transfer with the quote ID
  </Step>

  <Step title="Settle On-chain">
    Transaction confirms on destination blockchain
  </Step>
</Steps>

Rates are locked for 3 minutes. Execute within the window or request a new quote.

***

## Settlement States

| State        | Description                                                             |
| ------------ | ----------------------------------------------------------------------- |
| `pending`    | On-chain FX initiated, awaiting first blockchain confirmation           |
| `processing` | Token conversion and transfer in progress                               |
| `completed`  | Destination tokens received on destination chain                        |
| `failed`     | Settlement failed; check webhook for reason (liquidity, reversal, etc.) |

***

## Routing & Optimization

Thiqwave's on-chain routing engine aggregates liquidity across multiple bridges, DEX aggregators, and intent-based systems to find the optimal execution path for every transaction. This means:

* **Multi-bridge redundancy**: If one bridge is congested or offline, transactions are automatically rerouted through alternative bridges — no single point of failure.
* **DEX aggregation**: On-chain swaps tap into liquidity from major decentralized exchanges across all supported chains.
* **Optimal path selection**: Every transaction is routed through the combination of bridges and DEXs that minimizes cost, maximizes speed, and ensures execution reliability.
* **EVM and non-EVM support**: Routing works across both EVM-compatible chains (Ethereum, Avalanche, Arbitrum, Base, Polygon) and non-EVM chains (Solana, Tron, Algorand, Stellar, XRPL, Sui).
* **Atomic execution**: Complex cross-chain + cross-stablecoin conversions are handled as single transactions from the caller's perspective.

***

## Use Cases

* **Protocol Liquidity**: Move stablecoins to chains where your protocol runs
* **Arbitrage**: Spread liquidity across chains efficiently
* **User Custody**: Allow users to move stablecoins between blockchains
* **Multi-chain Settlement**: Settle fiat transactions across different blockchains
* **Ecosystem Routing**: Route through the most cost-effective chains and stablecoins

***

## Next Steps

<CardGroup cols={2}>
  <Card title="On-chain FX Guide" description="Step-by-step conversion and transfer instructions" href="/guides/onchain-fx" />

  <Card title="Quotes Concept" description="Real-time pricing and lock windows" href="/concepts/quotes" />

  <Card title="On-chain FX API" description="Execute conversions and transfers programmatically" href="/api/onchain-fx/create" />

  <Card title="How It Works" description="Understand the four settlement patterns" href="/concepts/how-it-works" />
</CardGroup>
