=============== Swapping Tokens =============== Aside from buying tokens via the CarbonPath web app (see :ref:`buy-label`), tokens may also be exchanged via *Uniswap*. As defined in their `website FAQs `_, *"The Uniswap Protocol is an open-source protocol for providing liquidity and trading ERC20 tokens on Ethereum."* Using the `Uniswap Interface `_, tokens can easily be exchanged. Steps in swapping CPCO2 tokens are as follows: 1. `Access Uniswap Interface`_ 2. `Connect your wallet`_ 3. `Select tokens`_ 4. `Input swap amount`_ 5. `Confirm transactions`_ .. _`Access Uniswap Interface`: ------------------------ Access Uniswap Interface ------------------------ Simply go to https://app.uniswap.org/#/swap .. _`Connect your wallet`: ------------------- Connect your wallet ------------------- The current network and connect wallet button is found on the upper right corner for desktop, and on the header for mobile. To connect your Web3 wallet, click on the |Connect Wallet Button| and link your wallet using one of the options provided. .. figure:: /images/uniswap-01-connect.png :alt: Upper right portion with current network and connect wallet :align: center .. figure:: /images/uniswap-02-connect.png :alt: Web3 wallet connect options :align: center :scale: 80 % Once connected, your current network will be fetched. Make sure you are connected to the correct network before swapping. To change your network: A. **on the Uniswap Interface** - click on current network, select a network from the list, and confirm the network switch on your wallet B. **on your wallet** - changing to a different network will be detected when you return to the Uniswap Interface .. figure:: /images/uniswap-03-network.png :alt: List of networks after clicking on current network in Uniswap Interface :align: center Uniswap Interface networks after clicking on current network .. _`Select tokens`: ------------- Select tokens ------------- In the swap modal, select the tokens for swapping. Click the Select Token button, then search for *"CarbonPathToken"* or *"CPCO2"*. You can also paste the appropriate token address in the search bar: * if on Celo Alfajores (Testnet), use token address: .. code-block:: RST 0x82739f861758b375B649216b56160BE7EA92735D * if on Celo (Mainnet), use token address: .. code-block:: RST 0xd7dd367ea602bE314e5050C3334A3d4c2FdeFe21 Then, click on CarbonPathToken (CPCO2). Tokens will be swapped from the one above to the one below. Clicking the |Arrow Down Button| button in the middle switches the order of the two tokens provided. .. figure:: /images/uniswap-04-tokens.png :alt: Uniswap Interface swap modal :align: center Uniswap Interface swap modal .. _`Input swap amount`: ----------------- Input swap amount ----------------- Once tokens are set, input the amount of tokens to be swapped in one of the input fields. The equivalent value of the other token will be filled automatically. You can also click on "Max" to swap all your tokens. .. figure:: /images/uniswap-05-input.png :alt: Uniswap Interface input :align: center Uniswap Interface input .. _`Confirm transactions`: -------------------- Confirm transactions -------------------- Once everything is set, click on the **Swap** button below. Confirm Swap details will then be shown. Click **Confirm Swap**. Confirm Uniswap requests on your wallet. Additional requests (Transaction & Signature confirmation) will be needed for first time swaps. After confirming, Transaction Submitted will be shown. You can verify your swap via the "View on Block Explorer" - depending on network traffic, transaction details should be up after a short delay. Hit **Close** to finish your swap and return to the swap modal. .. figure:: /images/uniswap-06-submitted.png :alt: alt text :align: center Submitted transaction .. |Connect Wallet Button| image:: images/uniswap-connectWalletButton.png .. |Arrow Down Button| image:: images/uniswap-switchTokens.png