Difference between revisions of "Sidechain"
(Created page with "Basics A chain which is explicitly targeted towards another chain and aims to attract users with its lower fees. "Put simply, sidechaining is any mechanism that allows tokens from one blockchain to be securely used within a completely separate blockchain but still moved back to the original chain if necessary. By convention the original chain is normally referred to as the "main chain", while any additional blockchains which allow users to transact within them in th...") |
m (1 revision imported) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Basics | == Basics == | ||
* A chain which is explicitly targeted towards another chain and aims to attract users with its lower fees. | |||
*''"[https://ethereum.stackexchange.com/questions/379/what-is-a-sidechain Put simply,] sidechaining is any mechanism that allows tokens from one [[blockchain]] to be securely used within a completely separate blockchain but still moved back to the [[Mainchain|original chain]] if necessary. By convention the original chain is normally referred to as the "[[main chain]]", while any additional blockchains which allow users to transact within them in the tokens of the main chain are referred to as "sidechains". For example, a [[Private Blockchain|private]] [[Ethereum (ETH)|Ethereum]]-based network that had a linkage allowing ether to be securely moved from the [[Public Blockchains|public]] Ethereum [[main chain]] onto it and back would be considered to be a sidechain of the public network."'' | |||
* From [https://medium.com/swlh/solving-the-blockchain-scalability-issue-sharding-vs-sidechains-1b0c6d1f6c0d this blog] (4-10-2018): | |||
''"A sidechain is a separate blockchain that is attached to its main chain using a two-way peg (see the image above). Sidechains are aligned in parallel with the main blockchain. The sidechain technology has been around for some time. It first appeared in 2014 when Dr. [[Adam Back]] published a research paper called: [https://blockstream.com/sidechains.pdf Enabling Blockchain Innovations with Pegged Sidechains]. Sidechains will allow for digital assets from one blockchain to be used in a separate blockchain (the sidechain) and if needed they can be moved back to the original blockchain.'' | |||
''The benefits of implementing sidechains in [[decentralized]] networks are huge. For instance, take the gaming industry. Let’s say you are playing a popular decentralized Role-Playing Game (RPG) and your character has just found a unique in-game item that was hidden in a specific world. Your friend has just discovered a new decentralized RPG that he started playing. How cool would it be to be able to airdrop your character including all its achievements into the new game that your friend is playing? You can show him your unique item in this new game. That’s only one of the advantages of sidechains.'' | |||
From this article (16-11-2019): | ''Some blockchain projects (e.g. [[Ardor (ARDR)|Ardor]], [[MOAC]]) might also refer to sidechains as child chains, with the main blockchain being the mother chain."'' | ||
* From [https://simpleaswater.com/difference-between-sidechains-and-state-channels/ this article] (16-11-2019): | |||
''"The two-way peg enables interchangeability of assets at a predetermined rate between the parent blockchain and the sidechain. The original blockchain is usually referred to as the ‘main chain’ and all additional blockchains are referred to as ‘sidechains’. The blockchain platform Ardor refers to its sidechains as ‘childchains’.'' | |||
''A user on the parent chain first has to send their coins to an output [[address]], where the coins become locked so the user is unable to spend them elsewhere. Once the [[transaction]] has been completed, a confirmation is communicated across the chains followed by a waiting period for extra security. After the waiting period, the equivalent number of coins is released on the sidechain, allowing the user to access and spend them there. The reverse happens when moving back from a sidechain to the main chain.'' | |||
A | === ''Federations'' === | ||
''A federation is a group that serves as an intermediate point between a main chain and one of its sidechains. This group determines when the coins a user has used are locked up and released. The creators of the sidechain can choose the members of the federation. A problem with the federation structure is that it adds another layer between the main chain and the sidechain.'' | |||
''Sidechains are responsible for their own security. If there isn’t enough [[mining power]] to secure a sidechain, it could be hacked. Since each sidechain is independent, if it is hacked or compromised, the damage will be contained within that chain and won’t affect the main chain. Conversely, should the main chain become compromised, the sidechain can still operate, but the peg will lose most of its value.'' | |||
''Sidechains need their own miners. These miners can be incentivized through ‘[[merged mining]]’, whereby two separate cryptocurrencies, based on the same algorithm, are mined simultaneously.'' | |||
=== ''Pros and Cons with regards to scaling'' === | |||
Sidechains | ==== ''Sidechain pros'' ==== | ||
* <em>Sidechains are permanent. You don’t have create your own sidechain for specific purpose if there is one present: Sidechains are created and maintained once made. We don’t close sidechains, rather we lock the assets on sidechain to move back to the mainchain. This can be helpful in the way that anyone who is doing a specific task off blockchain/mainchain ([https://www.reddit.com/r/dogecoin/comments/61vg5k/dogethereum_we_can_do_this_dogether/ for eg.] transacting in [[Dogecoin (DOGE)|dogecoin]]) will come to the same sidechain. So, you don’t have to create separate chains for every new participant. Whereas in state channels you usually have to create a new channel to add a new participant. But projects such as [[Lightning]] , [[Raiden Network (RDN)|Raiden]] network have come up with brilliant solution for this. They create a mesh of participants so you don’t have to create a new channel for every new participant you interact with. You can interact with participants indirectly creating a channel between you and recipient through some other participant who is common to both: you and the recipient.</em> | |||
* <em>Sidechains allow cryptocurrencies to interact with one another: They add flexibility and allow developers to experiment with Beta releases of [[Altcoins]] or software updates before pushing them on to the main chain. Traditional banking functions like issuing and tracking ownership of shares can be tested on sidechains before moving them onto main chains.</em> | |||
==== ''Sidechain cons'' ==== | |||
* <em>Sidechains need a lot of initial investment to start off: To create a sidechain we need to have enough [[miners]] so that the network is safe from attackers. Also, we have to make it sure that they are up and running. Whereas there is no blockchain involved in [[state channels]]. So, no such requirement is needed.</em> | |||
* <em>A Federation is needed for sidechains: This adds another layer between the mainchain and the sidechain. This could prove as another weak point for the attackers to attack by bribing or attacking the federation. Whereas in state channel we just need a [[smart contract]] to do this for us."</em> | |||
Sidechain cons | |||
Sidechains need a lot of initial investment to start off: To create a sidechain we need to have enough miners so that the network is safe from attackers. Also, we have to make it sure that they are up and running. Whereas there is no blockchain involved in state channels. So, no such requirement is needed. | |||
A Federation is needed for sidechains: This adds another layer between the mainchain and the sidechain. This could prove as another weak point for the attackers to attack by bribing or attacking the federation. Whereas in state channel we just need a smart contract to do this for us." | |||
"The big difference between layer 2 and sidechains is that layer-2 solutions generally rely on the security on the main chain, while a sidechain has its own security properties. While layer 2 solutions should be trustless, sidechains require trust." | == Difference with a Layer-2 == | ||
* A breakdown in security differences can be read in [https://old.reddit.com/r/ethereum/comments/sgd3zt/a_quick_reminder_of_what_shared_security_means/ this post] by [[Vitalik Buterin]] (1-2-2022). | |||
* [https://lnmarkets.substack.com/p/26-the-layer-2-wars-bitcoin-culture From] [[LN Markets]] (3-6-2021): | |||
''"The big difference between layer 2 and sidechains is that layer-2 solutions generally rely on the security on the main chain, while a sidechain has its own security properties. While layer 2 solutions should be trustless, sidechains require trust."'' | |||
== Shared Security == | |||
* A breakdown in security differences can be read in [https://old.reddit.com/r/ethereum/comments/sgd3zt/a_quick_reminder_of_what_shared_security_means/ this post] by [[Vitalik Buterin]] (1-2-2022): | |||
''"If an attacker can [[51% Attack|51% attack]] the smaller chain, how much damage can they do?'' | |||
''If the smaller chain is a "sidechain", they can steal everything. They can make a block that illegally edits the state to give them all the coins, and then withdraw the coins through the bridge, and there's no verification happening on the larger chain. However, security can be slightly better than fully independent [[Layer One|L1s]], because sidechains whose [[Block Header|block headers]] are published to Ethereum are guaranteed to revert if Ethereum reverts, preventing thefts involving 51% attacks on Ethereum but not the sidechain.'' | |||
''This is what we mean by "shared security". If you are hodling assets and doing stuff on the smaller chain, are you as secure as if you were doing it on the larger chain, or are you less secure? On a rollup or a plasma, you are just as secure. On an independent L1 or a sidechain, you are much less secure. On a validium, you're somewhere in the middle."'' | |||
[[Category:Jargon/Various]] |
Latest revision as of 08:38, 2 March 2022
Basics
- A chain which is explicitly targeted towards another chain and aims to attract users with its lower fees.
- "Put simply, sidechaining is any mechanism that allows tokens from one blockchain to be securely used within a completely separate blockchain but still moved back to the original chain if necessary. By convention the original chain is normally referred to as the "main chain", while any additional blockchains which allow users to transact within them in the tokens of the main chain are referred to as "sidechains". For example, a private Ethereum-based network that had a linkage allowing ether to be securely moved from the public Ethereum main chain onto it and back would be considered to be a sidechain of the public network."
- From this blog (4-10-2018):
"A sidechain is a separate blockchain that is attached to its main chain using a two-way peg (see the image above). Sidechains are aligned in parallel with the main blockchain. The sidechain technology has been around for some time. It first appeared in 2014 when Dr. Adam Back published a research paper called: Enabling Blockchain Innovations with Pegged Sidechains. Sidechains will allow for digital assets from one blockchain to be used in a separate blockchain (the sidechain) and if needed they can be moved back to the original blockchain.
The benefits of implementing sidechains in decentralized networks are huge. For instance, take the gaming industry. Let’s say you are playing a popular decentralized Role-Playing Game (RPG) and your character has just found a unique in-game item that was hidden in a specific world. Your friend has just discovered a new decentralized RPG that he started playing. How cool would it be to be able to airdrop your character including all its achievements into the new game that your friend is playing? You can show him your unique item in this new game. That’s only one of the advantages of sidechains.
Some blockchain projects (e.g. Ardor, MOAC) might also refer to sidechains as child chains, with the main blockchain being the mother chain."
- From this article (16-11-2019):
"The two-way peg enables interchangeability of assets at a predetermined rate between the parent blockchain and the sidechain. The original blockchain is usually referred to as the ‘main chain’ and all additional blockchains are referred to as ‘sidechains’. The blockchain platform Ardor refers to its sidechains as ‘childchains’.
A user on the parent chain first has to send their coins to an output address, where the coins become locked so the user is unable to spend them elsewhere. Once the transaction has been completed, a confirmation is communicated across the chains followed by a waiting period for extra security. After the waiting period, the equivalent number of coins is released on the sidechain, allowing the user to access and spend them there. The reverse happens when moving back from a sidechain to the main chain.
Federations
A federation is a group that serves as an intermediate point between a main chain and one of its sidechains. This group determines when the coins a user has used are locked up and released. The creators of the sidechain can choose the members of the federation. A problem with the federation structure is that it adds another layer between the main chain and the sidechain.
Sidechains are responsible for their own security. If there isn’t enough mining power to secure a sidechain, it could be hacked. Since each sidechain is independent, if it is hacked or compromised, the damage will be contained within that chain and won’t affect the main chain. Conversely, should the main chain become compromised, the sidechain can still operate, but the peg will lose most of its value.
Sidechains need their own miners. These miners can be incentivized through ‘merged mining’, whereby two separate cryptocurrencies, based on the same algorithm, are mined simultaneously.
Pros and Cons with regards to scaling
Sidechain pros
- Sidechains are permanent. You don’t have create your own sidechain for specific purpose if there is one present: Sidechains are created and maintained once made. We don’t close sidechains, rather we lock the assets on sidechain to move back to the mainchain. This can be helpful in the way that anyone who is doing a specific task off blockchain/mainchain (for eg. transacting in dogecoin) will come to the same sidechain. So, you don’t have to create separate chains for every new participant. Whereas in state channels you usually have to create a new channel to add a new participant. But projects such as Lightning , Raiden network have come up with brilliant solution for this. They create a mesh of participants so you don’t have to create a new channel for every new participant you interact with. You can interact with participants indirectly creating a channel between you and recipient through some other participant who is common to both: you and the recipient.
- Sidechains allow cryptocurrencies to interact with one another: They add flexibility and allow developers to experiment with Beta releases of Altcoins or software updates before pushing them on to the main chain. Traditional banking functions like issuing and tracking ownership of shares can be tested on sidechains before moving them onto main chains.
Sidechain cons
- Sidechains need a lot of initial investment to start off: To create a sidechain we need to have enough miners so that the network is safe from attackers. Also, we have to make it sure that they are up and running. Whereas there is no blockchain involved in state channels. So, no such requirement is needed.
- A Federation is needed for sidechains: This adds another layer between the mainchain and the sidechain. This could prove as another weak point for the attackers to attack by bribing or attacking the federation. Whereas in state channel we just need a smart contract to do this for us."
Difference with a Layer-2
- A breakdown in security differences can be read in this post by Vitalik Buterin (1-2-2022).
- From LN Markets (3-6-2021):
"The big difference between layer 2 and sidechains is that layer-2 solutions generally rely on the security on the main chain, while a sidechain has its own security properties. While layer 2 solutions should be trustless, sidechains require trust."
- A breakdown in security differences can be read in this post by Vitalik Buterin (1-2-2022):
"If an attacker can 51% attack the smaller chain, how much damage can they do?
If the smaller chain is a "sidechain", they can steal everything. They can make a block that illegally edits the state to give them all the coins, and then withdraw the coins through the bridge, and there's no verification happening on the larger chain. However, security can be slightly better than fully independent L1s, because sidechains whose block headers are published to Ethereum are guaranteed to revert if Ethereum reverts, preventing thefts involving 51% attacks on Ethereum but not the sidechain.
This is what we mean by "shared security". If you are hodling assets and doing stuff on the smaller chain, are you as secure as if you were doing it on the larger chain, or are you less secure? On a rollup or a plasma, you are just as secure. On an independent L1 or a sidechain, you are much less secure. On a validium, you're somewhere in the middle."