Sidechains - Crypto Academy / S4W8 - Homework post for pelon53

in hive-108451 •  3 months ago 

iMarkup_20211028_104744.png

Edited with Canva

iMarkup_20210730_125717.png

INTRODUCTION

Blockchain is a distributed ledger technology which has received an alarming rate of acceptance. However, it comes with two major issues of scalability and speed which have become great challenges to it. In view of this, an emerging mechanism which is meant to bring in much efficiency and scalability to blockchains was created in the form of sidechains. Sidechains refers to a mechanism that has been created that makes it possible for crypto tokens and digital assets from a particular blockchain to be used in a different blockchain very securely and then transferred back to the blockchain it was originally obtained from when necessary.

There is so much tremendous potential in the innovative mechanism of sidechains in trying to enhance the already existing blockchain technologies and their capabilities. Usually, a two-way peg is used in attaching a sidechain to the parent blockchain it belongs to. This works in making the whole process a very reversible one. Usually, the original blockchain is understood to be the mainchain while the sidechain only exists as an additional blockchain. The use of these sidechains makes it possible for an unstable original blockchain software to be utilised on a sidechain in a more reliable way. Equally, it provides a faster means of transactions and even stores data on processed transactions thereby reducing the burden on the main chain.

iMarkup_20210730_125717.png

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

iMarkup_20210730_125717.png

Placing an additional blockchain on top of an original blockchain as a sidechain is usually done with a method constructed for scalability to be used in the layer 2 or additional blockchain generally referred to as plasma. This plasma makes it possible for hundreds of transactions to be carried out on the sidechain and processed offline while making use of a single hash of the block from the sidechain which is meant to be added to the original blockchain. Users of sidechains may be required to keep a high amount of data in order for their transactions to be validated while equally having to spend a lengthy period of time online in order not to lose rewards during such transactions. To solve this problem some alternatives which are less resource-intensive, more user friendly and aimed at improving the scalability of layer two networks have been developed and one of such is the ZK-Rollups.

ZK-Rollups have been introduced as an option which makes it possible for layer 2 networks to be constructed with an increased level of scalability by making use of a mass transfer processing methodology in a single transaction. While a single transaction is created for every transfer with plasma, the use of ZK Rollups makes it possible for hundreds of transfers to be made in a single transaction. This involves the use of a zero-knowledge proof methodology that makes it possible for the blocks containing such transactions to be publicly presented and recorded on the original blockchain as a way of establishing its validity. The zero-knowledge proof approach also reduces the resources needed for storage and computation and validation of blocks. It does this by minimising the amount of data that is required to be held when undertaking a single transaction. Essentially, a zero knowledge of all the data is always required.

How It Works

The mechanism which is referred to as ZK-Rollup is usually made up of two different types of users, namely:-

  • Transactors
  • Relayers

This works by having the transactors create the transfer they wish to make and broadcasting it to the network. Usually, this transfer data is always made up of a "to" and "from" address which must be indexed, the value that is to be transacted, a nonce and then the network fee. The addresses are always shortened to a 3 byte index and this works by reducing the resources needed for processing the transaction. It is understood that a deposit is being made when the value of the transaction is greater than zero and withdrawal is being made when it is less than 0. Usually, two Merkle Trees are used by the smart contract in the recording of the data for each transaction. One Merkle Tree is used to record the addresses while another is used for recording the amounts transferred.

iMarkup_20211029_164222.png)

Source

The Relayers on their own create rollups by accepting large amounts of transfers. Usually, the Relayers have to generate the SNARK proof. Normally, this SNARK proof represents the delta state of being of the blockchain by means of a hash. So, the SNARK proof is made to draw a comparison of the two snapshots of the blockchain before the transfer was made and after the transfer had been made. This helps it to record the values of the wallet in the two different occasions. At the end, it only reports the changes that have been made to the mainnet with a verifiable hash. Usually, anyone who has staked the minimum bond that is required in the smart contract has the opportunity of becoming a relayer. With this incentive mechanism in place the relayer is encouraged not to withhold a rollup or tamper with it.

User Experience With The ZK-Rollups

Usually, the users who run ZK-roll-up-embedded dapps are made to pay considerably less fees for transactions. However, it requires a very large amount of computing power to create zero-knowledge proofs. A certain "commit-verify" approach is proposed to be utilised in its implementation. A number of blocks would be used to delay the SNARK proof and this would increase the latency required to block a confirmation. Really, it is not yet known how this is going to affect users until it is implemented.

Pros And Cons Of ZK-Rollups

Pros:-

  • Fees required for each user transfer is considerably reduced
  • It is much faster than the Plasma and even the Optimistic Rollup
  • Decentralization is greatly encouraged by this mechanism as a parallel computing model is used in the computation of blocks
  • The scalability of the layer 2 network and its throughput are greatly increased since each transaction is made to contain less data
  • This mechanism does not have to rely on the fraud game verification as can be seen with the Optimistic Rollup which could makes withdrawals to be delayed by up to two weeks.

Cons:-

  • It is necessary for data to be optimised in order to handle the difficulty required for the computation of zero-knowledge proof if maximum throughput must be obtained
  • The way ZK-Rollups are initially set up somewhat encourages a sort of centralised scheme
  • The unverifiable trust which the security scheme assumes is a worrisome development
  • Quantum computing is used and this comes with a great level of threat that increases the dangers of blockchain hacking

Security Considerations With The ZK-Rollups

It is assumed that the ZK-Rollups is implemented with an initial setup that can be said to be trusted; unfortunately this cannot be proven. This initial trusted state would have some group of developers who would still have to act as its subject matter or the experts behind it. First, this undermines the expected decentralized nature of the entire system. Again, this comes with a risk of social engineering hacking attack. In this case, a developer could be convinced to give vulnerable information or manipulate the codes.

Furthermore, the use of quantum computing comes with the potential danger that the ZK-Rollups could be possibly cracked. This is because the use of quantum computing comes with a higher probability that the correct SNARK proof hash could be easier guessed than with the encryption protocol that is currently being used by blockchains.

Examples Of The ZK-Rollups

  • zkSync is an example of a ZK-Rollup that is utilised on the Ethereum mainnet

iMarkup_20211029_163541.png

Source

  • Aztec uses a form of ZK Rollup scheme with an anticipated improved security

iMarkup_20211029_163729.png

Source

  • Loopring implements ZK roll-up scheme in the scaling of its payment and exchange protocol

iMarkup_20211029_163831.png

Source

  • Hermez and ZKTube all make use of versions of the ZK-Rollup in scaling their payment procedures and Hermez is also building a version of the ZK-Rollup that would be EMV-compatible.

iMarkup_20211029_163958.png

Source

iMarkup_20211029_164052.png

Source

iMarkup_20210730_125717.png

2.- Explain the Liquid Network side chain

iMarkup_20210730_125717.png

The Liquid Network was developed as a side chain that can be used as a network for settlement of transactions in a more confidential and faster manner with the issuance of digital assets that enable more efficient transactions with Bitcoin. It operates as a bitcoin network sidechain and makes it possible for you to move your bitcoins (BTC) between the Liquid side chain itself and the Bitcoin original chain in a one-to-one peg which is verifiable. Primarily, it was designed with a view to improving cryptocurrency trading market efficiency. It is designed in such a way that exchange platforms, retail traders, OTC trading desks and even asset issuers can all benefit from its usage.

Importance And Uses Of The Liquid Network

The Liquid Network is very useful and important in different ways. Some of its key importance include:

  • Makes bitcoin transactions faster:- The Liquid Network as a side chain makes it possible for transactions with the Bitcoin to be done in a faster way with the implementation of a 1-minute block time that is non-variable and which relies on a finality of just two block transactions.

  • Brings more confidentiality to transactions with the Bitcoin:- With the use of the liquid network, the type of assets transferred together with the amounts in the transaction cannot be seen by third parties.

  • Makes the issuance of new assets easier:- With the liquid network it is possible for anybody to issue new assets that can include digital collectibles, stablecoins and even security tokens that come with the same feature of confidentiality and speed as the Liquid Bitcoin.

Some other innovative uses of the Liquid Network include:-

  • Arbitrage trading in a more efficient way:- In arbitrage trading, traders always look to close the loop in a faster way and the Liquid Network gives them the edge over their competitors.

  • It is used to reduce front run risk which is faced by large traders:- Since the transaction amounts being transferred by large OTC traders cannot be seen by third parties it is now impossible for competitors to act on the information provided by these large OTC trades before their settlement.

  • It is used to minimise risk encountered in settlement:- With the Liquid Network, there are multiple assets that can be interoperated on the same side chain. This makes atomic swap of assets possible which is especially needed when carrying out large OTC trades.

  • Issuance of stablecoins:- Tether has now made it possible for USDT to be issued on the Liquid Network.

  • Tokenization of gaming assets:- The Liquid Network has been used for the tokenization of in-game items by Lightnite in its upcoming video game, Battle Royale.

On the Liquid Network sidechain, Liquid Bitcoin (L-BTC) is usually issued as a special type of asset. It is verifiably supplied in a ratio of 1 to 1 with Bitcoin. That is to say that an equivalent amount of Bitcoin must be held on the Bitcoin mainchain. Normally, L-BTC would be made anytime an equivalent amount of BTC is transferred to the liquid network.

Whenever the Bitcoin is moved out of the side chain, the L-BTC is destroyed. When Bitcoin is moved to the liquid side chain it is called peg-in. When it is moved out it is called peg-out. The L-BTC is useful in trading but can also be used for the settlement of transaction fees even when any other type of asset is being transacted on the liquid network.

It is possible for multiple assets to be issued on the same liquid network block chain - sidechain - since it was built with the Elements platform. Generally, the assets are always independently issued on the network and are referred to as Issued Assets. Although the security models of the Issued Assets and L-BTC itself differ in a subtle way, all the assets, in most part, function in much the same way.

Hence, the same base feature of 1 minute block time, smart contracts patterned and styled after the Bitcoin and confidential transactions are all enjoyed equally by all the assets. Very importantly, the Issued Assets can be used for different purposes which can include being used as digital collectibles, as stablecoins, as vouchers, security tokens, reward Points and many more.

How The Liquid Network Really Works

The Liquid Federation is made up of a group of different wallet providers, leading exchanges, trading desks, payment processing services among other financial establishments. These are responsible for running the Liquid side chain. Non as a single member has absolute control over the network.

Blocks are not mined on the Liquid side chain with a proof-of-work process unlike the Bitcoin network. Rather than that, 15 liquid functionaries are made to sign the blocks in a round-robin pattern. These liquid functionaries referred to hardwares which specialised in nature. A subsection of the liquid federation is responsible for running these specialised hardwares and they are dispersed geographically all over the world.

It is possible for anyone to verify the state of the liquid side chain by running a liquid node. However, the heartbeat of the side chain are the liquid functionaries who are responsible for generating blocks, signing transactions and ensuring the security of the BTC held on the side chain as L-BTC.

iMarkup_20210730_125717.png

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

iMarkup_20210730_125717.png

I will be using the metamask Chrome extension wallet to describe the steps in connecting metamask to the polygon network.

iMarkup_20211029_155004.png

  • On the next page, I selected Metamask, where I can connect using browser wallet, as indicated)

iMarkup_20211029_155050.png

  • On the next tab which opens up I am required to unlock my metamask wallet by inputting the password and clicking unlock

iMarkup_20211029_155204.png

  • This unlocks my metamask Chrome extension wallet and on the new tab I have to click next after selecting the wallet to proceed

iMarkup_20211029_155319.png

  • On the new tab I have to click connect to finally collect the wallet

iMarkup_20211029_155410.png

  • A new page opens up and I am required to sign this action with my metamask wallet. I click sign

iMarkup_20211029_155456.png

  • From the image below my wallet has been successfully added to the polygon site

iMarkup_20211029_155606.png

iMarkup_20210730_125717.png

4.- 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.

iMarkup_20210730_125717.png

I am going to be carrying out this section on the polygonscan website.

Block 25,000,000

Once on the site, I intend to explore block 25,000,000. To do this I simply input this number on the search bar and click search.

iMarkup_20211029_144954.png

Source

As is displayed below, the block has not been generated but is set to be generated in 108 days 10 hours 18 minutes and 17 seconds from the time I visited the site.

iMarkup_20211029_145113.png

Source

The estimated target day for its generation is given as:- Tue Feb 15 2022

The estimated target time for its generation on the estimated target day is given as:- 00:55:01 GMT+0100(West Africa Standard Time)

It can also be seen that the current block is 20741664.

The number of blocks remaining to be generated before the block 25,000,000 is 4258336 blocks.

Block 12,000,000

While on the site I can also explore block 12,000,000. I searched this figure on the search bar:

iMarkup_20211029_145219.png

Source

Details from the block are revealed below:

iMarkup_20211029_145333.png

Source

iMarkup_20211029_145459.png

Source

From the image above, some of the details relating to the block are tabulated below:-

ParameterBlock Details
Block Height12000000
Timestamp229 days 4 hrs ago (Mar-14-2021 09:35:48 AM +UTC)
Transactions14 transactions and 0 contract internal transaction in this block
Validated by0x7fcd58c2d53d980b247f1612fdba93e9a76193e6 in 6 secs
Block Reward0.00877199352 MATIC
Difficulty15
Total Difficulty99,921,518
Size5,826 bytes
Gas Used3,022,128 (15.11%)
Gas Limit20,000,000
MATIC Price$0.38 / MATIC
Hash0x54c6805f441801ea05620f26950ca70c401e1642ab27f76d5097f9f500689965
Parent Hash0x3592bd9a6a5ad7f855d5c1fca02c8d4ac8b5e24f99af3c6706beba0b37222ce7
Sha3Uncles0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347
Nonce0x0000000000000000

iMarkup_20210730_125717.png

CONCLUSION

iMarkup_20210730_125717.png

While blockchain technology comes with a lot of inherent benefits there is still a problem of speed and scalability associated with the new technology. This informs the need for the creation of a mechanism referred to as side chains which makes it possible for crypto assets from a particular original blockchain to be transacted with on a different block chain and finally transferred back to the original block chain as a way of increasing speed and easing the burden on the original chain.

In order to improve the efficiency of these side chains one of the mechanisms that have been put to use is the ZK-Rollups. This aims to correct some of the problems encountered with a different mechanism known as plasma which has been used earlier in the construction of side chains. It is known to be more user-friendly, less resource-intensive and generally improved scalability in a more effective way.

One of the very popular side chains which has been deployed in use is the Liquid Network sidechain. It functions as a sidechain for the Bitcoin network and comes with quite a huge number of benefits which include confidentiality in transactions, faster transactions and issuance of new assets to facilitate transfers. Equally, it has been used for such other important benefits as arbitrage trading opportunities, reduction of risk encountered in settlement, tokenization of gaming assets and for the issuance of stablecoins.

iMarkup_20210730_125717.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
Loading...