Sidechains - Crypto Academy / S4W8 - Homework post for pelon53.

pelon53 week 8.png

Hello friends and welcome to my assignment task by professor @pelon53, In this assignment, I will provide a detailed review of Sidechains and Polygon Chain. I hope you enjoy the class.

Untitled-902.gif

Question one

Explain in detail the Sidechains with the use of zk-Rollups?
For me to begin answering this question, I'd need to explain what Sidechains are, and what roll-ups are?

Sidechains

To start with, Block stream coined the terminology "side chain." This is an interoperability solution that makes use of lightweight evidence to permit blockchain networks to monitor each other’s progress. The first goal of this concept was to entirely lock Bitcoin on the Bitcoin blockchain before letting it out in another network (or vice versa) without necessarily relying on a third party.

However, since a few years back, the term "side chain" has become more popular. The term is most commonly used when referring to a blockchain network that is not linked to another blockchain network. As a matter of fact, this is accomplished by using what is known as a bridge contract, which allows assets to be transferred from one blockchain network to another.

Sidechains are independent blockchains that exist side by side Ethereum. The validators and operators in the system are known as miners, it has its own consensus algorithm and a bridge that aids it in sending and reception of messages (assets) from the main chain. Users of the platform deposit through the act of locking their assets in a mainnet smart contract. So for a user to withdraw, you will need to exit the Sidechains, and proof of exit will be provided. ZK-Rollups utilizes validity proofs which makes use of SNARKS or STARKS with several arithmetics to show that transactions in the rollup is legit. As a user when you employ validity proofs you get immediate assurance that each transaction is legitimate and immutable once validated by the on-chain approves it. ZK-Rollups can reach amazing speeds of about thousands of transactions per second and are extremely scalable.

Furthermore, for the side chain, there are three main types of bridging contracts that can be used:

  • The first one is called Type of single tissue.

Here, Funds in bridge contracts are held together by a single group.

  • The second one is Organizational diversity.

Here also, the frozen money has been put into the care of a set number of independent participants. To carry out the activity, just the K of the N participants must agree.

  • The last one is the economy of passwords.

The weight of the available asset influences the participation qualification and the final destination of the funds that are locked in the dynamic participant portfolio.

Let me cite an example ;

Because Bitgo hosts BTC, wrapped BTC (wbtc) is a single organization bridge. So because a group of pre-designated participants does have the power to transfer assets from one chain to another chain, a multi-organization bridge is exploited to implement the liquid network and RSK blockchain (multi-signature indicates license). Furthermore, Polygon is a cryptographic economic bridge. Why?

This is because it requires more than half (2/3) equity to point out the verifier, who then submits a network status checkpoint to the bridge contract on a regular basis.

Importantly, side-chain bridge contracts most critically do not verify the integrity of other networks. As a result of that, it necessitates the accountability of a group of participants. Similarly, because of the economic incentives that are available, it is assumed that at least a portion of players will remain honest and protect consumers' assets. Who doesn't love incentives?

Some examples of public Sidechains include POA Network, SKALE, Matic etc

Sidechains handle security and consensus independently. This enables more innovation and optimization, as well as increased transaction throughput and less expensive transaction costs for users. Sidechains employ a number of validator selection mechanisms to help achieve these goals while ensuring security. Because collision-based attacks are more likely to happen with smaller validator sets, extremely appealing incentives must be in place to encourage honest validation while discouraging malevolent conduct. For example:

  • Proof-of-Stake

A set of validators are chosen based on the quantity of staking they are willing to commit to the protocol. Furthermore, Validators are more likely to be chosen from nodes with a higher stake. Users of the network can put additional staking amounts to a node using delegated PoS, increasing the possibility of that node becoming a validator.
For example, the xDai chain has a higher possibility of being selected to a dynamic validator set if nodes present a bigger quantity of STAKE (the xDai governance token, which is staked by validator candidates and delegators) to the protocol. As I mentioned earlier Staking incentives encourage honest affirmation once you've been chosen.

The ability to move assets and data between chains is crucial in the sidechain context. Sidechains are used by applications for quick and cheap transactions; however, the results of these transactions should be easily moved or transferable across different chains.

A two-way peg is a terminology used to depict this type of peg. Resources are often locked on one chain and created on another since chains are independent of one another. They are burned and unlocked when they are returned.

Rollups

This is the next concept I am going to highlight. The term "rollup" comes from the concept of Zkrollup proposed by Barry WhiteHat and is born out of plasma research.

Furthermore, rollup system can be described as an independent blockchain network however, the assets traded in this system are left on the Ethereum blockchain and are guarded by the bridge contract. The contract of the bridge must constantly confirm that the rollup network is not spoilt and the funds are not at risk. Even if we assume the worst case, the bridge contract needs to ignore the network's request and allow the user to get back the money.

The rollup system can solve certain problems:**

  • Data accessibility
    The bridgeit contract ensures that all the available data is made accessible to the general public. So you can calculate the rollups status independently

  • State transition consistency

The state transitions must be confirmed as legit by the bridge contract

  • There is opposition to censorship

Opposition to censorship means that if the network is captured or cannot be promoted, the users can withdraw their funds, thanks to the ability of the bridge contract to conduct transactions independently.

ZK-Rollups are one of the layer 2 architecture methods being researched to boost scalability by combining mass transfer processing into a single transaction. ZK-Rollups combine hundreds of transfers into a single transaction, whereas Plasma makes one transaction for each transfer. All of the transfers held in a single transaction will be deconstructed and verified by the smart contract.

"Zero-knowledge proof" approach is PUBLICLY used to record the validity of the block on the Ethereum blockchain. By minimizing the amount of data retained in a transaction, ZK Rollups saves computing resources for validating the block; thus, no knowledge of the whole contents is required.

There are two kinds of users in the ZK-Rollup scheme:

  • Transactors
  • Relayers.

Transactors make their transfer and then broadcast it to the rest of the network. The transfer data. Is made up of info such as an indexed "to" and "from" address, a value to transact, the network charge, and so on, and a nonce make up Processing resources which are saved through the use of 3 bytes indexed version of the addresses.

Hence when the transaction value is higher than or less than zero a deposit or withdrawal is created. Furthermore, the data is stored in two Merkle Trees in the smart contract:
Addresses in one and transfer amounts in the other.

Relayers accumulate a significant number of transfers to form a rollup. In addition, the relayers are in charge of generating the SNARK proof. This proof is a hash that shows the difference between the current state of the blockchain and the former state.

The terminology "state" simply refers to a person's "state of being."
So the SNARK proof compares a snap of the blockchain before the transfers happened to a snap of the blockchain after the transfers are completed (i.e. wallet values) and only sends the changes to the mainnet enshrined in a verifiable hash.

User Interaction of the platform

One of the important things is that the ZK-Rollup technique reduces transaction fees for users of a dapp that uses it.
Thus, creating zero-knowledge proofs which demand a significant amount of processing power and as result, a "commit-verify" methodology is proposed for implementation. Because the SNARK proof will be stalled by a number of blocks, the latency to block confirmation will go up dramatically.

Advantages of the platform

  • Fee users pay per transfer are reduced.

  • It is quite faster than Plasma and Optimistic Rollup

  • The computations of blocks are done in a parallel computing manner and that promotes decentralization.

Disadvantages of the platform

  • ZK-Rollups' initial setup encourages a centralized system and as such, the security approach is based on a low level of trust.

  • Because of Quantum computing, the blockchain is at risk of being hacked.

Untitled-902.gif

Question two

Explain the Liquid Network Sidechains?

This is an inter-exchange platform that helps connect institutions that exchange cryptocurrencies globally. Furthermore, it makes Bitcoin’s transactions and digital issuance faster. It provides a number of vital features for users who trade and exchange cryptocurrencies especially bitcoin;

  • It provides fast and final settlements

In under few minutes, BTC on the liquid Sidechain which is also known as liquid Bitcoin can reach final settlement

  • It provides confidential transactions

The financial information such as the types of assets transferred and amount transferred are kept confidential

  • Tokenization of the assets

So on the liquid Sidechains, there is issuance of new tokens to represent other digital assets such as securities and even money

  • There is a provision for interoperability

The Liquid BTC and other issued assets are supported by a liquid integration, singularly. All the available tokens secure the opportunity of the presence of features such as atomic swap which are similar to those found in BTC.

Furthermore, liquid is a Sidechains network that permits users send BTC back and forth easily and faster. In addition, the liquid’s network of BTC as I mentioned earlier is termed L-BTC. Each liquid BTC has a verifiable quantity of BTC which is guarded by liquid members which are known as functionaries.

The Role of Networks

We should understand that the network is managed by its members which include major financial institutions. Meanwhile, block stream has no influence significantly on this network.
The Liquid network makes use of a consensus strategy called STRONG FEDERATIONS. Importantly, the collective set of functionaries who largely don’t trust themselves known as functionaries replace the costly requirement of proof of work.

There are functionaries on the network who serve two roles, principally;

  • Block signer
  • Watchmen

The first one, Block Signer

Every 60 seconds, the liquid network generates a new block thus, it block generation is more consistent than bitcoin’s generation. The job of the block signers is that they keep track of the height of blocks they have signed and it’s their responsibility to refuse to sign blocks that will cause more blocks to be reorganized. Due to the fact that a block’s parent is not rearranged from the longest chain as it is created, after two confirmed transactions, liquid transactions can be regarded as final. Two or more block signers must be signed by the signers in liquid’s federated approach. What happens is that, block signers in an arrangement, take turns proposing a new block every minute the remaining officials validate and sign the content. As soon as the network is running, blocks are created every 60 seconds. This network can miss few blocks due to inconsistencies in the network and it can fail when the proposer of the next block to be made is offline. Thus, there won’t be any block created during that period.

image.png

It is important to say, the blocks will not be generated when one-third or more of this number of the functionaries are offline. The liquid blocks will be frozen up until two-third or more of this number of the functionaries come back online. So immediately the necessary quorum is fulfilled, the block generation continues.

  • The Watchmen

Just as the term implies, a watchman is mandated to keep watch and monitor the liquid federation.

  • The Participants

The network is made up of functionary members that are specified at the time of launch. So if you are a member and you do not have functionary hardware, you can join participate in the network by joining pseudo-functionary nodes, which helps create connections between functionaries. Members of the network can carry out peg-ins, peg-outs operations; they can also send liquid transactions and help validate the liquid chain.

The Liquid network has a number of uses:

  • Anonymous or confidential transactions

Third parties are shrouded from accessing information about transactions on the network. So only the parties that are involved in transactions and those who are selected will have access to transactional information. Thus, anonymous addresses with PUBLIC BINDING KEY are used in liquid transactions, meaning that only participants of the operations t can decrypt the info.

  • Issuance of assets
    This feature in the network permits users to transfer generated assets ranging from digital collectibles, tokenized fiat, and much more. Each time there is a successful transfer of assets there exists a unique ID (64 Hexadecimal characters) that is securely stored on the network.

  • Securities
    There is room for users to create tradable assets known as securities. This is because of the issuance of asset features on the liquid network sidechain. Security tokens could be made using a combo of on-chain smart contracts and off-chain mechanisms. The scalability, security, dependability feature of the network makes sure that security token users get massive benefits.

Untitled-902.gif

Question Three

Describe the steps to connect the metamask wallet and the polygon network wallet?

  • The steps that involve connecting metamask wallet and the polygon network wallet are quite direct. The firsts step is to visit the metamask site https://metamask.io
    The landing page will display quite a number of things on the top of the screen you will see the Features, support, about icons, and so on. Scroll to the bottom of the page and click on download for chrome.

image.png

Source

  • The next step will be to download the wallet i.e add it to your chrome extensions as shown in the screenshot below:

image.png

  • After downloading it successfully, it will show the option to remove it from the extension if you choose, as shown in the screenshot below

image.png

Source

  • Now that we have added the metamask wallet to our chrome extension, understand that if you already have a registered metamask wallet, all you will need to do is to import it else you will have to register and keep your recovery phrase safe. The next step will be to visit the Polygon site and you will see three options on the landing page. Since we are required to connect to metamask, we will click on it.

image.png

Source

*The next step after clicking on connect on metamask is to get started on metamask by clicking on GET STARTED

image.png

Source

  • The next step after clicking on get started is that you will be taken to a new page where you will be required to import your wallet if you already have one or create one.

image.png

Source

  • The next step is that you will be taken to a new page where a couple of information will be displayed and you will be required to accept the terms or not. Click on I AGREE to proceed

image.png

Source

  • Since we are creating a new metamask wallet account, we will be required to input the password to our wallet, read and accept the terms and create wallet.

image.png

Source

  • The next page will display a video to you which you will be required to watch to learn about your recovery phrase, after watching it, click on next

image.png

Source

  • We have successfully created our wallet, what will be required of us is to link it with our polygon network wallet

image.png

Source

  • After clicking on next, you will be taken to a new page where you will be required to verify and finally click on connect wallet as shown in the screenshot below

image.png

Source

  • After clicking on connect wallet, close the page and go back to the home page of the polygon network which is polygon and click on CONNECT TO METAMASK.

  • A pop-up message will appear by the right-hand side of the screen requiring that you sign the transaction

image.png

Source

  • After signing the transaction, you would have completed the whole process and the metamask wallet and polygon wallet will be connected.

image.png

  • The wallets are now connected

image.png

Source

Untitled-902.gif

Question Four

According to the polygon scan 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 screenshot?

As shown in the screenshot below, 1 block is generated in 2 seconds in the polygon network. At the time of writing this assignment, there was a total of 407,717,024 transactions with 5,925,591 wallet addresses

image.png

source

At the time of writing this assignment, I observed that 20,597,150 blocks were already created. They were created at the rate of 1 block per 2 seconds as confirmed by polygonscan.

image.png

source

So to get how long it would take for 25,000,000 blocks to be created means that we will have to calculate the number of remaining blocks it will take to complete the required 25,000, 000.

25,000,000 - 20, 597, 150 blocks = 4,402,850 blocks

So 4,402,850 blocks new blocks are required to get 25,000,000 since 20,597,150 blocks were already created at the time of writing this assignment

Thus at the rate of 1 block per 2 seconds

Blocks Time
4,402,850 = x time
1 block = 2 seconds

By simply cross multiplying it
1x = 4,402,850 blocks x 2 seconds
1x = 8,805,700 seconds
Divide through by X to get the time component
X = 8,805,700 seconds

image.png

And 8805700 seconds is equivalent to 2446 hours

image.png
Finally, 2446 hours is equivalent to 101 days. So it is logical to say that on average, it will take 3 months for the 25,000,000 blocks to be created which is equivalent to January 25th -28th 2022.

The question demands that I explore the 12,000,000 blocks on the polygon block explorer. The first step is to visit the site polygonscan

You can easily obtain information on the 12,000,000 blocks by simply typing it in the search bar. We can observe certain information on this block like its height which is 12000000. It was time stamped 225 days ago which was on the March 14th, 2020. Its size was 5826 bytes. The price most importantly was $0.38/ MATIC as shown in the screenshot below

image.png

Source

image.png

Source

Untitled-902.gif

Conclusion

The speed with which the blocks are created in the polygon network is amazing with the quality PoW, it is easier for users to source information about previously successfully created blocks. Furthermore, liquid Sidechains have numerous advantages to the blockchain world with their speed and scalability being the chief. One thing users desire is the ability to perform successful transactions at fast rates. There is not much to say other than; the decision of the network to give incentives will help a lot of users to stay true and honest.

Untitled-902.gif

All images used in this post unless otherwise stated were extracted from Ploygonscan, polygon website, and metamask.

Special thanks to Professor @pelon53

Untitled-902.gif

Sort:  

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 21 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 4 SBD worth and should receive 27 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

Loading...

Coin Marketplace

STEEM 0.20
TRX 0.15
JST 0.030
BTC 65317.17
ETH 2646.03
USDT 1.00
SBD 2.86