> For the complete documentation index, see [llms.txt](https://docs.safeswap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.safeswap.io/learn/how-safeswap-works.md).

# How SafeSwap Works

{% hint style="info" %}
Click [**here**](/user-guides/swap-tokens.md) to view a **detailed tutorial** on how to swap your tokens with SafeSwap.
{% endhint %}

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

## 1. Initiate Swap <a href="#id-1-initiate" id="id-1-initiate"></a>

To initiate a swap, the user must select:

* a source **and** destination blockchain (both)
* connect a source **and** destination wallet (both)
* select the preferred token
* and fill in the amount to swap

## 2. Secure Swap <a href="#id-2-secure" id="id-2-secure"></a>

SafeSwap’s integrated UI creates a unique secret code which delivers hash data to the contract.

## 3. Lock Native Tokens on Source Chain <a href="#id-3-lock" id="id-3-lock"></a>

If a swap is initiated, SafeSwap will lock all tokens received from the source wallet in the related locked token pool on the source blockchain.

## 4. Unlock Native Tokens on Destination Chain <a href="#id-4-unlock" id="id-4-unlock"></a>

SafeSwap accounts for the required tokens necessary and uses the unique code to unlock tokens from a locked token pool on the destination blockchain.

## 5. Claim to Wallet <a href="#id-5-claim" id="id-5-claim"></a>

The user can claim the swapped tokens and they are transferred to the connected destination wallet.
