# How to use the Mini Bridge?

### Introduction

The mini bridge can be configured and integrated into the deployed L2 network. Its key functionality includes Deposit/Withdraw support for ETH, Native token, USDT, and USDC. You can learn more about the mini bridge here. As the code is open source, operators and developers can extend its functionalities to suit their specific needs.

### Quick User guide

After you deploy the mini bridge following the Thanos stack deployment guide, you will get the public domain of that bridge where you can move assets across Layer1 and Layer2.

#### Wallet connect

1. First things first, you can connect your account by clicking `Connect Wallet` button to use the bridge.

<figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FLVgY38Xk2t3BdgDnGg2G%2F11.png?alt=media&#x26;token=cd2712ca-448b-44ac-b593-bcefdac8f030" alt=""><figcaption></figcaption></figure>

2. After you connect your account into the bridge app, you can change the network(L1 & L2) connected and also able to see the token balance of your account.

<figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FEnCqFA4Ckhtjn4nBUNuU%2F22.png?alt=media&#x26;token=86a42b4d-6433-4072-8041-193389645788" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FH197yEciX0knMVMCbeNL%2F33.png?alt=media&#x26;token=cde48f82-9a69-4237-9b15-3cfb79350ea4" alt="" width="524"><figcaption></figcaption></figure>

#### Deposit(L1 → L2)

1. Click the `Deposit` tab or set the L1 network chain connected to deposit tokens to the L2 network.

   <figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FQmnRXePZ8lM3vP2fVtdB%2F44.png?alt=media&#x26;token=cf800fb8-9f79-4c1e-a68a-df81c3df4cbb" alt=""><figcaption></figcaption></figure>
2. Select the token and input the amount to deposit. `To address` is the address to be deposited; it is your current account as a default, but you can put another account if needed. (pic1: connected account, pic2: another account)

   <figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FuKzJEUAthCgvIUXLzx7o%2F55.png?alt=media&#x26;token=40c3fda8-5d7f-4925-92d3-95d02d1b8701" alt="" width="425"><figcaption></figcaption></figure>

<figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2F2TiU45Z2Ow5TfRy70arm%2F66.png?alt=media&#x26;token=fe5040f7-c5f5-4236-8b20-fda98a1f07a7" alt="" width="479"><figcaption></figcaption></figure>

3. Click `Deposit` button for ETH deposit and you will need to approve them in case of the other tokens (Native token, USDT, USDC). \
   After the transaction has been confirmed, you will get the link of that transaction.

<figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FNH5tU5KOC1avLEb58TrK%2F77.png?alt=media&#x26;token=af88d28b-a48c-412f-a8bb-8b6a20120fd8" alt="" width="500"><figcaption></figcaption></figure>

#### Withdraw(L2 → L1)

The withdrawal process contains 3 steps (initiate, prove, finalize) based on Optimistic rollup.

1. Initiate
   1. You can initiate a withdrawal transaction by clicking `Withdaw` → `Initiate` tab and the operations(token selection, input amount, input address to send, etc) are same as what we did for the deposit process.

      <figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FgNJrDxKPLl7610Q1IFRO%2F88.png?alt=media&#x26;token=b2279e54-9d31-4a2c-ba3a-06d8ee559fdd" alt="" width="558"><figcaption></figcaption></figure>
   2. After the transaction has been confirmed, you will get the Tx hash which will be used for `prove` and `finalize` process.
2. Prove

   1. You can check the status of your withdrawal transaction in [Layer2 block explorer](https://explorer.thanos-sepolia.tokamak.network/withdrawals) that you deployed in the previous rollup deployment steps.

   <figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FRRXuHyyNGYaMPJw0KmfX%2F99.png?alt=media&#x26;token=91e9e695-c855-4173-8108-c2bef143918f" alt=""><figcaption></figcaption></figure>

   b. Once the transaction is ready to prove, you are ready to prove it. Click `Prove` tab and input the hash of the initiated transaction. Click `Prove` button.

   <figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FtC9pKlOKjFY6sSAdJ3la%2F1010.png?alt=media&#x26;token=5faff6a4-f52d-48a6-8eb4-012843f97845" alt=""><figcaption></figcaption></figure>
3. Finalize
   1. Check the status of your withdrawal transaction in Layer2 block explorer and it should be `Ready for relay` to be finalized.
   2. Go to `Finalize` tab and input the hash of the initiate transaction. Click `Finalize` button.

      <figure><img src="https://3565366697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl0dwiwSNGrEYCAvrI0ht%2Fuploads%2FgZUjtGhzs8T1F0J0BYQZ%2F1111.png?alt=media&#x26;token=3d674430-a82a-476b-8d48-09aa3864e39f" alt=""><figcaption></figcaption></figure>
