
Bitcoin Sidechains - amouat
http://avc.com/2014/10/sidechains/
======
vog
This is not really a new idea.

If you take this a bit broader, you could not just link other crypto
currencies to Bitcoin, but can use it to timestamp any types of data. For
example, in mid-2013 I created a "public ledger" service based on Bitcoin:
[https://vog.github.io/bitcoinproof/](https://vog.github.io/bitcoinproof/) (HN
discussion:
[https://news.ycombinator.com/item?id=5796935](https://news.ycombinator.com/item?id=5796935)).

And even that wasn't really new. It dates back to forum entries and similar
projects from 2011 and possibly earlier.

So while I like the basic idea of Sidechains, I don't like their presentation
in the article as something totally new, without giving any credit to the
history they build upon.

~~~
wslh
Prior related invention in 2012 by my co-founder:
[https://bitcointalk.org/index.php?topic=91843.0](https://bitcointalk.org/index.php?topic=91843.0)

Limitations of this side-chains:

\- Can't use proof-of-stake

\- It requires many changes in the Bitcoin reference client

\- It's not very clear if you can increase the frequency of blocks in the
side-chain

~~~
nivertech
Can you please explain why PoS is incompatible with sidechains?

~~~
drcode
IANA blockchain expert, but this is my understanding:

You need to be able to show a "proof" to the bitcoin main network that the
coins are being transferred back to the bitcoin blockchain. This proof needs
to be hard to generate, which pretty much makes POW mandatory.

~~~
dllthomas
Do you know if that's 1) "must use POW for the transaction that burns the
sidecoins", 2) "must have proof of enough total work in the sidechain atop the
block in question", or 3) "must only have POW blocks in the sidechain"?
Superficially, 2 seems most likely.

------
kristofferR
This is a great, yet simple, explanation of sidechains:
[http://gendal.wordpress.com/2014/10/26/a-simple-
explanation-...](http://gendal.wordpress.com/2014/10/26/a-simple-explanation-
of-bitcoin-sidechains/)

------
adeptus
I don't understand how sidechains will be economically feasible given there is
no monetary incentive for anyone to work on a sidechain, as opposed to an alt-
coin, where speculators "invest" in X new currency and early adopters (aka.
developers) benefit.

~~~
wmf
Sure, if you consider pump-and-dump scams to be the baseline then any honest
business doesn't look economically feasible.

------
dmix
I'm curious what this means for Ethereum. Although admittedly I've never
really understood what Ethereum was planning to do. But I assumed it was the
same idea as sidechains?

~~~
drcode
It's very hard to know whether sidechains will help or hurt ethereum... You
could put an ethereum clone in a sidechain, although there'd be downsides to
this... It's hard to know how mining would work for such a chain, it would
have to work differently than either bitcoin or ethereum mining ("merge
mining" alone won't work due to the fact that ethereum has 50x the block rate
as bitcoin) and sidechains have extra mining costs that need to be obtained
somehow (such as through a "wealth tax" on unused accounts).

On the other side, ethereum itself could host bitcoin sidechains as contracts,
adding value to the ethereum network.

My own best guess is that sidechains will be a net positive for ethereum
adoption, but a net negative for the ethereum currency market cap.

~~~
untilHellbanned
> My own best guess is that sidechains will be a net positive for ethereum
> adoption, but a net negative for the ethereum currency market cap.

I don't see how adoption and market cap can go in opposite directions.

~~~
drcode
Contracts will pull in bitcoin using sidechains, but "gas" will use the ether
currency. Ether market cap would decrease because the coins aren't locked down
in contracts, but in active circulation.

Basically, it means you're decoupling the "store of value" and "medium of
exchange" aspects of money, using bitcoin to "hold value" and ether to do the
rest.

------
cs702
Couldn't agree more. I would add that the many cryptocurrencies that have been
created since Bitcoin (Litecoin, Dogecoin, Peercoin, etc.) are evidence of
_widespread unmet demand_ for sidechains, which fulfill the need for
cryptocurrencies that:

* have global mining infrastructure, liquidity, and network effects comparable to Bitcoin; and

* allow for fail-fast, iterative, distributed experimentation, which is necessary for rapid innovation.

A lot of people want this!

------
williamcotton
Step through this with me...

I've got 5 Bitcoins. I transfer all of them to a brand new sidechain for an
initial 50 Sidecoins. This Sidecoin sidechain has a different block reward.
Let's say 3 weeks go by. Now there are 10,000 total Sidecoins. Let's say I've
got 2,000 of those Sidecoins. How do I convert them back to Bitcoins? Can I
only transfer 50 back? Can I transfer all 2,000 back? What are they worth in
Bitcoin now?

\---

jdmichal's response:

You freeze your 2000 Sidecoins. That is then converted into some number of
Bitcoins, the conversion of which is entirely dependent on how the Sidecoins
work. (Likely the ratio of the number of Bitcoins dedicated to the sidechain
to the number of existant Sidecoins.) A transaction is then submitted to the
main chain, submitting the required proofs that you have frozen / destroyed
the appropriate amount of Sidecoins to unfreeze a number of Bitcoins.

If the number of Bitcoins trying to be created exceeds the number committed to
the sidechain, the transaction will fail. Otherwise, it will succeed.

\---

So the main Bitcoin network needs to be aware of and to be able to analyze the
entire Sidecoin sidechain?

So if only a total of 5 Bitcoin were ever sent/frozen to the sidechain, then
only 5 Bitcoin can ever be retrieved/unlocked?

So when the Sidecoin sidechain was first created each Sidecoin was worth 0.1
Bitcoin. So after three weeks there are now 10,000 Sidecoins, each worth
0.0005 Bitcoin? Is this a general rule for sidechains? Why did you say
"likely"? Is that because none of the details of sidechains have been worked
out?

Transactions on sidechains are mined in to blocks, right? So if someone mined
8,000 Sidecoins of those 10,000, they've now got 4 Bitcoin? If someone then
sent/froze an additional 5 Bitcoin to the Sidecoin sidechain, then that would
generate 10,000 new Sidechains?

So the incentives to mine Sidecoins would correspond to the total number of
Bitcoin that has been sent to the sidechain? If 5 Bitcoin were only ever sent
to Sidecoin, then all the mining in the world could only ever lead to a total
of 5 Bitcoins?

So for Sidecoins to be economically viable and therefor functional, someone
would need to be constantly injecting Bitcoin in to the sidechain, right?

~~~
gwern
> So if only a total of 5 Bitcoin were ever sent/frozen to the sidechain, then
> only 5 Bitcoin can ever be retrieved/unlocked?

Yes; anything else would be madness. (If you got back less than 5btc, it would
be a huge tax on any usage of creation of sidechains; if you got back more
than 5btc, well, there's gonna be problems.)

> So for Sidecoins to be economically viable and therefor functional, someone
> would need to be constantly injecting Bitcoin in to the sidechain, right?

Yeah, assuming the sidecoins aren't being used up by miners somewhere. You
have to pay for the security somehow; miners aren't charities - the
transaction fees have to come from somewhere. In Bitcoin, the transaction fees
currently come in the form of inflation+transaction fees, but probably
different sidechains will pick different forms of payment depending on their
goals.

~~~
williamcotton
I'm not sure what you mean by "assuming the sidecoins aren't being used up by
miners somewhere". Could you go in to detail?

What do you mean by "different sidechains picking different forms of
payment?".

Doesn't all of this basically guarantee that the mining rewards of Sidecoin
need to be exactly matched to Bitcoin? If so, what's the point of sidechains
at all?

------
jaunkst
[http://www.blockstream.com/sidechains.pdf](http://www.blockstream.com/sidechains.pdf)

------
higherpurpose
How do sidechains affect the security of Bitcoin and/or the sidechains
themselves? Will Bitcoin open itself to a much wider range of attacks once it
accepts sidechains? Will the sidechains be inherently much less secure than
Bitcoin's blockchain?

~~~
kristofferR
The security of Bitcoin itself/the blockchain won't change at all if the
functionality for sidechains is implemented.

However, the sidechains themselves (and the Bitcoins pegged to them) will only
be as secure or vulnerable as their implementation and usage is. The security
of a sidechain, is as far as I'm aware, the exact same as it would be if the
sidechain was an independent altcoin.

~~~
drcode
It is correct on first order that Bitcoins is isolated from bugs in
sidechains. However, a good case can be made that sidechains could lead to
more mining centralization, which is always the elephant in the room with
Bitcoin.

~~~
kristofferR
Wouldn't it be the exact same centralization situation if the sidechains in
question instead were developed as altcoins? The altcoins/sidecoins that use
merge-mining may lead to centralization while the ones that do seperate mining
probably won't?

Or is there any difference?

~~~
drcode
The problem is that bitcoin mining has very slim margins now, and if
sidechains happen, "mining difficulty" will go even hight and mining
sidechains will be pretty much be mandatory for ROI.

However, mining many sidechains requires significant computing resources.

------
uptown
Are there any clients that support 0 BTC transactions?

~~~
hnrandom
No. This is to prevent DoS attacks on the network. Each transaction must
include a fee.

~~~
roasbeef
Transactions are not required to include a fee. Zero fee transactions are
fine, and will make it into blocks rather quickly if they have a sufficiently
high priority (input age).

The DoS prevention measures are enacted by the enforcing the dust limit (min
transaction relay fee), based on the cost to the network to spend the coins.

------
chm
I really don't get what's the big fuss about sidechains. It's a totally
obvious next step in blockchain technology. The implementation is what's
important.

------
Cyther606
An acute interest in blockchain-based securities trading led to my modifying a
short Python script that would label fractions of a bitcoin as company stock.
This was years ago, but I’ve kept watching for developments in this space ever
since. I was convinced someone would eventually do it better.

Sidechains have been on my radar for about six months. What you should know
about sidechains is it’s being developed by a company called Blockstream, and
that it faces real security challenges compared to other approaches.
Sidechains is seemingly marketing itself as a panacaea to everything Bitcoin
wants to do but can't. However, for me, this has always meant blockchain-based
stock trading. I personally doubt Bitcoin needs faster block times or ring
signatures for additional privacy. In my opinion, sidechains and Blockstream
is mostly a Bitcoin 2.0 startup.

The fact is, you can send BTC to Havelock.com today, which is a shady off-
chain Bitcoin stock exhange. Everyone is perfectly capable of depositing BTC
at Havelock or a futures exchange. Your money may get stolen, or the site may
suddenly close its doors. Problems such as this are what sidechains, and other
projects some of which I’ll delve into below, are attempting to solve. That
is:

1\. There is nascent demand for Bitcoin stock trading, futures, options and
derivatives.

2\. Off-chain service operators who provide these services today too often
steal the money.

3\. Off-chain services are forced to operate in the clear to develop trust in
the marketplace, under their real identities, which invites regulators to shut
them down.

Open Transactions (OT) is competing with sidechains to solve this.
Specifically, OT voting pools prevent off-chain service operators from
stealing all the money. Since they can’t steal the money, services like
Havelock.com could safely operate over Tor, and it wouldn’t matter as much who
was behind the website.

With OT, you can use basic web development skills to launch a trustless
Bitcoin stock exchange platform without restriction. The only downside is
users still ultimately need to trust the web service developers not to be
corrupt, which is a sticking point. Society isn’t ready to trust stock and
futures exchanges operating over Tor for example, because there would be too
much room for games. You could launch clearnet services with OT integration,
though, it’s just that you couldn’t do anything innovative without the SEC
shutting you down.

Sidechains at its core solves the service operator trust issue, but it has new
trust issues of its own doing. The basic idea of sidechains is, instead of
creating Havelock.com, you bake Havelock.com into a blockchain, and then you
would peg that new blockchain to Bitcoin’s blockchain so that Bitcoiners can
use your service without having to buy an altcoin. Compared to OT, it’s quite
frankly rocket science, which is a downside. In addition, sidechains don’t
share Bitcoin’s security model, so they may actually offer less security than
a traditional web service with OT integration.

51% attacking Bitcoin doesn’t allow you to steal BTC. But with sidechains,
from what I understand, 51% attacking _does_ allow you to steal BTC. [1]

As much as I want sidechains to work, I’m not convinced Bitcoin miners are
altruistic, which is a hand-wavey assumption Blockstream makes about sidechain
security. They think Bitcoin miners won’t attack sidechains because the miners
will know they make more money over the long term by being honest. We have
heard this before about large mining pools in Bitcoin. We’ve been told a
desire to maximize long term profits is the reason no Bitcoin mining pool
would ever exceed 51% of the network, but GHash.io has proven this theory
definitively false.

As such, I’m relegating sidechains to the same place in my heart as Open
Transactions. I’m waiting to see both approaches launch before I’m convinced
you don’t need something like Counterparty to do a blockchain-based NASDAQ or
Intrade. [2]

[1]:
[https://pay.reddit.com/r/Bitcoin/comments/2k01du/peter_todd_...](https://pay.reddit.com/r/Bitcoin/comments/2k01du/peter_todd_on_twitter_the_sidechains_paper_is/clgpjpx)

[2]: [http://www.wired.com/2014/10/overstock-com-assembles-
coders-...](http://www.wired.com/2014/10/overstock-com-assembles-coders-build-
bitcoin-like-stock-market/)

