Image Credit: LuckyStep/Shutterstock
Security is an important issue in blockchain, and the digital world is too narrow to explore in the digital world. Prior to attacks, researchers keep on adding up new security layers over the blockchain network, and practically, it keeps on adding new scalability issues. To overcome this vulnerability, a new concept is introduced and is known as “sidechain”.
Sidechains are a new concept in the blockchain industry and very well in the developing mode. It’s a new blockchain developed as a separate one attached with the original blockchain system. Well, the sidechain is attached or connected with the normal blockchain, and thus two blockchain networks are now available in a single system – main blockchain & sidechain. Connected via a 2-way passage, and the main objective of this new concept is to validate the transaction without affecting the whole system.
One can call it a simple method to check the validity of transactions or a particular block of the transaction, and the complete blockchain won’t have to be validated. Similarly, there are many advantages of using a sidechain, and we’ll explain about all these concepts in this article.
Connecting sidechain & main chain!
We’ve mentioned how the two blockchains got connected to each other, and it’s a two-way passage. There are possibly two methods to connect these two chains – 2-way peg and a centralized path!
The working process of sidechain isn’t that complicated. Usually, with this 2-way passage, the assets can be easily interchanged between the two chains. Usually, the two-way peg is the decentralized way, and it uses a special method called – “Simple Payment Verification” or simply “SPV”.
It’s the best method to validate a transaction, and the ownership of assets gets exchanged via this 2-way peg. The transfer of the assets can be done from either side, i.e., from the main chain to sidechain or from sidechain to mainchain. Well, the best scenario will be the transfer from the main chain to the other connected sidechains. The reason behind this is because in normal case we implement a sidechain to overcome an existing drawback of the main chain. Here is the depiction of such a decentralized system,
The transfer process usually follows the below process,
- The tokens are not exactly transferred to the sidechain directly.
- In fact, initially the tokens are transferred to a special address, and then, locked.
- When the assets are locked in this particular address, then it is categorized under the “un-spendable” tag.
- Once the transaction is completed, SPV confirms it.
- A small confirmation time is needed to complete this transformation.
- With a small delay, an equal amount will be transferred to the sidechain.
- Well, the reverse process can also be carried out from sidechain to the main chain carrying out the same process.
- Now the tokens or assets are available to spend and is unlocked in nature.
It’s the perfect way to make the transfer without a centralized federation. Let’s make it more simple using a user case,
John wants to transfer 2 BTC from his Bitcoin network to another blockchain. In the normal world, the best way to perform this task is to send it from the existing wallet to the other with a transaction fee or some other existing charges. Or else trade the Bitcoin with that of another cryptocurrency (existing one or a new one). Well, that’s the risk part, you might not have enough trust to invest in the new one, and perhaps you need to transfer BTC to the new network. So, what to do now? Are there any options available to send 2 BTC and use it in the other network?
Sidechain is the new method to make this happen, and it’s simple & reliable. You can send this 2 BTC or any amount in the Bitcoin network to the new one and vice versa.
- Initially, the unspent Bitcoins of John's wallet is checked and confirms the Bitcoin availability.
- Previous transaction history is taken into consideration while checking the unspent Bitcoins.
- Now confirmation has to be made from the Bitcoin holder that the Bitcoin belongs to John.
- Now that John has 2 BTC and confirmed the wallet belongs to him, he is ready to send it.
- A special address is generated to transfer 2 BTC.
- The amount is transferred to that particular address, and the sidechain has to approve and validate it.
- The 2 BTC sent to the address is locked and cannot be used unless it is approved in the sidechain.
- After a small delay (the approval time interval) the transfer gets approved in the sidechain.
- Now, 2 BTC will be unlocked and is readily available in the sidechain network.
- The Bitcoins are now available only in the sidechain network but not in the Bitcoin blockchain.
- John can spend this 2 BTC as per his needs.
- John can also send this Bitcoins back to the Bitcoin network (reverse transfer is allowed).
- And once transferred to the Bitcoin network, this won’t be available in the side chain.
A perfect way to send to and fro, Isn’t it?
Now that we understood all about the decentralized part, let’s move on and check out the centralized sidechain system.
Federation/centralized sidechain system
What if there is a centralized team to maintain the flow of sidechain network? An intermediate team will be there to check the transfer between sidechain and the main chain known as “federation”. One can compare this centralized sidechains with that of an exchange platform, a back-end team to regulate things.
A group of members (servers) forms a central trusted party, a federation who are entrusted to control both the lockboxes. These trusted parties will be the centralized authority between the two blockchains. The transfer of Bitcoins or tokens or any assets need to get verified, and then only the transfer gets completed. No specific protocols are implemented in the system, and this part is customizable. However, a set of signatures is required to make a transaction valid (say about 50% of federal members).
Let us explain this with the above example itself, the 2 Bitcoin transfer! The only difference in centralized sidechain transfer from that of the above-decentralized system is, here a centralized team will be there to check all the process. If John sends 2 BTC from the Bitcoin blockchain to another network, a confirmation period will be there. Here no SPV proof will be available and is replaced by the federation.
So, when a sidechain is technically implemented in a blockchain system?
A blockchain network is a big network with multiple connections and with such wide connections, there occur way too many transactions. A blockchain with too much transaction needs a lot of validations and nodes, and this may result in a scalability issue. The other factor is the loss of speed and accuracy due to such a wide network. The rules may cause some difficulties like,
- Miners might be in great stress to validate every transaction of the network.
- A new transaction will be in the unconfirmed pool or in simple words “pending mode” unless it is validated.
- The pending status may cause business delay and affect it badly.
- Changing the consensus algorithm rules is not practically perfect for this scenario.
Other instance will be the IOU’s or other assets which you own might not be available for transfer. It owns a value in another blockchain, but you are unable to trade it.
Basically, there are limitations in the current system, and sidechain opens up a new world of opportunities to the blockchain world like,
- increase the size of the blocks alongside the main chain.
- An independent separate network that won’t affect the changes to one another.
- The speed of the transactions can be improved, i.e., the flexibility improves a lot.
- A federated team to maintain a new strategy in the business through advanced ideas (if necessary).
- Experiment new models like new smart contract rules etc.
- Improve the block intervals as well as traffic inside the system.
- Merging mining – mine two cryptocurrencies in a single system without wasting any hashing codes (nonce).
- Exchanging tokens and other assets between the blockchain.
- There can be one or more sidechains in a network.
- The scalability issues can be minimized to a certain level.
The concept is perfect, isn’t it? You may call the above points as the advantages or the benefits of using this new technique.
We have mentioned the two-way peg part earlier in this article, what if some intruder gets into the sidechain or main chain? Any issues in one particular chain won’t affect the other sidechains. But the intermediate two-way peg may lose its value. Well, there are certain conditions for a valid sidechain, and they are as follows –
- Assets to send between the main chain and the sidechain & vice versa.
- The transfer should not be affected by any external dishonest party.
- The transfer of asset or tokens or whatever it is, they must be done in complete but not partial.
- Any issues in one blockchain must not affect the other blockchain.
- Sidechain should be fully independent of each other.
- Inactive users in the blockchain must not have the ability to track the working process in the corresponding sidechain network.
This might be a new revolution, and a parallel blockchain can minimize the traffic issues by any means. Still, the technology is in progress, and the future digital market is going to be a massive experience.