Swapping Tokens¶
Aside from buying tokens via the CarbonPath web app (see Buying Tokens), 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:
Access Uniswap Interface¶
Simply go to https://app.uniswap.org/#/swap
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 and link your wallet using one of the options provided.
Once connected, your current network will be fetched. Make sure you are connected to the correct network before swapping. To change your network:
on the Uniswap Interface - click on current network, select a network from the list, and confirm the network switch on your wallet
on your wallet - changing to a different network will be detected when you return to the Uniswap Interface
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:
0x82739f861758b375B649216b56160BE7EA92735D
if on Celo (Mainnet), use token address:
0xd7dd367ea602bE314e5050C3334A3d4c2FdeFe21
Then, click on CarbonPathToken (CPCO2).
Tokens will be swapped from the one above to the one below. Clicking the button in the middle switches the order of the two tokens provided.
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.
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.