# Swapping Tokens

## Overview

OISY Wallet features a built-in decentralized swap function, allowing users to exchange assets directly within the wallet.

To swap tokens:

1. Click the “Swap” button below your available balance.
2. Select the tokens you wish to swap in the “You Pay” and “You Receive” dropdown menus.
3. Enter the amount for the swap.
   1. The "You receive" field now also shows the expected amount of tokens and their value in your currency.
   2. Additionally, it also shows the difference in value between the amount sent and the amount expected to receive. Often this value is slightly lower, because a swap involves some transactions to be executed, and some fee for the provider of the liquid assets required.
4. Adjust or confirm the Max Slippage Rate (if applicable).
5. Change the suggested swap provider if desired.\
   \****Note**: OISY always suggests the provider with the highest receive amount.*
6. Click “Review Swap” to verify transaction details.
7. If all values are correct, click “Swap Now” to execute the swap transaction.

Swaps are executed through on-chain liquidity pools, ensuring full decentralization and provable fairness.<br>

***

## Convert assets from/to the ICP Network

The Internet Computer network ICP allows to bridge the most widely used tokens in or out of its network. Once on the ICP network, transactions are much faster and cheaper.

{% hint style="success" icon="brain" %}
**Learn more here:** <https://docs.internetcomputer.org/defi/chain-key-tokens/overview>
{% endhint %}

Supported are currently BTC, and these tokens on the Ethereum network: ETH, USDC, USDT, EURC, XAUT, UNI, PEPE, LINK and a few more.

{% hint style="info" %}
The token on the ICP network can be identified by a **`ck`** (for "chain-key") in front of its symbol.

![](/files/VJLSgkdSpYcWjkP22wXs)
{% endhint %}

#### Convert into the ICP Network

1. Select the token you want to convert, and open its token view
2. Click the convert button in the hero of the page\
   ![](/files/O8XwHaSbEqDpta55AulE)<br>
3. Specify the amount to be converted, review the transaction and execute it.\
   ![](/files/Xuyufsd6jN11bz6iF3SC)<br>
4. The conversion will now start and you will receive the token on the ICP network.

{% hint style="warning" %}
**Note**: Based on the source network (Bitcoin, Ethereum), the conversion can take several minutes (Ethereum) and up to 20 minutes (Bitcoin) to be completed. This is due to the time it takes to have a transaction confirmed on those networks.
{% endhint %}

#### Convert out of the ICP Network

Converting out of the ICP network works the same way like converting in.

1. Select the ck token and open its token view
2. Click the convert button
3. Specify the amount, review, and execute.

## Manually withdraw Funds from ICPSwap

{% hint style="info" %}
When using ICPSwap as swap provider, there is a very small chance that in case the swap fails, the funds can not get automatically withdrawn by OISY and must be withdrawn manually via their web app.\
Note that usually when a swap fails, OISY automatically withdraws the funds sent for the swap back into your wallet.

The section below describes how a user can manually withdraw them anytime later.
{% endhint %}

{% hint style="success" %}
Note that these funds are always under your control and can always be accessed on ICPSwap anytime later by connecting OISY.
{% endhint %}

### Swap failed and the fund could not be withdrawn

When the swap failed and the funds could not get withdrawn, the swap review modal will show this message:

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

### Go to the ICPSwap website

Clicking the link to ICPSwap brings you to their website. Or you can access the website directly: <https://app.icpswap.com/swap>

**Note: It's important that the same swap "Pair" (e.g ICP and PANDA) is selected on their website.** Otherwise the blocked tokens are not visible. Using the provided link at the end of the message in OISY selects this pair automatically.

Their website should now look something like this

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

### Connect OISY

Now you have to [connect your OISY wallet](/using-oisy-wallet/how-tos/connecting-to-dapps.md) to the website, in order to have access to your funds that are still 'parked' on ICPSwap.

Click the "Connect wallet" on top right and select OISY Wallet in the wallet selection.

<div align="left"><figure><img src="/files/KV3GCTI4HVtbaQwk9Ptk" alt="" width="375"><figcaption></figcaption></figure></div>

A confirmation popup will show (ensure that you allow popups from the ICPSwap website) where you have to confirm that the website is allowed see your wallet's address:

<div align="left"><figure><img src="/files/JtVpQ9JWH2Qv780ZBg0q" alt="" width="264"><figcaption></figcaption></figure></div>

After the confirmation, the site will show as connected (see top right), and you can see the amount you sent for the swap on the main form together with a "Withdraw" option:

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

### Withdraw the assets

Clicking the "Withdraw" will show a confirmation dialog.

<div align="left"><figure><img src="/files/tE9cBBHM7blXEeob8zBo" alt="" width="264"><figcaption></figcaption></figure></div>

Approving it will then send those tokens back to your wallet and show a confirmation in ICPSwap

<figure><img src="/files/DA7ia7eS1tbjetvs7SNa" 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.oisy.com/using-oisy-wallet/how-tos/swapping-tokens.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.
