Terra is a blockchain which focuses on Decentralized Finance and which features a number of algorithmic stablecoins, each pegged to a national / international currency; these stablecoins facilitate transactions on the network and, along with Terra's native token LUNA, maintain the stablecoin peg by allowing users to arbitrage across currencies.

The Terra chain was developed and deployed by Terraform Labs and still many current projects on Terra's blockchain are incubated by capital from TFL. Some of the most notable DeFi projects on Terra are:

  • Anchor, a decentralized money-market offering 20% APY on stablecoin deposits
  • Mirror, which mirrors real-world stocks
  • Pylon, enabling project launches through crowd-funding
  • Orion, which exports Anchor's 20% yield to other chains

... as of the time of writing these are some of the most anticipated protocols launching on Terra.

... I'm lucky to be working with Levana to create the first perpetual swap protocol on Terra |・ω・`) while it is not the first perpetual swap on Cosmos (Injective Protocol has that title) I believe we have a distinct advantage starting off in an ecosystem with native stablecoins in which to quote prices and settle transactions.

Terra is built on the Cosmos SDK & the Tendermint Consensus algorithm; its smart contracts are typically written in Rust which are then compiled down to CosmWasm / Web Assembly. Recently Terra enabled Inter-Blockchain Communication to allow communication with other IBC-enabled projects like Cosmos Hub and Osmosis.

Moving Funds onto Terra

When I first discovered Anchor I was fascinated with its 20% APY on stablecoin deposits. For reference my bank account earns (at most) 0.15% APY, so 20% APY was mind-melting and I had to get in. To on-board onto Terra from my bank account I had to bridge through Ethereum using wrapped UST which was very expensive.

Now with IBC enabled I can move funds into and out of Terra very easily using the Cosmos Hub and Osmosis.

Obtaining ATOM

You can buy ATOM on your favorite centralized exchange. ATOM is the native token of the Cosmos Hub and has wide availability across exchanges.

I use Coinbase because here in the US funds clear quickly relative to a wire transfer. You can even trade with that money while your funds clear which is cool. Normally it takes 4 business days for the transfer to clear, at which point you can continue with the next step.

Transferring ATOM to Keplr

You should set up a Keplr wallet to accept the ATOM you just bought. Remember to write down your seed phrase and keep it somewhere safe, because this seed phrase allows you to access your funds if you uninstall the wallet or lose your hard-drive or whatever. I prefer to use a scheme to split my seed phrase into 3 pieces such that I only need two of the three pieces of paper to access the seed, and it removes the single-point-of-failure that comes with only having one sheet with all the words on it.

This wallet gives you a Cosmos hub address beginning with cosmos... to which you can send the ATOM you bought on the centralized exchange. Withdraw the ATOM from your exchange account to your Keplr wallet cosmos... address.

With the ATOM in your Keplr wallet, navigate to the Omosis DEX and connect your Keplr wallet. Click "Assets" then "Deposit" next to ATOM in the Osmosis UI.

Click "MAX" to transfer all the ATOM from your wallet on Cosmos Hub to your wallet on Osmosis. Don't worry — you don't need to set up a separate Osmosis wallet! Keplr uses the same seed phrase for all chains it supports so you automatically have an address starting with osmosis... and do not need to fill it in manually if you use the Osmosis UI.

Swapping ATOM for UST on Osmosis

Once you've signed this transaction in the Keplr prompt that pops up you should see the ATOM show up in the "Osmosis" section of Keplr — congratulations! You just performed your first IBC transfer by moving ATOM from the Cosmos Hub chain to the Osmosis chain. From here you can use the Osmosis DEX to trade ATOM to UST. If Terra is still in "experimental" mode on Osmosis you may need to add it by clicking the banner above the swap dialog.

NOTE that you'll want to exchange a small amount of ATOM for LUNA to cover the transaction fee to move from the Keplr Terra wallet to your own Terra wallet, normally only 12 cents worth of LUNA or so.

Now you've traded ATOM for UST. The last step is to withdraw UST from Osmosis to a Terra wallet. Keplr handles Terra wallets, so using the Osmosis UI again by clicking on "Assets" and then "Withdraw" under UST should work like a charm. If you traded for a bit of LUNA as well then transfer that now too using Osmosis' UI.

Moving UST to your Terra Wallet

For interacting with the Terra ecosystem you'll want to set up the Terra Station extension. Write down this seed phrase in a similar fashion to how you recorded your Keplr seed phrase. The difference between Keplr and Terra Station is that Station is Terra-specific. You cannot use Keplr to interact with dApps on Terra.

Copy the Terra address you have on Terra Station and use Keplr to send UST from your Keplr Terra wallet to your Terra wallet on Terra Station.

Finally you've got UST on Terra Station! From here the possibilities are endless. I recommend trying out Anchor for an easy 20% APY on the UST you moved over under the "Earn" tab. Anchor even gives a nice summary of how much you can expect to earn at that APY. Obviously there is much, much more to do on Terra though!

I hope to write a bit here about my favorite protocols in the future so you can discover the same things that have fascinated me since I've been a part of the ecosystem.