Sidechains - Crypto Academy / S4W8 - Homework post for pelon53

in SteemitCryptoAcademy2 years ago (edited)


sidechains priceless 1.png
Image created on Canva

garis kuning.jpeg

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

garis kuning.jpeg

Blockchain technology is an innovative way by which data is stored. It also helps to facilitate the transaction of funds peer-to-peer online. That is, transactions done with blockchain don't need an intermediary to process transactions. This is made possible by what is known as a Consensus Mechanism.


IMG_20211030_144428_023.jpg
Source

This phenomenon has made a lot of people start accepting blockchain technology as a means of doing transactions. Though this is very noble, it also comes with its inherent risk: Scalability. Due to the high demand for the use of blockchain technology, different blockchains have been experiencing problems in the time taken to confirm a transaction and the fees accrued to the transaction. Some of the popular blockchains experiencing these issues are Bitcoin and Ethereum.

So many solutions have been proposed to solve this scalability issue, and one of them is the use of Sidechains.


IMG_20211030_144411_603.jpg
Source

Sidechains are simply blockchains that work together with the main blockchain. Its main function is to help scale the main blockchain it is working with. Some work independently on their own but communicate with the main network, while some work within the main blockchain. In addition, added benefits associated with sidechains are speed, interoperability, and a test environment. Sidechains are also regarded as a Layer 2 solution. Examples of sidechains are Liquid network, ZK Sync, Loopring, Immutable X, etc.

These sidechains use different consensus mechanisms to help scale the main blockchain. Some of them are Channel, Plasma, Rollups (Optimistic and Zero-Knowledge (ZK)), etc. I would talk about sidechains that use ZK roll-ups as their consensus mechanism.

ZK Roll-ups


IMG_20211030_144448_063.jpg
Source

ZK Roll-up is one of the solutions being employed as a sidechain to help scale a blockchain network. It stands for Zero-knowledge roll-up. With ZK roll-up hundreds of transactions that take place are bundled or rolled up together and generate a validity proof that is cryptographically based called a SNARK. That is, a ZK roll-up just needs only the validity proof and not the entire data that is generated when a transaction occurs.

It does its computation on its off-chain, generates a validity proof, and submits the validity proof to the main network. With ZK roll-ups transactions are executed on its network but posted on the main network (Layer 1). Putting the transaction data on the main network makes the transactions that took place to be secured by the consensus mechanism of the chain (on-chain). This system allows the main network to increase the number of transactions that can be done and handled, while at the same time maintaining security.

A Validity proof is a model that is used to secure certain Layer 2 solutions where transactions are rolled up into batches and then posted to Layer 1 as a single transaction. It reduces the computing and storage resources that are necessary for validating a block on the main network because it reduces the amount of data that is generated in a single transaction. So with the validity proof (SNARK), there is Zero-Knowledge need for whole data generated in a single transaction

The zk roll-up comprises the smart contract which maintains the state of every transaction that occurs on its network, and only the validity proof can update the state. This is achieved by unbundling the transactions and verifying all the transaction that is held in that bundle.

Zk roll-up is made up of two main types of users. They are the Transactors and the Relayers or Operators.

The transactors perform a transaction that is then signaled to the network. The transaction data usually includes an index of the receiver and the sender address, the value to be transferred, the fee incurred by the network, and the nonce. The addresses are shortened to a 3 byte indexed version to help reduce processing resources. Then the value to be transferred automatically creates a deposit or withdrawal respectively. Then the zk roll-up smart contracts record the segregated data in two Merkle Trees, with the addresses in one Merkle Tree and the value to be transferred in another Merkle Tree.

The relayers or operators on the other hand are tasked with collecting the large amounts of transactions signaled in the network and bundling (roll-up) them together. They then generate the validity (SNARK) proof. The validity proof checks the state of the network before the transaction and after the transaction and reports the changes experienced in a verifiable hash to the main network. Anyone can be a relayer, but the requirement is staking a bond in the roll-up smart contract. This is the procedure to follow to make sure that the relayers verify and execute the transactions correctly without tampering or withholding a roll-up.

Using zk roll-up helps validate a block to be cheaper and quicker since less data is contained in the block. It promotes open participation (decentralization) and fast transaction outputs. Finally, there are no delays in moving funds from Layer 2 to Layer 1 because the zk roll-up smart contract (validity proof) has already done the job.

Some use cases of zk roll-up are Starkware, Aztec, Polygon-Hemez, ZKTube, Deversifi.

I shall do a brief discussion on Deversifi.

DeversiFi (DVF)

DeversiFi is a decentralized exchange that promises different solutions to solve some of the crucial problems faced by decentralized exchanges. They are providing non-custodial exchange services, with high speed and security.
It is built on top of Ethereum's network and makes use of the Layer 2 scaling technology ZK Roll-up and Validium. This system makes DeversiFi fast, non-custodial, and highly liquid because a lot of users are attracted to the platform. It was formerly known as Ethfinex.

IMG_20211030_144527_427.jpg

Source

This speed is seen in its network as it processes just over 9000 transactions per second (tps). It has a high-speed API and user interface (UI) to provide some of the industry's deepest order books. It allows for privacy in their network, incurs fees that are competitive in the market, and users can withdraw their funds anytime. Simply put, users on the DeversiFi platform are in full control of their assets and can move them in and out quickly without any inconvenience.

It uses the validity proof called STARK to prove and verify trading activities on its platform and in a trustless manner. Trades are signed and submitted off-chain, and the off-chain balance of traders are updated instantly after each trade

In addition, DeversiFi provides deflationary Nectar token for users to benefit from their fee discounts and membership in one of the largest DAOs that has been created-Nectar DAO

Its features include:

  • Non-custodial exchanges that are of high speed.
  • Can perform Over the Counter (OTC) Trading services.
  • Provides API Trading.


IMG_20211030_161238_394.jpg
Source

You can connect to the network using Keystore, MetaMask wallet, or Ledger wallet. Through these means, you can deposit or stake your DVF tokens to the DeversiFi exchange wallet. Regular withdrawals are made on the network, and it also supports fast withdrawals for certain tokens. the regular withdrawals are settled with the zk rollup validity proofs once per day. That means users who make regular withdrawals are supposed to wait for 24 hours before they receive their funds. Some of the tokens that can be used for fast withdrawals are USDT, ETH, WBTC, USDC, AAVE, DVF, and LDO.


IMG_20211030_161250_139.jpg
Source

It has a native token called DVF which is used to govern the DeversiFi protocol. The token can be used for staking and trading on its platform. It can also be used for governance. When a user stakes his DVF on the platform he is rewarded with xDVF which allows him to earn in the protocol fees and to govern the treasury.


IMG_20211030_161301_311.jpg
Source

The native token of DeversiFi is listed on CoinMarketCap. It has a current price of $4.02, a Market Cap of $97,060,374, a 24-hour Trading Volume of $266,887, a Circulating Supply of 24,147,147.70 DVF, and a Maximum & Total Supply of 100,000,000.

The founder and CEO of DeversiFi are Will Harborne. He worked as a technology consultant at Cambridge Consultants and completed his Masters of Engineering at the University of Cambridge.

garis kuning.jpeg

2.- Explain the Liquid Network side chain

garis kuning.jpeg


IMG_20211030_161221_247.jpg
Source

Liquid Network is a blockchain network where digital assets are issued, transactions in Bitcoin take place confidentially, and also enables faster settlement of transactions. It is a Bitcoin sidechain. It is used to facilitate transactions that are Bitcoin-based in a faster means, to make the Bitcoin transactions to be private, and to issue new assets such as stablecoins, digital collectibles.


IMG_20211030_161317_137.jpg
Source

It makes use of Liquid Bitcoins (L-BTC). L-BTC is a unique asset on the Liquid network. It is supplied in a 1-to-1 ratio with the original Bitcoin (BTC) that is withheld on the Bitcoin network (Mainchain). Bitcoins (BTC) can be transferred from the Main network to the Liquid network through a process known as Peg-in. The reverse is also true as BTC can be transferred from the Liquid network back to the Main network in the process known as Peg-out. Because the BTC is not in the main chain, its security model becomes different when it enters the Liquid Network sidechain.

The transaction capacity of the Liquid network is such that it enables faster transactions than Bitcoin. This is primarily because the production frequency of a block on the Liquid network is higher than in Bitcoin's network and its transaction finality of two blocks. However, it has a similar transaction capacity to Bitcoin's network. That is, their block weight is exactly the same as Bitcoin.


IMG_20211030_161332_048.jpg
Source

The block intervals have less variability experienced because it blocks are signed by the Liquid functionaries rather than being produced using a Proof-of-Work consensus mechanism.


priceless zk rollups 5.jpeg
Source

The consensus Protocol in the Liquid network is such that it consists of a Liquid Federation. The federation includes leading exchanges, trading desks, wallet providers, companies that provide wallet services, and other financial institutions. None of the members in the federation has control over the network. As stated earlier blocks are not produced through the Proof-of-Work consensus mechanism, rather they are signed by 15 Liquid functionaries in a round-robin play. And even though becoming a node is open to anyone, it is the functionaries that are tasked with signing transactions, generating the blocks on the network thereby securing the BTC held in the network.

Some of its features are:

  • Time intervals of a block are 1-minute
  • The transactions done on the network are confidential
  • The smart contracts are based on Bitcoins
  • The other assets that are issued include stablecoins, digital collectibles, security tokens, vouchers, etc.

garis kuning.jpeg

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

garis kuning.jpeg

These are the steps taken to connect the Metamask wallet with the Polygon network.

  • Go to Polygon's address. On the home page, click on Use Polygon. Then click on Polygon Wallet on the list that comes out.


IMG_20211030_164602_700.jpg
Source

  • A new page would display. Click on Polygon Wallet the second time.


IMG_20211030_164616_142.jpg
Source

  • A new page with different wallets that are supported by the Polygon network would display. Click on Metamask.


IMG_20211030_164629_559.jpg
Source

  • You would be asked to put in your password. Put in your password and click on Unlock.


IMG_20211030_164644_399.jpg
Source

  • A request from Polygon network would show asking you to sign in. Click on Sign.


IMG_20211030_164700_949.jpg
Source

  • When you do that, you are automatically taken to the Polygon network through your wallet.


IMG_20211030_164718_400.jpg
Source

garis kuning.jpeg

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.

garis kuning.jpeg

To check for the 25,000,000 blocks, first, you have to visit the polygon scan. That is the block explorer for Polygon's network.


IMG_20211030_164731_281.jpg
Source

Visiting the block I saw some details on the home page of the scanner. It shows the current price which is at $1.89, the latest block which is at 20,784,617, etc.


IMG_20211030_164743_621.jpg
Source

Then I checked for the block of 25,000,000 to get an idea of when it would be generated. The estimated target date is Tuesday, February 15 2022 00:30:49 GMT +0100 (West African Standard Time). That is 107 Days, 08 Hours, 03 Minutes, and 14 Seconds.


IMG_20211030_164755_882.jpg
Source

Then I searched for the 12,000,000 blocks to get an idea of the price of MATIC at that time. I found out that the price was $0.38.

garis kuning.jpeg

Conclusion

garis kuning.jpeg

So far Sidechains have been seen to be impactful in helping blockchains. The two most popular blockchains, Bitcoins and Ethereum are enjoying the benefits that sidechains provide. With the help of these sidechains, their network has been able to scale reasonably at the same time also experiencing interoperability between the sidechains and the mainchains which were something of imagination before now.

Some of the sidechains are the Liquid network which is created by Blockstream to help scale the Bitcoin network. However, its mode of operation is different from that of Bitcoin's blockchain. Then we have DeversiFi which is a sidechain on the Ethereum network. It makes use of ZK SNARK Roll-up which acts as the validity proof that bundles and verifies transactions that have been taken on the network.

CC:@pelon53

Sort:  
Loading...

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.032
BTC 63478.09
ETH 3067.28
USDT 1.00
SBD 3.81