Hello everyone. I welcome you all in the last week of 5th season at steemit crypto academy. Our journey in this season is going to end. I am thankful to all the professors for giving us the valuable and informative lectures. This week, professor @pelon53 has given us lecture about "Avalanche Blockchain". I am going to write the homework post for the professor.
Question. 1) Explain in detail X-Chain, C-Chain and P-chain.
The blockchain trilemma is a major concern and a very big issue for the blockchain developers. The blockchain developers cannot develop a blockchain with all its basic and main features(Decentralization, security and scalability). They have to ignore one among them. A blockchain can only have two features. The Bitcoin blockchain is first ever blockchain which was introduced in 2008 and use PoW. This blockchain was very decentralized and secure. Here the scalability was compromised as 10 minutes are required to perform a transaction on the BTC blockchain. The Ethereum blockchain is second largest blockchain which use PoS. This blockchain was introduced to solve the scalability problem in BTC blockchain. But in ETH blockchain, the decentralization feature was compromised.
So time to time, the developers put their efforts to solve the blockchain trilemma. They introduce multiple solutions some among which we have read in previous classes like Leased proof of Stake. Today, we will study the Avalanche blockchain which was introduced in 2018 to solve the blockchain trilemma issue.
The Avalanche blockchain was an effort made by the developers to solve the blockchain trilemma. This blockchain' main purpose was to enhance the scalability. This increase speed and the scalability get improved. The security is also maintained in this decentralized blockchain. This blockchain is separated into three different chains. These chains use different protocol. Those protocols collectively make this network effective and impactful. These chains are as follow
X-Chain
The X chain is also known as the Exchange Chain. This chain use the avalanche consensus protocol and allow the users to create and exchange the assets. The users can create and exchange the native token of avalanche which is AVAX, ERC-20, NFT, and other available tokens. The X-Chain allow the users to perform the transactions of the available tokens in fast speed. The speed has been improved which in result enhance the system scalability. The X-chain provide the facility to its user to pay the fee of the transaction in AVAX token which is native token of the C-Chain and the transaction fee is just 0.001 AVAX. So users can perform the transaction with high speed at low cost.
This is the dominant chain on the avalanche blockchain which use the avalanche consensus protocol to provide the facility to users to send and receive the available assets in very fast speed in suitable transaction fee. The node on the X-Chain perform the verification and validation of the transaction parallelly which enhance the speed and improve the scalability of the network.
C-Chain
The C-Chain stand for the Contract chain. This chain allow the users to create the smart contracts to develop the DApps on the Avalanche blockchain. The smart contracts which are created by the C-chain are compatible with the Ethereum blockchain so the users on the avalanche blockchain are able to access and deploy the Dapps of the ethereum blockchain. The Smart contracts are actually compatible with the EVM which stand for Ethereum Virtual Machine. Thus the users are able to access the Ethereum based decentralized application from Avalanche blockchain.
The C-Chain use the snowman consensus protocol which is extended version of the avalanche consensus protocol. The users are able to create their own NFT, Dapps and ERC-20 on the C-Chain. This chain allow the users to perform fact transactions in efficient way. Here the nodes perform the function linearly
P-Chain
The P-Chain stand for Platform chain. This chain has multiple responsibilities. This avalanche chain perform the function to coordinate the validator, creation of the new subnets and keep the track of the active subnets. The active subnets are being tracked and managed by the P-Chain.
This chain use the snowman consensus protocol and handle the problem related to staking and validation of the nodes. A subnet is require to validate a transaction. The subnets are the nodes are the group of validators. The validators validate the transaction and confirm it. The active subnets are being coordinated and tracked by P-chai.
2.- Explore the Avax Network platform. Screenshots required.
When we open the AVAX network, we have a lot of the feature. On the homepage of the AVAX, a list of the feature is available on the top of the page. Then when we scroll the page, we get some other information about the avalanche blockchain.
If we talk about the features of the AVAX network, then the fist one in the list is developer, then individual, next is Avalanche X, then press, community and at last contact.
Individual
The Individual is the first feature which give us the information about the Developers. This section is categories into two Sub sections which are as follow
- Validators
The validator section is there to provide the facility to the users to become the validator by staking the AVAX tokens.
When we scroll the page, at bottom, we get the Validator Stat which give us information about the Total AVAX staked tokens, Staking Ratio, Staking Reward, Total Validator and Total Delegation.
This page also give us the information about the APY which we get for staking. The user can earn the 11% APY for staking the AVAX on avalanche blockchain. Users can also secure their growing network, No slashing and low hardware requirements.
- Start Building
This feature allow us to become the developers. We can become developer by launching Ethereum DApps, Running a Validator, Mint a token, Integrate an Exchange.
When we click on any option, we get a new page with complete guideline how to become a developer.
At the bottom of the page, there is a developer document which give us information about the developers.
Individual
The Individual is another option which has sic basic features.
- Roadmap
The roadmap section give us information about the road map and planning of the avalanche blockchain in 2021. There are four Phases. Each phase have 4 months. The aims which the blockchain have planned to achieve in these phases are mentioned. Moreover, the achievement of each phase are also mentioned.
- Solution
This section give us information about the industry use cases of avalanche blockchain in Defi, Institute, NFT and Enterprises government. It is best platform to use for the enterprises and the government. It has the control on the defi, the smart contracts are created to develop the Dapps which are compatible with the ethereum blockchain.
- Ecosystem
The Ecosystem feature give us information about the areas in the avalanche ecosystem which the user can access. The areas of the avalanche ecosystem which the user can access through the ecosystem feature are DeFi, Digital Securities, Ecosystem, Exchange, Explorer, Gaming, Identity, Infrastructure, NFT, Nodes, Oracle, Payments, Play to Earn, Security, Stablecoin, Tooling, Trading Bot, Wallet and Wealth Management.
- Avalanche Wallet
The avalanche wallet feature allow the user to create the wallet on avalanche blockchain. The user can store their AVAX tokens and other assets on the avalanche wallet. The creation of the avalanche wallet through this feature is very simple and easy. But if you already have an account on avalanche wallet, you can access that account too from this feature.
- Avalanche Explorer
This section give us information about all the transaction which have been performed on the avalanche blockchain. You can get the information about any transaction by clicking on it. A new page will be opened with complete and detailed information about that transaction.
- Avalanche Bridge
The avalanche bridge allow us to connect the avalanche to ethereum. This will help us to transfer the ERC-20 from Ethereum blockchain to avalanche blockchain and the assets from the avalanche can be transferred from avalanche blockchain to ethereum. This feature also allow us to connect the AVAX wallet to the coinbase wallet and metamask wallet.
Avalanche X
This feature allow the developers to generate the funds for their projects. This has also two sub sections which are named as Explore Open Grants and Submit a proposal
- Explore Open Grant
This section allow us to explore multiple open grants such as VIX, Stablecoins, Open Grants like DEXs, Lending, Synthetics and Derivatives,. In order to apply for any grant, we can have complete information about it by just clicking on it.
- Submit a proposal
This section give us the information about how the developers of the projects can apply for the grant. The complete guideline in this respect is mentioned in this section. When a developer apply for fund, he need to submit a proposal which should be open sourced and should fulfill all the other requirements.
Press
The press feature give us information about the current news and updates related to avalanche network. This feature also have the two sub features which are Press Inquiries and Press Kit & Media Assets.
- Press Inquiries
If the user have any concern or query about the avalanche, they can clear it by sending email to Avalabs.
- Press Kit & Media Assets
Here the articles which are written about the avalanche are available to read for all the users easily and quickly.
Communities
Users through different social media platforms like youtube, twitter, reddit, discord, telegrams, etc can communicate with each other from all across the world to discuss the avalanche project
Contact
The Contact Feature allow us to contact with the developer. We can ask any question about the avalanche to the team. There is a page where we need to enter our name, email and query. Then press the send button and your query will be reached to the Avalabs.
3.- Show the last verified contract in the C-Chain network and show the Smart Contract that was generated at that address. Screenshots required.
First of all, go to the SnowTrace . A new page will be appeared. There will be a manu bar on the top of the page. CLick on the arrow which is shown with the Blockchain button from the bar options.
Then Click on the Verified Contract option from the drop down list.
Then a list of the verified contract will be appeared. There will be the last 500 contracts in this list.
I clicked on the latest one and all detail about this platform was display to me on screen.
Contract info | Details |
---|---|
Contract Creator | 0x9307D1aDcA453e46685DA6C4838B3316C00eA6DC |
Contract Name | Staking Contract |
Contract Source Code | Solidity |
Compiler Version |
v0.8.7+commit.e28d00a7 |
Question 4.- Explore the last block generated in the C-Chain network. Screenshots required
First of all, go to the SnowTrace . A new page will be appeared. There will be a manu bar on the top of the page. CLick on the arrow which is shopwn with the Blockchain button from the bar options.
Then Click on the View Block option from the drop down list.
Then a list of the View Block will be appeared. There will be the last 500 Block in this list.
I clicked on the latest one and all detail about this platform was display to me on screen.
Block | Details |
---|---|
Block No. | #9241221 |
Block Height | 9241221 |
Timestamp | 9 secs ago (Jan-07-2022 05:41:51 AM +UTC) |
Transactions | 23 transactions and 0 contract internal transactions in this block |
Burned Fees |
0.062177880137341782 AVAX
|
Difficulty | 1 |
Total Difficulty | 9,24221 |
Size | 5,7,69bytes |
Gas Used | 1,544,846 (19.31%) |
Gas Limit | 8,000,000 |
Base Fee Per Gas | 0.000000025 AVAX (25 nAVAX) |
Hash |
0xd00d9da612d63b24bfb3d99321b8f60256206cb56d9012d87e754fac8077d2bc
|
Parent Hash |
0x384f4fc292798b51ecd6e3f819ed41fc8ae9d490c2aff8a686a5c53354d0999d
|
Sha3Uncles | 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347
|
Nonce | 0x0000000000000000 |
5.- Explain in detail the Avalanche consensus protocol and the Snowman consensus protocol.
The avalanche blockchain is separated into the three different chains which is discussed above. he protocol which are being used in the avalanche blockchain are the snowman consensus protocol and the avalanche consensus protocol. Both these protocol make the blockchain secure, scalable and decentralized. Thus both contribute to solve the blockchain trilemma problem.
Avalanched Consensus Protocol
The Avalanche consensus protocol is use in the X-Chain and help the user to create and exchange the available assets. The users can exchange and create the AVAX and other available tokens. This is the native protocol of the avalanche blockchain which help the people to create and exchange the native token of the AVAX network and other compatible tokens like ERC-20.
It make the system highly secure and scalable. The validators verify the transactions through the hearing process. When a transaction is done by a node on the network, the validator hear it and vote it to reject or confirm it. This protocol is very efficient and validate the transactions in quite effective manner. The nodes work in the avalanche consensus protocol in parallel way.
This is because of the DAP technology which is abbreviation of Directed Acyclic Graph. This enable all the nodes to process the transactions at the same time. There is no need of the leader. The nodes have equal status. They have equal chance the validate the transaction which enhance the scalability of the network.
Snowman Consensus Protocol
The Snowman Consensus protocol is the extended version of the avalanche consensus protocol. It is based on the avalanche consensus protocol and use in the C-chain and P-chain.
This protocol help the users to create the smart contracts which are compatible with the ethereum. Thus the users are enable to access the Dapps which are created on the Ethereum blockchain. here the nodes work in linear way. In the P-chain, this protocol is use for creation of the new subnets and keep the track of the active subnets. This is use for creating the blocks. The transactions are shown in linear order.
Conclusion
The blockchain trilemma is very serious issue which has now been solve because of the avalanche blockchain. This blockchain has there separated chain which collectively make sure the the system decentralized, secure and scalable for the better user experience. The Dapps, NFT, subnets and assets are able to be created on the avalanche blockchain. The user can earn by staking the AVAX. The APY is 11%. The native token of the Avalanche is AVAX which is very popular token and is traded all across the world. This is being available on multiple well known exchanges.