> For the complete documentation index, see [llms.txt](https://docs.qsafewallet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qsafewallet.com/all-features/swapping.md).

# 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="https://4227883243-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWQaf2furhOcVCSNbnqem%2Fuploads%2FJmH27zrvDGyBtVXDrY0L%2Fimage.png?alt=media&amp;token=ea965fc0-c659-42ec-8fd8-e66002ec0a68" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4227883243-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWQaf2furhOcVCSNbnqem%2Fuploads%2FIDcemJuejcdSv4Ipyw0Y%2Fimage.png?alt=media&amp;token=587faf39-e589-4575-8005-c99afcfb2b8f" alt=""><figcaption></figcaption></figure>
