Sidechains - Crypto Academy / S4W8 - Homework post for pelon53

in SteemitCryptoAcademy3 years ago (edited)


image.png


Hello everyone...
I am very glad to be among the participants of this week's lecture with professor @pelon53. It has been a great exposure learning about side-chains, and I have my assignment presented below.


Introduction


High cost of transactions and the inability to process many transactions within a short timeframe has been the pitfall of most base layer blockchains. Blockchains like Bitcoin and Ethereum have made headlines for their low throughput and high gas fees, respectively.

To surmount the challenge of scalability, alternative solutions are often employed in the form of Layer 2 solutions.

Scalability structures like the Layer 2 solutions are usually built to process transactions off the main chain. While some Layers 2 solutions take the form of smart contracts built directly on the architecture of the base layer, others like Side-chains and Roll-ups operate quite differently. Let's explore these concepts as we attempt the homework task below:


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



sidechains
Image source


Note: all explanations are centered on the operations of scaling solutions for the Ethereum blockchain.

As the name implies, Side-chains are blockchains that run at parallels with the main chain. In the case of the Ethereum blockchain, these side-chains are compatible/interoperable with the Ethereum network through the Ethereum Virtual Machine.

Also, the side-chains operate an independent consensus as well as block parameters, distinct from that of the main chain. Due to the interoperability function, projects on the main chain can as well accessed or deployed on the side-chains.

Roll-ups provide scalability by bundling several transactions from side-chains into a single transaction, and generating a cryptographic proof of these numerous transactions, called "SNARK "(short for Synced Non-interactive ARgument of Knowledge) to be registered on the main chain.



rollup.png
Image source


ZK roll-ups are fast and efficient Layer 2 solutions based on Zero Knowledge proofs. The acronym ZK stands for Zero Knowledge.These roll-ups operate in a way that makes it possible for transaction data to be registered on the Ethereum blockchain without having to go through the Ethereum blockchain's validation processes.

In other words, the Ethereum network has no knowledge of the transactions that are in a rolled-up bundle, but can verify that these transactions are valid through the cryptographic proof offered by the ZK roll-up.

Using ZK roll-ups, transactions are settled off the Ethereum blockchain, and the transaction data which is contained in a cryptographic proof - the SNARK- is transferred to the main chain.

Projects that operate with ZK roll-ups in the Ethereum ecosystem include Loopring, Diversifi, and ZKsync. Let's use one of these projects to illustrate how ZK roll-up work on the Ethereum network.


Loopring (LRC)



loopring.png
Image source


Loopring is a Layer-2 protocol that runs on Ethereum. It aims to increase transaction throughput, as well as the cost of settlement for users of its crypto asset exchanges.

To use the exchanges on Loopring, users' get to connect their wallets to loopring, and have their funds sent to a centralized smart contract on the loopring platform. Then, necessary computations and settlements are moved off the ethereum main chain by Loopring exchanges.

Trades are then taken in batches and matched on the Loopring platform, before final settlement is done on the Ethereum network through a Zero Knowledge proof called a Roll-up.

These ZK roll-ups typically contain the transaction data from numerous off-chain transactions in the form of Merkle roots. Through this proof of transaction, it is easy for the validators on the Ethereum network to reconstruct and verify these transaction for finality on the main chain.


Q2.- Explain the Liquid Network side chain



image.png
Image source


Legacy blockchains like Bitcoin also have some scaling solutions built around it. The Liquid network is a typical example.

Liquid network exists as a private blockchain with features that allow it scale transactions on the Bitcoin network. It was developed in 2018 by Blockstream.

Masking the description with industry nuances, Liquid network is appropriately described as a "federated" side-chain of the Bitcoin network.

It was designed primarily to provide confidential, fast and secure alternate route for Bitcoin transactions to crypto market participants like; market makers, brokers and different kinds of exchanges.


Since Liquid network is a side-chain, it is tied side-by-side to the Bitcoin blockchain in a fashion that looks like a bridge. This makes it possible for assets to be transferred between both chains.



Image
Image source

As a side-chain, Liquid network runs a separate consensus protocol that allows for settlement of transactions by validators within its framework. So, transactions are finalized faster and at a cheaper cost because they do not go through the Proof-of-Work process of the main chain.

Also, the assets on Liquid network are pegged to the value of those on the Bitcoin network. Such that any Bitcoin on Liquid network has a 1:1 peg with real Bitcoin.


How Liquid Network works



image.png
Image source


In a typical fashion, assets from the Bitcoin network are transferred to the Liquid network using a liquid full node. These bitcoins are frozen on the liquid network to issue out an equivalent asset known as L-BTC. L-BTC is a tokenized version of Bitcoin that is compatible with the Liquid network protocol.

The tokenized Bitcoin is then used to settle transactions on Liquid network. Since the block time on liquid network is about 1 minute, transactions with L-BTC gets finalized much faster without going through Bitcoin's Proof-of-Work consensus.

To the end user, these processes are rarely visible because they are back-end operations that are mostly run by exchanges and market makers. These market participants mediate the process of transferring Bitcoin between users' wallets and the Liquid network platform.


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


Metamask has always been the preferable wallet when it comes to the Ethereum network. However, it can also be connected to the various layer 2 solutions in the Ethereum ecosystem.

Layer 2 solutions like the Polygon network has made significant waves with its offer of low gas fees and high transaction speed. In a bid to avoid the sky-high gas fees for transactions on the the Ethereum network, users often utilize layer 2 solutions like Polygon.

In order to connect and exchange value between the Ethereum blockchain and the Polygon protocol, a user must first connect their wallets to the layer 2 protocol. Below is a step-by-step process on how to connect the metamask wallet to the Polygon network.

Note: it is assumed that user already has their Metamask wallet set-up, and backed up their passwords.

Step 1



Pelon metamask login and network check.png
Image source


Open up Metamask wallet, and confirm if Polygon is among the default networks available. As shown on my screenshot, my network is set to Ethereum, and Polygon is not among the options. So I'll proceed to add it manually.

Step 2



Pelon burger and settings.png
Image source


Click on the burger icon on the landing page to reveal the menu, then click on settings.

Step 3



Pelon select network.png
Image source


On the settings menu, click on accounts and network, and click "add network" on the resulting menu.

A form will appear with information about the network user intends to add.

Step 4



Pelon manual add.png
Image source


Proceed to fill the form with the required information as follows

Click on "add network"
Step 5



Pelon polygon network added.png
Image source


The wallet is connected to Polygon network, and user can proceed to explore the DeFi services on the Polygon network using the assets in their wallet.


Q4: When will the block 25,000,000 be generated on the Polygon network? Explore the 12,000,000 block, at that time, what was the price of the Matic?


To obtain the expected date for the generation of the 25,000,000th block, we will have to explore the polygon block explorer and search out block #25,000,000 to reveal this information.



polygonscan search.png
Image source


So, first of all, I launched the polygonscan.com explorer and keyed "25000000" into the search box on the landing page.

This reveals information about the invalidated block alongside the expected validation date.



image.png
Image source


At the time of writing, the information on the Polygon network's block explorer stated that the 25,000,000th block is expected to be generated in approximately 107 days. That is, the estimated target date for the block generation is on **Tuesday, the 15th of February in the year 2022.

The most recent block on the Polygon network at the time of writing was block #20780772.


Exploring Block #12,000,000



searching for block 12000000.png
Image source


To reveal the content of block #12,000,000. We will follow the open the Polygon network's block explorer and search out 12000000 to access the block.



Exploring block 12000000.png
Image source


Once the block search is completed, an overview of the # 12,000,000 will be displayed. The block overview contains key information about the block. As seen on the screenshot above, the block overview reveals the timestamp, number of transactions, the validator, the block reward denominated in MATIC, etc.

Some key details about block #12,000,000 as observed in block explorer are as follows:

MATIC Price: $ 0.38 / MATIC

Block Height: 12000000

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

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

Validator:
0x7fcd58c2d53d980b247f1612fdba93e9a76193e6 in 6 secs

Block Reward: 0.00877199352 MATIC

Difficulty: 15

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


Conclusion


As cryptocurrencies continue to rise in prominence, there is a pressing need for platforms that can scale multiple transactions and still maintain a low cost implications. For legacy blockchains like Bitcoin and Ethereum, which have already been caught in the dark web of time-consuming transaction settlement and high fees, layer-2 solutions have proven to help their network performance in a significant way.

While the Ethereum network utilizes roll-ups like the Zero Knowledge roll-up to scale its network, Bitcoin leverages on the Blockstream managed layer-2 solutions like the Liquid network to scale transactions on its platform.

With the global awareness currently happening, it is not out of place to say that the pressure on the existing base-layer blockchains will necessitate the creation of more side-chains as Layer-2 scaling solutions.

Thanks for reading...
Rectangle 10.png

Hi there! If you read to this point, I am sure you enjoyed the article. Let's take this further, I'd like to connect with you on a more personal level. Feel free to hit me up on any of my social handles below:


Usen Socials.png

CC:-
@pelon53

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.030
BTC 61766.31
ETH 2428.16
USDT 1.00
SBD 2.64