# Swapping

QSafe Wallet’s swap feature simplifies decentralized token exchanges across multiple blockchains. Here's a breakdown of how it works, using the screenshots attached as examples:

***

**1. Swap Interface Overview**

The swap screen allows you to convert one cryptocurrency into another (e.g., **POL → USDC** on Polygon). Key components include:

* **Token Selection**:
  * **Input Token**: Select the token you want to spend (e.g., POL).
  * **Output Token**: Choose the token you want to receive (e.g., USDC).
* **Amount Input**:\
  Enter the quantity of the input token (e.g., `0.0001 POL`).
* **Network Selection**:\
  Specify the blockchain for the swap (e.g., Polygon).
* **Recipient Address**:\
  Optionally set a destination address for the received tokens.
* **Preview Button**:\
  Simulate the swap to view real-time rates, fees, and slippage.

***

**2. How It Works Under the Hood**

1. **Price Aggregation**:\
   Q Safe Wallet queries decentralized exchanges (DEXs) and aggregators to find the **best possible rate** for your swap. For example, in the screenshot, swapping `0.0001 POL` yields `0.000021 USDC`.
2. **Gas Fee Estimation**:\
   The wallet calculates the **network fee** (gas) required to execute the transaction.&#x20;
3. **Slippage & Risk Management**:
   * **Slippage Tolerance**: The maximum acceptable price change during execution (default 0.5%).
   * **Minimum Received**: Ensures you get at least the specified amount even if prices fluctuate.
4. **Security Checks**:
   * Validates if you have enough funds to cover both the swap amount **and gas fees** .
   * Alerts you if funds are insufficient (as shown in the error message).

<figure><img src="/files/sxrvUBqAEd2a37lm7tmW" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/vFFMRXhlXVj8M9reLN3U" alt=""><figcaption></figcaption></figure>


---

# 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://docs.qsafewallet.com/all-features/swapping.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.
