Sidechains- Crypto Academy / S4W8 - Homework Post for [pelon53]

in SteemitCryptoAcademy3 years ago (edited)

Hope you are all enjoying crypto coirses. Today i am back with homework task for professor @pelon53 which is about Sidechains.


Explain in detail the Sidechains with the use of ZK-Rollups.


Blockchain technology forms backbone of decentralised finance. Bitcoin unleashed the magic of cryptcurrencies to the world. With the obsession of DeFi touching new heights, blockchain technology deepened its roots. New blockchains and crypto coins found their way into crypto space. Each new blockchain enters into the crypto world with some innovative features like energy' efficiency, enhanced scalability etc. But than parent blockchains begin to find ways to fulfill the weaknesses for which new blockchains were making way in. One such innovation is that of sidechains.

Sidechains are blockchains of some parent blockchains like Bitcoin, Ethereum that act as parallel networks for performing transactions and thereby reducing congestion and increasing transaction speed. So we can say, sidechains foster Interoperability between blockchains and that too with increased transaction throughput. With this basic introduction of sidechains, let me mention some versatile features of sidechains ;

  • Each sidechain is a full fledged blockchain in itself. Each node of sidechain is capable of validating and verifying transactions as per protocol.

  • Each node is individually secured. The security of sidechains is not dependent on parent blockchain. In case of any security breech of either parent chain or sidechain, the other one is completely secure.

  • Sidechains usually follow alternative consensus mechanism which is Byzantine Fault tolerant and thereby ensure security and enhanced scalability.

  • Sidechains have find their way in innovations like NFTs, DAo voting etc in addition to their use case in micro transactions and stable transactions. In addition, users get a chance to explore new blockchain without any direct influence of the parent chain.

  • Two way pegged system that is what side chains is know for give users access to some well established blockchains like BTC, ETH and therefore share benefits of these blockchains like increased liquidity etc.


ZK-Rollups


The name ZK-Rollups stands for zero knowledge Rollups . Rollup means to gather together. ZK-Rollups are Ethereum blockchain side chains that group together many layer 2 transactions and transfer at once to enhance scalability and lower transaction fee. If we look at earlier functioning side chains like plasma, the mechanism was to transfer in plasma is one transaction at once separately. The deconstruction of transaction is carried out by smart contracts.

We have 2 parties involved in ZK - Rollups, transactors and Relayers. Transactors are those that perform the transaction and Relayers are those that pile up the data. Relayars need to stake their bonds in smart contracts to qualify and it is also an attempt to prevent any malicious attack on blockchain. The basic structure and information contained in a block remains same as that of BTC or ETH. However, worth mentioning points of difference are ;

  • Transaction address is shortened to 3 byte Indexed version to enhance storage and enhance transaction throughput .

  • Two separate Merkel trees are created - one for transaction address and other for transfer amount.

ZK-Rollups is a seemingly fascinating concept but there are certain concerns like quantum computing threat and an unverifiable trust is presumed by security mechanism.


Explain the Liquid Network side chain


IMG_20211030_200942.jpg
source

Liquid Network is sidechain that was launched in 2018 by blockstream on Bitcoin codebase . We know that, although BTC is a parent coin of cryptosphere but it has met a tough competition from networks that were able to provide better scalability and also offer some new features that time demanded. Bitcoin launched liquid network sidechain to provide better transaction speed, low transaction cost and confidential transactions. When we compare BTC blockchain with liquid network, we could clearly make it out that liquid network has better transaction speed and has low transaction cost then the Bitcoin blockchain . Moreover the transactions on the Bitcoin blockchain are not confidential transactions whereas the transactions seen on liquid network are confidential. However, it is available only for brokers, exchanges, financial institutions etc. It is not available for P2P transactions.

LBTC is the native token of liquid Network and to getl LBTC users need to stake BTC on the liquid network and the pegging ratio is 1; 1 and this phenomenon is known as "pegging in" whereas to get the BTC back from the LBTC, same peg ratio is maintained and that is known as "pegging out". Pegging out process is carried out only after burning of LBTC is carried out so as to maintain supply demand dynamics and prevent inflationary devaluation of BTC. The network is so much concerned about the security that the transaction fee on the network is used as protection against denial of service attack.

As for the feature of confidential transactions are concerned, Liquid network transaction are accessible to everyone like Bitcoin network but the sensitive information like amount of BTC is accessible only to those two parties that are directly involved in transaction process. This prevents any unnecessary interference from third party that are not part of transaction.

A brief mention of creation of a new liquid tokens on liquid network is mandatory to give a final touch to this task . It is an amazing feature that enables creation of new liquid tokens like gold , securities and collectible like NFTs. All these tokens can then be traded on liquid network with graeat ease and share all the benefits of the network.


Describe the steps to connect the Metamask wallet and the Polygon network wallet. Show screenshots.


I'll be explaining step by step approach with clarity. Let's begin .

  • Log in to Metamask wallet app.

  • Click on top left corner, a drop down menu will appear. Click on Browser. Default phone browser will open.

  • Search for https://wallet.polygon.technology/ in the web browser.

  • Main page of polygon website will launch.

  • Click on polygon wallet. A notification will pop up asking for connecting to polygon site. Click on connect.

  • Next, notification pops up asking for signing the transaction.

  • Click on sign and you will be connected to polygon wallet.

  • From top right corner, you can check your wallet address.

IMG_20211030_115319.jpg


IMG_20211030_115351.jpg


IMG_20211030_115506.jpg


IMG_20211030_115634.jpg


IMG_20211030_115724.jpg


IMG_20211030_115750.jpg


IMG_20211030_115821.jpg


According to the polygonscan block explorer, when will the block 25,000,000 be generated? Show screenshot. Explore the 12,000,000 block, at that time what was the price of the Matic? Show screenshots.


To look for any block details we need to go to the actual site of a block Explorer. For exploring the polygon block details will be exploring
https://polygonscan.com/

On the main page of the website, we can search for target block number in the search box provided.

As I entered block number 25 000 000 , I saw that block is yet to be mined and will be mined in 107 days 15 hours 15 mins 50 seconds as shown below

IMG_20211030_135741.jpg
source


IMG_20211030_135813.jpg
source


Next we will enter block number 12 000 000 in sea4ch box and search for it. We found following details

Block Height:
12000000

Timestamp:
229 days 22 hrs ago (Mar-14-2021 09:35:48 AM +UTC)

Transactions:
14 transactions and 0 contract internal transaction in this block

Validated by:
0x7fcd58c2d53d980b247f1612fdba93e9a76193e6 in 6 secs

Block Reward:
0.00877199352 MATIC

Difficulty:
15

Total Difficulty:
99,921,518

Size:
5,826 bytes

Gas Used:
3,022,128 (15.11%)

Gas Limit:
20,000,000

MATIC Price:
$0.38 / MATIC

IMG_20211030_200211.jpg
source


IMG_20211030_141253.jpg
source


Conclusion


Sidechains are just like off shoots of main blockchains or parallel networks that have independent existence. They are complete blockchains in the context of having their own consensus mechanism that govern their verification and validation process, storage and security protocols. The main purpose of sidechains is to reduce the congestion by transferring data across parallel channels and therefore increase transaction throughput.