Using the Osmosis DEX to swap IBC-enabled tokens: ATOM, OSMOS, REGEN, AKT, and more

Gianluca Cremona
Simply Staking
Published in
7 min readAug 3, 2021

--

Osmosis is an Automated Market Maker within the Cosmos ecosystem, which is the first to be IBC (inter-blockchain communication) enabled. IBC allows Tendermint-based applications to interact with each other, therefore Osmosis operates as an AMM between these chains.

Osmosis was released over a month ago, providing users with several features such as token swaps, provide liquidity by participating in liquidity pools, staking and also governance. This can be done through the official frontend and the Keplr wallet. If you were staking ATOM on Cosmos Hub in February, you might also want to check out the Airdrop page for some complimentary OSMO tokens.

In this guide, we will be going through the steps required to deposit and swap any compatible token on Osmosis. In this case, we’ll be starting with ATOM.

What you will need:

  1. Keplr wallet
  2. One of the Cosmos-SDK based tokens supported by the Osmosis frontend https://app.osmosis.zone/assets

Let’s Enter the Lab.

On entering the lab we will be presented with the trade page, which is the main interface of the exchange. We have several options on the sidebar, including Trade, Pools, Airdrop, Assets, Stake, and Vote.

Besides the funky scientist and Dogemosis, we have the token swap widget. We will use this tool to carry out all our token swaps.

OSMO

OSMO is used for the following:

  • Voting on proposals (governance)
  • Liquidity mining rewards for liquidity pools
  • Stake-able to secure the network and earn stake rewards
  • Network transactions and swap fees

We currently have no OSMO available in our wallet, therefore we should top up with OSMO by swapping some of our ATOM tokens.

In order to get started and connect a wallet to the exchange, we must have the Keplr wallet installed which is a browser extension.

We will click on the Connect Wallet option to connect our wallet to Osmosis and this will redirect us to the Keplr extension page.

Keplr is currently the only wallet that is supported by Osmosis and the method by which we will deposit our tokens to Osmosis. We will now install the Keplr google chrome extension and set up the wallet. This will be quick!

Setting up Keplr

The Keplr wallet will create addresses for all the networks in the Cosmos Hub. The wallet is known as the Interchain wallet and has access to all the blockchains running in the Cosmos Hub. The wallet is a Google Chrome extension and is officially supported on Google Chrome. It can be used on the Brave browser, however some features may be unavailable, therefore we strongly suggest sticking to Google Chrome. Note that the Keplr extension cannot be used from a mobile device.

  1. Access the Keplr Chrome Extension page (always do your own due diligence on any browser extension you install) and click the Add to Chrome button.

Confirm that you want to proceed and add the Keplr extension by selecting the Add extension option.

On adding the extension to your browser, navigate to the extension tab to confirm Keplr was added. This is done by accessing the extensions tab which is in the form of a puzzle piece icon, found beside your Google profile avatar.

Next, click on Keplr from the extension list and you will be further prompted to a page shown below:

Create a new account, import an existing account (seed phrase), or import an address from a Ledger hardware wallet. If choosing the Ledger option, make sure your device has the Cosmos app installed, it is open and connected to your computer.

5. We will proceed with the Create new account option.

A list of 12 random words will be displayed. This is your mnemonic seed, which you must make sure to write down word by word and store somewhere safe offline.

Enter an Account name which will be the name of your wallet and set a password.

8. After clicking on next you will be prompted with a mnemonic seed confirmation tool that verifies that you have stored and taken note of the 12 words by having you set them in the correct order.

Once you are done setting up your Keplr wallet, you may access your wallet at any point in time by clicking on the extensions tab on the top right-hand corner of your browser.

On opening the wallet you will see Cosmos listed on top and below it is the wallet name you have given your wallet. We have now created addresses for all the networks in the Cosmos Hub including a Cosmos ATOM wallet.

Swapping our tokens on Osmosis

In this section, we will go through the steps of swapping some of our $ATOM balance to $AKT.

Step 1) Once on Osmosis click on Connect Wallet. This will immediately connect your Keplr wallet. A requesting connection page will pop up requesting approval of the connection.

Once connected a “Sign out” option will be displayed.

Step 2) Select the Assets page. We will now deposit our assets into the platform.

Step 3) To deposit we will use the IBC Deposit option for the ATOM token as this is what we are currently holding. You must select what token you currently hold and wish to deposit.

Our Keplr wallet has 5 ATOM, therefore we will deposit 2 ATOM. Always make sure to keep an amount for gas and do not deposit the entire amount. This amount will be added to the IBC Assets.

Step 4) Set the specific amount of tokens to deposit and click Deposit.

Step 5) Select the gas fee you wish to pay with. The lower the fee the longer the transfer will take to go through. Press Approve and a Transaction Successful message will appear when successful.

Step 6) We will now load up our asset holdings with some OSMO as it is the gas used on the exchange. Due to points in time with increased volatility in market pricing we are able to set a slippage tolerance by clicking on the cog icon on the top right of the swap widget.

Ultimately it is to mitigate large price changes for the tokens you are swapping and the transaction will revert if the price change surpasses the deviation threshold set.

Step 7) Click on Swap and Approve the transaction from Keplr. These transactions must be run at a 0 transaction fee considering the fact that we currently do not have any OSMO in our wallet.

You might not have sufficient OSMO to pay for the transaction, however for your first transactions you must pay using the low gas fee option as you currently don’t hold any.

Step 8) Click Approve and wait for the transaction to broadcast.

When checking our Assets we see that we have 3.530173 OSMO and 1.5 ATOM. Our first swap is conducted, however the aim of this guide is to swap our ATOM to AKT.

We will now swap 1 ATOM to AKT using the same method as before.

The transaction is successful. We head over to our assets page and we can view all the available tokens and their balances.

Our 4.432 AKT is now available and now we may use all the features Osmosis provides.

Concluding remarks

Fantastic! We now have multiple IBC network tokens available, enabling us to participate in more networks by successfully swapping from ATOM to OSMO and ATOM to AKT within minutes.

The process of swapping is straightforward once you have the essentials set up, complemented by the Osmosis interface, facilitating the user experience by means of intuitive instructions and an immediate wallet connection.

Having an IBC enabled AMM in this ecosystem is a giant leap forward for the Cosmos ecosystem and any upcoming projects implementing IBC, enabling them to be connected to Osmosis, further increasing network activity. The team behind the exchange is dedicated to consistently enhancing the platform and has several features in the pipeline.

Stay tuned to Simply VC for more $OSMO related guides and documentation:

--

--