# Uniswap v3

{% hint style="info" %}
BOB can be obtained on many DEXs and aggregators throughout the ecosystem, including [1inch exchange](https://app.1inch.io/#/1/unified/swap/BOB/USDC), [Quickswap](https://quickswap.exchange/#/) and many others. See the [BOB Ecosystem page](https://bob-docs.zkbob.com/bob-info/bob-ecosystem) for more details.&#x20;

This explainer shows how to swap BOB to USDC using Uniswap v3 on Polygon.
{% endhint %}

## Prerequisites

* **Wallet Account:** Web3 wallet such as Metamask connected to the Polygon Network. [Additional instructions](https://thedefiant.io/how-to-connect-metamask-to-polygon)
* **USDC on Polygon**. You can get USDC on Polygon in a variety of ways:
  * Trade via a DEX like [Uniswap](https://app.uniswap.org/) or [1inch](https://app.1inch.io/#/137/classic/swap/MATIC/USDC) or a CEX like [Coinbase](https://blog.coinbase.com/send-and-receive-crypto-on-multiple-networks-starting-with-polygon-and-solana-e03d8480fe54) or [Crypto.com](https://crypto.com/)
  * Purchase directly via an onramp like [Moonpay](https://www.moonpay.com/buy), [Ramp](https://ramp.network/buy/?defaultAsset=USDC) or [Transak](https://transak.com/)
  * Bridge from Ethereum (or another chain) using the [Polygon Bridge](https://wallet.polygon.technology/bridge/) or other 3rd party bridges like [Hop](https://app.hop.exchange/) or [Connext](https://bridge.connext.network/).
* **MATIC**: You will need a small amount of MATIC on Polygon to pay transaction fees for the trade. You can purchase, trade or bridge in numerous ways mentioned above.

## Get BOB

{% hint style="info" %}
These instructions provide an example using USDC to acquire BOB. You can choose to swap with other tokens as long as there is enough liquidity.  You can also swap from BOB back to USDC or another token of your choice.
{% endhint %}

1\) Go to the BOB/USDC [Uniswap v3 Pool](https://app.uniswap.org/#/swap).

2\) If you are connected to a different network, you will see Unknown in the token field.&#x20;

1. Press network dropdown.
2. Change network to Polygon. The fields will populate with the correct token pair (USDC & BOB)

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2FKiTDJnpurPxcE2qzZlxv%2Fimage.png?alt=media&#x26;token=ce9b5230-3afb-4fc1-a755-441aea23591b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2FzF7d3Eexgohx84LlpROa%2Fimage.png?alt=media&#x26;token=8784dd99-f30c-4aee-b5f9-4fc12eed8cbb" alt=""><figcaption></figcaption></figure>

3\) If you haven't already, connect your web3 wallet.&#x20;

{% hint style="warning" %}
If your web3 wallet is connected to a different network, you may need to switch your network back to Polygon to continue.
{% endhint %}

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2FwRd6t0qWPLNri2jRUtJe%2Fimage.png?alt=media&#x26;token=a2eaa588-3963-4d2b-a689-d14ad0bf740a" alt=""><figcaption></figcaption></figure>

4\) Enter amount of USDC to swap for BOB. You will see the amount of BOB you will receive for the trade.

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2F10m1arixzar7MkdYSUMC%2Fimage.png?alt=media&#x26;token=d154c856-3853-4584-859f-51713aed46cc" alt=""><figcaption></figcaption></figure>

5\) Press **Allow the Uniswap Protocol to use your USDC**. You must allow the contract to spend your USDC.&#x20;

{% hint style="info" %}
You can choose to keep this allowance for as long as you like, and subsequent transactions with USDC can be processed without requiring this transaction. You can also choose to [revoke](https://revoke.cash/) at any time, and reset permissions the next time you want to exchange USDC for BOB.
{% endhint %}

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2FjZpTbTA9aN993vZCpvCo%2Fimage.png?alt=media&#x26;token=d186e8d8-8420-492c-b383-1dff82bf0f04" alt=""><figcaption></figcaption></figure>

6\) Swap assets.

* Press **Swap**
* **Confirm Swap** in Uniswap App
* **Confirm** in Metamask.

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2FV0X7Ljxj3JN7ALs0FNpj%2Fimage.png?alt=media&#x26;token=f6e04c6b-6812-4745-a5b5-e56181987e6a" alt=""><figcaption></figcaption></figure>

7\) Once confirmed, click **View on Explorer** to see your transaction details.

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2FE2wTcBz8KLveVNaiGzGC%2Fimage.png?alt=media&#x26;token=7ab3c04f-7ffd-4817-8782-ad56dac148d6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2Fp8U6lhpkWKrGEUkCIB5C%2Fimage.png?alt=media&#x26;token=14d0a4fc-9b74-4a42-b7bd-b23d9ffb1f81" alt=""><figcaption></figcaption></figure>

8\) You can now use BOB in the [zkBOB application](https://app.zkbob.com/). To trade back to USDC, simply switch the tokens and follow the process above.

<figure><img src="https://2662201475-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5V3VLUd8erHoYOehBQGv%2Fuploads%2Fv6fMk5UzqqsyeCJUD602%2Fimage.png?alt=media&#x26;token=0705564e-2338-4926-9dd8-f81baf45c40e" alt=""><figcaption></figcaption></figure>
