Blockchains/options that are constructed on prime of layer blockchains.
Home Analogy: the set up of a home; the plumbing, electrical programs, heating, and cooling in a home. These programs make the home livable and purposeful however aren’t the fundamental construction.
Objective: enhance the aptitude of the variety of transactions per second the blockchain can deal with (scalability) while additionally enhancing interoperability, and aiming to take care of the safety and decentralization of layer 1.
Be aware: Layer 2 options are generally known as OFF-CHAIN SOLUTIONS
Scalability
Layer 2 options assist enhance transaction velocity and scalability by transferring transactions off the primary blockchain and onto layer 2 networks that are extra environment friendly, however the ultimate final result is recorded on the layer 1 blockchain.
Examples of layer 2 blockchains:
Polygon: Layer 2 blockchain which goals to enhance Ethereum’s scalability by means of sooner transaction speeds and decrease prices for builders.Arbitrum: layer 2 resolution (blockchain) for Ethereum blockchain, designed to enhance the velocity of transactions, lower charges, enhance scalability, and enhance community privateness and safety.
There are various kinds of layer 2 options:
State channelsSide chainsOff-chain protocols
State Channels
Off-chain channels that are like aspect paths separate from the primary blockchain, which permit individuals to conduct a number of transactions with out immediately involving the layer 1 blockchain. Nonetheless, as soon as individuals are accomplished with the transactions within the off-chain channel, they need to ‘shut’ the channel, which includes finally recording the ultimate state of all their transactions onto the layer 1 blockchain.
State channels goal: dealing with MULTIPLE TRANSACTIONS.
Sidechains
Sidechains are like aspect roads that hook up with the primary street, they’re impartial blockchains that hook up with the primary blockchain (layer1). They function alongside the primary layer 1 chain however have their very own methods of validating transactions (consensus mechanism) and guidelines.
Aspect chains additionally use a two-way peg system that hyperlinks the primary layer 1 blockchain to the sidechain, which permits belongings (like cryptocurrency) to be securely moved between them. Like a checkpoint between a essential street and a aspect street, the place you may change roads securely.
Aspect chains goal: validating transactions and transferring belongings.
Off-chain Protocols
Off-chain protocols allow quick and scalable transactions by conducting them off the primary blockchain by means of establishing fee channels amongst individuals, facilitating on the spot and low-cost transactions, with ultimate settlement recorded on the layer 1 blockchain.
Examples embody: Lightning Community for Bitcoin and the Raiden Community for Ethereum.
Right here’s how the Lightning Community works:
Two customers comply with switch some cash between themselves. With the intention to do that, they first transfer their cash to a particular tackle. That is like placing their cash right into a shared secure the place each have to comply with open it.The tackle solely releases the funds when each events agree on the circumstances of the switch. Consider it as a contract that claims each events should agree earlier than any cash strikes out of the secure.As an alternative of recording each element of their transaction on the primary blockchain (layer 1), they preserve a personal document of their transactions. the personal document is sort of a secret pocket book that solely they’ll see, and it doesn’t instantly inform the primary layer 1 blockchain what’s occurring.When the switch is accomplished, the personal ledger studies to the primary blockchain. The primary blockchain updates each customers’ balances accordingly.
Abstract: switch of funds on a novel personal ledger which then notifies the primary ledger (layer1 blockchain) as soon as the switch is full and confirmed.
Objective of lightning community: permits for the creation of numerous distinctive ledgers, so 1000’s of transfers can happen concurrently with out slowing down the primary bitcoin protocol (layer 1 blockchain) thus serving to overcome the problem of scalability.