Forum Posts

Nabia Sabzwari
Dec 22, 2021
In Cosmos Ecosystem & IBC
Source: app.osmosis.zone Now that we have looked into the underlying mechanism of how Cosmos Ecosystem works and what it does rely on. We'll move into a sub-system of Cosmos which is Osmosis. Osmosis works on built key concepts of Cosmos. Osmosis extends its functionalities and so it's name from Cosmos-is. Anyways ,Osmosis also heavily believes in preserving it's sovereignty and heterogeneity and you'll see them echoed in ever feature. Osmosis is an automated market maker (AMM) built with the Cosmos SDK; it specializes in the InterchainDeFi movement (Tendermint-based blockchains) in the Cosmos ecosystem. In other words, Osmosis is a decentralized exchange specifically built for Cosmos, seeking to extend to more blockchains. Osmosis Lab is founded by Sunny Aggarwal and Josh Lee. Osmosis Lab is where all the Osmosis takes place. Osmosis Lab is a Defi Dapp providing multiple functionalities to the user. Let's delve into their website "https://app.osmosis.zone/" and it's features to fully understand the Osmosis. How to use Osmosis? There are 3 categories of fees on Osmosis. Anyone who transacts on the chain will pay the fees. The fees are subjected to change and depends on computational storage and costs. The fees are distributed among OSMO stakers and validators operators. Anyone who swaps fees on DEX will pay swap fees which are determined by each liquidity pool’s parameters and trade size. Liquidity providers are obliged to pay exit fees when they pull their liquidity out of pool. The LP shares are then burned, and the value is distributed to the remaining liquidity providers. Osmosis Key Features: Connect Wallet: 1. Setting up and funding Keplr account: To use this functionality of the dapp you will have to connect supported Cosmos Ecosystem web3 wallet which is Keplr,a google chrome extension. Unfortunately, there is no Keplr extension for Firefox at this time. The same way we fund ether to Ropsten test network in Meta mask we will also need to fund our wallet with some $ATOM. 2. Creating a Keplr account: Those who are familiar with meta mask know how things will work out when creating a wallet. You will be given 12 or 24 word mnemonic seed phrase. Choose an account name and set a strong password. The seed phrase is the key to accessing your assets within the wallet, and is what you’ll need to restore access to your wallet should you lose it for any reason, for example, if you lost your password or computer. The security should be your top concern especially in crypto wallets.If you have a Ledger hardware wallet you can connect it and use Keplr for interacting with dApps. This keeps the seed phrase hidden within a secure element on the device and requires you to physically approve each transaction by pressing a button. You can find a Medium article explaining how to do it here. 3.Deposit $ATOM to your Keplr wallet: So now our wallet is setup it is ready to receive some $ATOM. Using Binance or Kraken we can easily buy some $ATOM and withdraw using Keplr. Make sure Cosmos is selected from the drop-down menu at the top of Keplr. Under the account name you chose earlier, click to copy your wallet address beginning with cosmic... When withdrawing from your preferred CEX, paste this address into the Recipient form. The $ATOM should appear in your Keplr wallet within a few minutes. Go to Assets: 4. Transfer funds to your Osmosis Chain Wallet via the Osmosis Dapp Navigate down to Cosmos Hub — ATOM and click on Deposit. Enter the desired amount of $ATOM, click Deposit, and approve the transaction in Keplr. The $ATOM will be transferred to your Osmosis Keplr wallet as a result of this action. I'd suggest keeping a little sum of $ATOM in your Cosmos wallet for future gas purchases. Go to Trade: 5. Swap some $ATOM for $OSMO You can use the swap function to receive some $OSMO tokens now that you have some $ATOM in your Osmosis wallet. Because this is an Osmosis chain, you'll need $OSMO to pay for gas each time a transaction is completed. However, if you don't have any $OSMO to pay for petrol, you can set Fee to Low and the exchange will be completed for free. On the left, click Trade. Select From ATOM, To OSMO (if they're in the wrong order, just click the up and down arrows in between them to rearrange their locations). If you want to provide liquidity, you'll need to have the right token-to-pool ratio. You can supply liquidity to any of the various pools, but for the purposes of this lesson, we'll use the ATOM/OSMO pool, which has been incentivized. Enter half of your ATOM tokens, which will be replaced with an equal number of OSMO tokens, and then click Swap. Wait for the transaction to finish before confirming it. Your Osmosis wallet will now include some OSMO tokens. Returning to Keplr, you should be able to see how much OSMO you have if you pick Osmosis from the drop down menu that previously showed Cosmos. Go to Pools, and select Pool#1 ATOM/OSMO. 6. Pool and bond tokens to start receiving rewards and Pool $ATOM and $OSMO Now that you have an equal amount of both $ATOM and $OSMO, you can combine them into the 50/50 ATOM/OSMO pool to earn trading fees and LP rewards. Click Add Liquidity after entering the amount of $ATOM you have, which will populate an equal amount of $OSMO. I wouldn't propose pooling all of your $OSMO because you'll need some cash to pay for petrol. While you can make swaps for free by setting the gas fee to a low value, I've found that doing so when increasing or reducing liquidity can lead to failure. You should now see the value of your LP tokens under My Liquidity once the transaction is complete. — You can obtain incentives by bonding your LP tokens. You must bond your LP tokens for a set length of time before you can start collecting LP rewards. Bonding means that if you want to withdraw your pooled tokens, you must first make a withdrawal and then wait the length of time you bonded for your tokens to unlock. During this time, you'll continue to collect LP rewards. On the right side of the Pool#1 page, click Start Earning. Select the length of time you want to bind your LP tokens. The longer you bond, the greater your APR (annual percentage rate). These benefits are provided once a day in $OSMO and are currently extremely generous. To enter all of your LP tokens, click Max, then Bond, authorise the transaction, and wait for it to finish. On the pool page, the value you've locked should now appear under Bonded. Osmosis requires liquidity providers to bind their tokens and distributes rewards in epochs rather than in a linear fashion (the timer for which is clearly visible). Farmers selling their tokens as they earn them would normally put steady downward pressure on the price of $OSMO, therefore this incentivizes longer-term investing. It also prevents price drops from cascading because panic sellers must wait until their tokens are unbonded, giving the market time to recover. Unlike most DEXs, which require manual claiming, your liquidity incentives are paid straight into your Keplr wallet. To compound your gains, go back to Osmosis once a day and sell half of your earned $OSMO to the asset you want to pool it with, then repeat steps 4 and 5 to add this to your bonded liquidity. This will result in a large rise in the amount of interest you earn over a period of time. Summing Osmosis.zone. Osmosis is a brand-new AMM and DEX with a lot of promise. It's the first time that anybody has heard of such in the Cosmos ecosystem that allows for such smooth cross-chain trading. The first reward period has yet to end, but close to $30 million TVL has already been pooled, demonstrating the high demand for DeFi applications among holders of Cosmos-based blockchain assets. As additional liquidity enters each pool and the incentives are spread among a larger number of participants, the interest that can be earned as an LP (as high as 5,400 percent APY) will decrease in the following days and weeks. It pays to be early in many things, especially in crypto. Osmosis is stepping up the game and it would not be wrong to say that it has already become a game changer in the field of crypto.
Osmosis.zone -A dapp on Cosmos Ecosystem content media
0
0
17
Nabia Sabzwari
Dec 12, 2021
In Cosmos Ecosystem & IBC
Source: Twitter.com Introduction to the Cosmos Ecosystem. Cosmos was one of the first to step into bringing the “Internet of Blockchains” to life. Cosmos consists of multiple independent blockchains running in parallel, backed up by the Proof-of-Stake Byzantine Fault Tolerant Algorithm, such as Tendermint consensus. Cosmos SDK makes use of Tendermint, which keeps check that the system reaches consensus even if a node in the system fails or behaves maliciously. Cosmos SDK aims to provide an open-source framework for developers to create interoperable customized blockchains. Cosmos SDK is powerful enough to tackle scalability, usability, governance, and security related issues. Cosmos has made it so much easier to build on top of the Cosmos network. Moving ahead, let’s have a brief view at some Cosmos tools meant for developer’s ease. Cosmos SDK Modules: While most of the logic is defined by modules; they are also seen as the building blocks to construct the entire decentralized application. The module consists of the core which provides basic functionalities, the boilerplate implementation is communicated with the underlying consensus engine. Working in modules makes it easier to build complex blockchain applications. Tendermint: Tendermint, facilitating creation of Proof-of-Stake systems is also known as gold consensus engine. It is the most popular, mainly because of the high security it provides to the developers. Inter-Blockchain Communication (IBC): This tool lets the distributed ledgers spread across the network communicate with each other for exchange of data and value. IBC defines a set of standards to transmit data and allows compatible supported ledgers to be interconnected without any restrictions. Let’s learn how to get started with Cosmos. We’ll run through the initial steps for creating your own blockchain application on top of Cosmos SDK Network. Prerequisites: -Golang > 1.15 installed -GitHub account and GitHub CLI/GitHub Desktop For this setup we will be using Starport version 0.13.1, an easy tool to use for building blockchains. To install starport into /usr/local/bin, run the following command: curl https://get.starport.network/starport@v0.13.1 ! | bash These are the files that you must create in your system which make up the application. ./nameservice ├── Makefile ├── Makefile.ledger ├── app.go ├── cmd │ ├── nameservicecli │ │ └── main.go │ └── nameserviced │ └── main.go ├── go.mod ├── go.sum └── x └── nameservice ├── alias.go ├── client │ ├── cli │ │ ├── query.go │ │ └── tx.go │ └── rest │ ├── query.go │ ├── rest.go │ └── tx.go ├── genesis.go ├── handler.go ├── keeper │ ├── keeper.go │ └── querier.go ├── types │ ├── codec.go │ ├── errors.go │ ├── expected_keepers.go │ ├── key.go │ ├── msgs.go │ ├── querier.go │ └── types.go └── module.go A blockchain application is just a replicated deterministic state machine which consists of two main parts: state and messages. As a developer you are required to define state machine. Cosmos SDK is a modular framework. Each module contains its own messages. Before we have a close look at what state and messages are. Let’s view the modules which help create the state machine and will be needed for nameservice application. auth: This module describes accounts and fees, gives access to these functionalities to the rest of your application. bank: This module allows the application to create and manage tokens and its balances. staking: This module enables the application to have validators that people can delegate to. distribution: This module will help to distribute between validators and delegators effectively. slashing: This module disincentivizes people such as validators with value staked in the network. supply: This module will contain the total supply of the chain. nameservice: This will be created at the end and does not exist yet. It holds and manages the core logic for nameservice application you are building. Our application will mainly be built on this specific piece. It is to be pointed here that why nameservice contains so much importance. Not to forget, the main application goal here is that users will be able to buy unused names, or even sell or trade names. Coming back to two integral parts of the application, state, and messages: State: The state represents current position of your application. The state will indicate how much token balance is in each account, what are the owners, and price of each name, and to what value each name resolves to. For now, you don’t need to be concerned about what auth and bank will contain. The part you need to be concerned is of how to relate state specifically to your nameservice module. For containing data, you will be using multistore to store all key/value pairs such as mentioned earlier, name’s value, owner, and price. Messages: Messages are internal part of transactions. Hence, they trigger state transition. Each module defines a list of messages and how to handle them. Here are two types of messages you need to implement the required functionality for your nameservice application: MsgSetName: This message allows to locate name for name owners MsgBuyName: This message allows accounts to buy a name and become its owner. When someone buys a name and replaces the ownership, he is supposed to pay higher price for it than its previous owner did, close to what happens in property ownership or for real world entities. If the name does not have a previous owner yet, they must burn a MinPrice amount. Now, since you understand the foundation and layering of how the ground is set up for implementation. Its time that you get started with your own implementation as the framework is ready to receive commands from you to create your first ever application! So far, Cosmos Ecosystem has surfaced and emerged as what it claimed to be. Cosmos claimed not only to let individual blockchains communicate with each other in a decentralized way but also among their prime agendas, it prominently stood to make transactions quicker and create blockchains that can maintain sovereignty. Yet, it is proving by how quickly it is expanding with its projects. There are 260+ diverse applications and services built on Cosmos. From numerous examples some include such as Terra (LUNA), Thor Chain, Secret Network, Compound Gateway, Osmosis, Kava, Akash and of course, the Cosmos Hub. Next up, we’ll walk into a sub-system of Cosmos, Osmosis.zone, the future Aave of Cosmos Ecosystem.
Cosmos Ecosystem - Internet of Blockchains content media
0
0
24
N
Nabia Sabzwari
More actions