# Liquidity Router

### **On-chain Forex swap**

The router can combine two Liquidity Pools swaps to exchange jFIAT with jFIAT: the first swap between a jFIAT and its collateral and the second between the collateral and a jFIAT.

> **Example**
>
> For exchanging $10,000 of jEUR for jSGD, the router first swaps $10,000 of jEUR for 9,990 USDC (10 USDC of fee) using a USDC-jEUR pool and then swaps the 9,990 USDC for $9,980 of jSGD (9.99 USD of fee) using a USDC-jSGD pool.

{% hint style="info" %}
Since the two swaps happen without price impact, the router enables a 0-price impact on-chain Forex market.
{% endhint %}

### **Cross-asset swap**

The router can combine Liquidity Pool swaps with AMM swaps to exchange jFIAT with any other asset and vice versa: the first between a jFIAT and its collateral without price impact and the second between the collateral and any other token.

> **Example**
>
> For buying $10,000 of WBTC with jBRL, the router first swaps $10,000 of jBRL for 9,980 USDC (20 USDC of fee) using the USDC-jBRL pool, then swaps the 9,980 USDC for ±$9,980 of WBTC (slippage and price impact occurs).

{% hint style="info" %}
The router creates liquid jFIAT/TOKEN pairs without creating a jFIAT/TOKEN pool on the AMM.&#x20;
{% endhint %}

Since the Liquidity Pool swaps happen without price impact, swaps between a jFIAT and another asset have the same price impact and slippage as swaps between their collateral and the same asset.

{% hint style="info" %}
The router connects jFIATs to the entire on-chain liquidity of their collateral.&#x20;
{% endhint %}

### Wrapper swap

The router can combine a Wrapper wrap, or an unwrap with an on-chain Forex swap or cross-asset swap.

> **Example**
>
> For exchanging CADC to WBTC, the router first wraps CADC into jCAD using the CADC Wrapper, then swaps the jCAD for WBTC through a cross-asset swap.
>
> For exchanging XSGD for EURe, the router first wraps XSGD into jSGD, then swaps the jSGD for jEUR through an on-chain Forex swap, and finally unwraps the jEUR for EURe using the EURe Wrapper.

{% hint style="info" %}
There are CADC-jCAD, XSGD-jSGD, or EURe-jEUR stable pools on Curve or Balancer. A cross-asset swap using these pools may offer a better route than a wrapper swap, depending on the slippage in the stable pools. The router can also use these pools.
{% endhint %}

### Leveraged long and short

The router can combine a Credit Line or money market loan with an on-chain Forex swap or cross-asset swap to open a leveraged long or short position on any jFIAT/TOKEN pair.

> **Example**
>
> To open a EUR/CAD leveraged long position, the router deposits jEUR as collateral into the Credit Line or a money market and borrows jCAD or CADC. Then the router performs an on-chain Forex swap or a wrapper swap to swap CADC or jCAD for jEUR. The router can then repeat the operation to increase the leverage.

### Community routers

#### PicNic

The [PicNic](https://www.usepicnic.com/) router combines Liquidity Pools with AMM swaps to perform on-chain Forex and cross-asset swaps to create and manage a crypto portfolio entirely on-chain.&#x20;

#### Paraswap

The [Paraswap](https://www.paraswap.io/) router combines a Liquidity Pool swap with its off-chain liquidity aggregation engine to perform on-chain Forex swaps and cross-chain swaps with the best liquidity possible. Since Paraswap aggregates liquidity, it always offers better results than our purely on-chain cross-asset swaps.

#### Stableswap

The [Stableswap](https://www.stableswap.fi/) router combines Paraswap, Liquidity Pools, Wrappers, and AMM swaps to exchange stablecoins with any other stablecoin at the absolute best prices, enabling a universal on-chain Forex market.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.jarvis.network/protocol-overview/oclr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
