11

I am struggling to understand the concept of "side-chains" that's discussed a lot lately, but never trully explained.

How I understand "side-chain": it's an altcoin, with a separate blockchain, with a separate PoW rules and mineres and mining rewards and so on, that has value somehow tied to bitcoin, and that can be later exchanged back "into" main bitcoin blockchain.

I struggle to understand two things though.

  1. How will a bitcoin miner/bitcoin node check, that the side-chain transactions were correct (in the sense of "not double-spent") and that they are on the longer "altcoin" chain? Does the bitcoin node also have to download all the other chains? Isn't that strange?

  2. How is the mining reward solved? What if this side-chain has some crazy rules (like quark) for mining 90% of the existing supply in a few days? How does the money supply even make sense with value interchangable between BTC and side-chain?

It's possible I got the basics totally wrong, but I never got past the enthusiasm to some real explanations, so I am asking here.

8

As Mikka explains, sidechains don't need to create their own currency, using bitcoins in the sidechain is precisely the point of two-way peg (there's no reason why an altchain with its own currency, like say litecoin or ethereum, couldn't support 2-way peg and also become a sidechain though). Also, take into account there's several possible ways to implement sidechains. I will talk about the most basic one.

First some bitcoins are moved to a "pegging pool" for each sidechain and get locked there on a script until someone provides a scriptsig that satisfies some of them. The user uses that "proof of suspension" to get the same quantity of btc in the sidechain. To prevent reorg risks, there must be a quieting period of X blocks in btc before the coins are accepted in the sidechain, say 100 bitcoin blocks. After that, the coins can be send normally (or with the special rules the sidechain may have). At some point, a new owner wants to move the bitcoins back to the main chain. To do that he produces a "proof of burn/resumption" transaction (that needs to have a legacy format the bitcoin chain can understand). Then again there's a quieting period of X blocks in the sidechain before the coins can be claimed in the main chain.

To claim the coins back on the main chain, the user needs to provide the all the headers of the sidechain from the last time coins were withdrawn from the pegging pool to the block containing the resumption transaction (since this could easily become too long, even bigger than a whole bitcoin block, a compression mechanism is needed; I won't describe this but I'll just say that relies on "lucky blocks" and once implemented would be generally good for headers-first synchronization), the merkle path to that transaction, plus the additional X quieting blocks on top of it. This way we know how much work this chain has and that the transaction is included in that chain and buried with X blocks. The bitcoin network doesn't need to know about the validity of the chain provided, only about the work. In that sense 2-way peg has a level of security equivalent to SPV because the chain with more work is trusted without fully validating it.

But as you say, how does the bitcoin network knows there's no other longer chain somewhere else? It doesn't, so something else must be done to prevent sidechain miners from stealing the coins by just providing an invalid chain with enough work. So, yes, we need yet another quieting period during which anybody can submit a "proof of reorg" with a chain longer (more work) than yours which doesn't contain your resumption transaction, invalidating your claim and making you start again. So to steal coins an attacker must to control 51% or more of the sidechain's hashing power for the last quieting two quieting periods, the last of which could be set to days.

On the reward question, again, there's several possibilities. The simplest approach would be for the sidechain to live on transaction fees like bitcoin itself will have to do in the future. Another possibility is to distribute the fees between several future blocks to have a more predictable and constant reward. Another probably less popular approach is to have a demurrage fee on the bitcoins on the sidechain. I'm sure there will be more proposals.

You can read the original thread on 2-way peg here:

http://sourceforge.net/p/bitcoin/mailman/message/32108143/

There have also been many discussions on #bitcoin-wizards :

http://download.wpsoftware.net/bitcoin/wizards/

  • 1
    Hey! First time I am reading something more concrete about sidechains. Thanks – Karel Bílek May 24 '14 at 10:03
  • Also, pardon for the skepticism, I don't think bitcoin will ever got to a phase where there are no transaction fees. I don't believe Bitcoin will be here in, say, 50 years, the same as technology from the 60s is not with us today. But that's not the point of your answer. :) – Karel Bílek May 24 '14 at 10:05
  • 2
    @Karel I think you are quite wrong! Unix/Linux for example a technology from the 60s is still with us and in fact is the underlying core technology of the whole internet. And it will stay!!! – user21763 Jan 5 '15 at 9:26
  • When you mention "Pegging Pools". Don't these pegging pools require a 3rd party or service to operate it as the sidechain has to report to these pools in order to release the BTC funds? – Patoshi パトシ Apr 27 '17 at 22:28
1

Sidechains don't mine new "sidecoins" themselves. they get funded by bitcoins being transferred to the sidechain. tx fees in the sidechains do exist, however.

  • So.... the side-chain miners are paid only with tx fees? That's strange. – Karel Bílek Apr 14 '14 at 0:52
  • I am not accepting your answer since it's not a full answer (no offense). – Karel Bílek Apr 14 '14 at 0:53
  • Why is that strange? Bitcoin miners are also only paid transaction fees (with a special exception for the next 125 years). – trichoplax Apr 14 '14 at 16:57
  • That's a pretty long special exception. – Karel Bílek Apr 25 '14 at 2:40
  • So in essense BTC will just become virtual-BTC on the sidechain? – Patoshi パトシ Apr 27 '17 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.