Cosmos ($ATOM): Beginners Guide
For those of you just getting started in crypto, take a look at this guide to cosmos. I've tried to simplify the technology without missing the point. Hope you enjoy.
It’s about that time we talk about the Cosmos network. With the battle of the Layer 1s well and truly ramping up, I’ve been noticing a lot of activity on the Cosmos blockchain. If you read my DeFi interoperability guide, then you may have seen that I briefly spoke about Cosmos on there, but it’s time we dive in deeper before the host of new projects get launched on the mainnet.
To understand Cosmos we need to go back down the history of blockchains. We have seen generation 1 blockchains (example: Bitcoin) which were basically very application specific. Generation 1 blockchains had security and sovereignty but there was no composability or interoperability. For example, on Bitcoin you could mine and transfer bitcoin and it functioned primarily as a currency/store of value, if you wanted other functions then you would have to go to a separate chain and it made everything tedious. Then, along came Ethereum, a Generation 2 blockchain which solved this interoperability issue by making a chain where it can host tons of different types of applications which basically gave birth to DeFi. This was all well and good until they encountered the issues of scalability. As more and more users and developers came to the network, it clogged network leading to extremely high gas fees and slow transaction times. Looking at this, Cosmos aims to be a generation 3 blockchain where the sovereignty and security of generation 1 is combined with the composability and interoperability of generation 2 while mitigating the scalability issues. Hence, it is dubbed “the internet of blockchains” as it aims to connect every chain and every user through their ecosystem.
But how tho?
The best way to answer this is to divide it into two parts. One aspect is the design architecture and the second aspect are the 3 pillars that support this ecosystem.
Design Architecture:
The overarching design architecture is fairly simple yet brilliant. It consists of HUBS and ZONES. A zone is your regular application-specific or use-case specific blockchain such as ethereum, Terra, Bitcoin, EOS or any other blockchain. A Hub is the chain that specializes in interconnectivity and acts as the main chain that essentially connects all the zones to each other. So if a zone is setup and connects to a hub, that zone can then interact with every other zone that Is connected to the same hub. Think of it this way, we have the internet and at all of our houses we have our own routers, but those routers can interact with each other because of the hub that is the Internet Service Providers who connect all the routers to the internet. Another way to look at it is like an airport where every city has their own little airport but there are a few airports that are the main hubs that take in majority of traffic and redirect traffic to the smaller airports. As the ecosystem grows, there will be more hubs that will be setup for specific markets and that will allow even more zones to connect to those hubs and eventually cosmos will be this beautiful, thriving system of interconnected applications.
The 3 pillars:
The 3 pillars of the cosmos ecosystem are Tendermint, IBC, and Cosmos SDK. Lets look at all of them in some detail.
Tendermint-
Tendermint provides two things. The Byzantine Fault Tolerance (BFT) consensus algorithm and the Tendermint engine. Let’s look at the Tendermint engine. Previously to build a blockchain you had to build all the layers by yourself. The layers being the consensus layer, network layer, and the application layer. The consensus layer is where the consensus algorithm is built and methods to verify, secure and trust a blockchain are established. The network layer is where the hardware element of blockchain exists, the nodes (or computers) that take part in the mining and validation of blocks are found on this layer. Lastly, the application layer is where the functionality of chain exists, this is where the transactions and settlements of value take place.
What Tendermint did with their engine is that they packaged the consensus layer and network layer into one generic engine and using that engine developers can build their protocols directly on the application layer. Hundreds of hours are saved for developers as they do not have to build every layer of the chain, it means the quality of the applications will be better as more time can be focused on building the perfect application, it will attract more developers to the ecosystem as it is easier to build, and in a way it reduces the risks because teams won’t make the different kinds of coding errors they would have if they had to build the first two layers of the chain.
The BFT consensus algorithm is also intriguing. A system with Byzantine Fault Tolerance is one that has solved the Byzantine generals’ problem. This problem is complex and this article will not go into specifics, so all you need to know is that it is a scenario wherein you have multiple participants in a distributed setting aiming to effectively communicate, but the participants don’t know whether to trust each other or if the messages have been modified. So a Byzantine Fault Tolerant system is one that allows all participants in a decentralized and distributed system to communicate in a fair manner. The tendermint BFT system uses a proof-of-stake consensus mechanism, where you have a set of validators (nodes) and one of them is randomly selected to propose the next block, if the other validators in the group agree then the block is validated and added to the chain. A cool feature with this is the Byzantine Fault accountability system, it is a security mechanism that can easily detect malicious actors in the network and directly identify them.
Cosmos SDK-
Cosmos SDK is on the application layer. It is a general framework that makes it easier to build DeFi applications on the Cosmos ecosystem. All the code is written in Go and it makes the work of the developer much easier because they do not have to build a secure chain from scratch, they can focus all their time and effort on the application. Much like how solidity on Ethereum provides a general framework for developers, Cosmos SDK does the same. This means that the scope for innovation is tremendous because the barriers to entry as a business/developer are very low (only have to learn Go) but that also means that you have to be aware of malicious actors.
The Cosmos SDK is based on the two major principles of modularity and capabilities-based security. The concept of modularity is fairly technical and complex; this article will not go into those details but for now what you need to know about modularity in Cosmos SDK is that it aims to be an ecosystem of modules. A module essentially implements the logic on to the application making its usable. So developers can just compose modules or use ready-made ones to create a specific application. Capabilities based security in simple terms operates under the rule of connectivity leads to connectivity. This means that the modules have certain limits on their security boundaries to ensure that new or malicious interactions of any kind are limited.
IBC –
Inter-Blockchain Communication (IBC) Protocol is one of the most important aspects of the cosmos ecosystem. It’s what allows the system to be so interconnected. The IBC protocol is run on the Hubs described earlier so when zones connect to the hub they are instantly connected to all other zones as well due to IBC. So we know it allows chains to connect to each other and transfer value, but let’s look at how. Say you want to transfer 100 USDT from chain A to Chain B. The first step is ‘tracking’ where chain B receives the block header (the unique identity of a particular block) of Block A and vice versa so each chain can track the validator groups of the other. The next step is ‘bonding’ where the 100 USDT is locked or frozen on Chain A. Then we have ‘proof relay’ that takes place which, as the name suggests, is just the relaying of information between the chains on which the tokens have been bonded. After this we have the final step of ‘validation’ where if the proof is verified on chain then the 100 USDT is transferred as vouchers on to chain B. I say vouchers because it isn’t the real 100 USDT it is simply a representation of it on chain B and can be used there and eventually sent back using the same process and then unlocked back into the real USDT.
This process may seem extremely long but the IBC protocol on cosmos is leveraged with the Tendermint BFT consensus algorithm which gives instant finality. In case you don’t know, Finality is basically a confirmation that when a transaction goes through on chain and is validated it will not be reversed. Essentially, fast-finality means increasing transaction speeds and processing times to nearly instant. Hence, IBC becomes 10x more effective in combination with this instant finality.
Other features:
The Cosmos networks incredible technological innovation doesn’t end there. Cosmos has a lot of additional features that are also very important so let’s dive into them.
Ethermint-
An issue noticed by the Cosmos team was that there are hundreds of existing projects on Ethereum that are already very successful. So Ethermint allows the Ethereum Virtual Machine (EVM) to be ported onto Cosmos SDK which means developers do not need to put in extra hours to rebuild their smart contract platforms on Cosmos SDK. EVM can be thought of as a large decentralized computation engine that has thousands of executable applications on it. So, Ethermint works exactly like Ethereum but it gives you the advantages of tendermint BFT consensus and the engine. This seamless porting could see a lot of Ethereum projects move to Cosmos bring in billions of dollars’ worth of liquidity to the ecosystem.
Peg-zones
To connect chains that are not Tendermint-BFT based, and that don’t have fast finality things can get tricky. This is where peg-zones come in. Chains like Bitcoin and Ethereum have slower finality due to the Proof-of-work system they use, so to connect them to cosmos we have peg-zones that use IBC but sort of hack the IBC in a way that other chains can be brought on to cosmos and leverage the advantages of the Tendermint systems. The transfer of tokens and value takes place in the same way as the IBC transfer described above.
Scalability
Cosmos uses two types of scalability. Vertical scalability is scaling the blockchain itself, this means moving away from proof-of-work to increase the transactions per second so that the network doesn’t have any bottleneck which will make it completely unusable. However, vertical scalability will always have an upper limit. The Transactions that can take place quickly will eventually hit a wall and create another bottleneck. This is where horizontal scalability comes in. The idea is to have a multi-chain architecture with many chains running in parallel but with the same group of validators, which is why the Hubs and Zones concept was made. In theory, this means that blockchains with this horizontal scalability can be infinitely scalable.
ATOM:
Okay, now we know how Cosmos is designed and how it works. So let’s move to the next step which is to look at its native token $ATOM. $ATOM is the native token of the cosmos hub, the cosmos hub is the main hub in the ecosystem but many other hubs will have their own native token. The $ATOM token is used for staking on the cosmos hub. Stakers of $ATOM will receive the license to vote on governance proposals, validate blocks, or delegate to other validators. Stakers will also receive a portion of the transaction fees of the entire cosmos ecosystem which can be paid out in many different tokens. $ATOM isn’t meant to be money which you frequently exchange, it’s meant to be used as the currency that secures and runs the main hub.
Conclusion:
In the ongoing battle of the Layer 1 platforms, Cosmos should be looked at as a legitimate competitor to be on top, it fully embraces the multi-chain world but with the added benefits of fast transactions, low fees, and high security. Cosmos, will not only attract existing protocols on other chains but also tons of new developers who will want to take advantage of the simplified building and make extremely innovative products. The possibilities are endless and things haven’t even started. Keep your eyes on this.
As always, if you enjoyed reading please consider subscribing to the substack, IT’S FREE.
Follow me on Twitter @LeftsideEmiri
Stay tuned for more articles, and thanks for reading.