# How Do Cross-Chain Swaps Operate

#### Complete seamless cross-chain swaps with support for 11 different networks using [Squid's](https://t.co/Os7AF0To0c) integrated widget, powered by [Axelar Network](https://t.co/5ibc7viFj3).

Let's illustrate the process of executing a swap from ETH (on Ethereum) to SOL (on Solana) using RepoSwap:

On the RepoSwap User Interface (UI), users will find a pool called 'ETH-SOL pool'. This pool comprises two components: one containing ETH tokens on the Ethereum blockchain and the other containing SOL tokens on the Solana blockchain. Users execute token swaps leveraging the liquidity available in these pools. Liquidity providers have the opportunity to claim swap fees whenever users execute trades, with rewards proportional to their share in the liquidity pools. The user's ETH is transferred to the ETH liquidity pool within the ETH-SOL pool on RepoSwap's platform. Utilizing data on the existing tokens within the pool, the conversion rate to SOL is calculated. Subsequently, the RepoSwap smart contract facilitates the transfer of SOL tokens back to the user's wallet, thereby completing the swap process.<br>

Within RepoSwap's Decentralized Application (DApp) UI, users have the flexibility to choose a slippage rate for the swap, depending on their specific requirements. A higher slippage rate increases the likelihood of a successful transaction, albeit at the expense of receiving a slightly lower amount of tokens and susceptibility to bot-induced frontrunning.

<div><figure><img src="/files/v19VkaAgntL1TXaWZAFR" alt=""><figcaption></figcaption></figure> <figure><img src="/files/OChIlj9PHGO5RBuFLDE4" alt=""><figcaption></figcaption></figure> <figure><img src="/files/cQbiStwFXbBa4ZyVmYEW" alt=""><figcaption></figcaption></figure> <figure><img src="/files/C5FmQvhUNxA29YUsnnqz" alt=""><figcaption></figcaption></figure></div>

&#x20;Assuming a hypothetical scenario where the current ETH price is $1000 and the SOL price is $10, the liquidity pools maintain a ratio of 1 ETH:100 SOL. For illustrative purposes, let's consider the pool contains 100 ETH and 10,000 SOL tokens. When a user intends to swap x amount of ETH to y amount of SOL, the number of SOL tokens received is calculated according to the specific formula provided by RepoSwap's platform.

<figure><img src="/files/7AzY8Wly5oAnRNYaC1ut" alt="" width="375"><figcaption></figcaption></figure>

In summary, RepoSwap provides users with a seamless and transparent platform for executing cross-chain swaps, offering liquidity, flexibility, and security in the decentralized finance (DeFi) space.


---

# 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://reposwap.gitbook.io/reposwap/cross-chain-dex/how-do-cross-chain-swaps-operate.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.
