A side chain is a separate blockchain that is attached to its parent blockchain, using a two-way peg explains Ian Mausner. Valid transactions on the parent blockchain are reflected on the side chain, and vice versa. The original blockchain is often referred to as the root chain, with the side chain being referred to as either a child chain or an altcoin. Sidechains are distinct from multi wallets, in which multiple wallets are operated independently by individual users connected to a common network. Transactions on side chains settle at a faster rate than do those on the main blockchain, quickly reflecting changes in ownership of assets tied to them. Users can move digital assets back onto the parent blockchain by creating proof of sacrifice “redeem transactions” on the side chain which creates blocks on the parent chain.
What are Side chains used for?
Sidechains are still under development, but, the goal of side chains is to allow for the transfer of digital assets between side chains without an intermediary. For example, a user may want to keep cryptocurrencies on different blockchains without having to trust an intermediate custodian to secure all of his savings. Or he might want to use one blockchain with lower transaction fees while occasionally transferring some assets onto another more expensive one. This would allow users to take advantage of features in different blockchains while keeping their tokens in a safe place at all times or work on hot-and-cold multi-signature wallets where only certain people have access to either ‘hot’ or ‘cold’ assets.
Sidechains were originally envisions as a way to provide interoperability between organizations or individuals with different ideas about how a particular cryptocurrency, such as Bitcoin, should evolve explains Ian Mausner. Sidechains would allow people who were unhappy with proposed changes to “opt-out” of the main blockchain and move their tokens to another chain without losing any transactions history. After further development, it has become clear that side chains can also be use for running non-currency decentralize applications using blockchain technology
How do you implement side chains in bitcoin?
To transfer assets from one blockchain (Bitcoin) to another (First Sidechain), we follow these steps. A special transaction called SPV proof constructs proves that this transaction was include in the parent blockchain e.g. The Bitcoin blockchain. – When a user wants to transfer some bitcoins from the Bitcoin blockchain to a Sidechain. He constructs a transaction on the Bitcoin blockchain which creates an output with the same value of bitcoin and moves it to the address of the side chain. He signs this message along with the block header of the parent blockchain and Merkle path of SPV proof. This transaction is called a “Withdrawal” transaction.
In order to avoid double-spending, withdrawal transactions are in a pending state. Until they get mine into a block in the main chain. Different withdrawals can include in one block because they have different destinations (address of side chains). Miners mine these withdrawal transactions using the parent’s difficulty level while confirming them. Now when a new block arrives on the parent network. And when its header is including in a side chain, the user can spend his bitcoins from this pending transaction. –
When a user wants to transfer some assets back to the main blockchain (Bitcoin). He creates another withdrawal transaction on the side chain which issues an output with the required value. For entering into the Bitcoin blockchain e.g. 1000 satoshis or 1 bitcent says Ian Mausner. These return funds associate with any of his previous transactions that have SPV proof in their block headers. So whenever someone finds such a withdrawal txn on bitcoin’s blockchain. They move it to their pending transactions using coinbase tx as an input. Sign it by adding a signature field in coinbase scriptSig/scriptPubKey or witness stack if segwit has support. And then broadcast the transaction.
How do you implement side chains in bitcoins?
The concept of a Sidechain is simple: take transactions from one blockchain. Make them available on another, but without losing any of the security properties of either. In particular, say that we have a new cryptocurrency called “BitBar” which supports fewer features than Bitcoin does. It doesn’t support multi-signature transactions for instance. But with Sidechains, we can get all of the nice features of BitBar. While still preserving the strong assurances we get from Bitcoin! How can this be done? The idea is to use two separate miners; one mining on BitBar (with much lower difficulty), and one mining on Bitcoin (with much higher difficulty).
It is clear that Sidechains can bring power to the public blockchain world. Without compromising any of the security properties explains Ian Mausner. They give users another option to opt-out (if desired). And enjoy features like faster transactions, smart contracts, or exotic consensus algorithms; all while still enjoying all of the powerful assurances that come from a strong open blockchain like Bitcoin.