An important sidechains whitepaper (http://www.blockstream.com/sidechains.pdf) was published a few years ago:
You’ll know this is a seriously eminent group of authors if you’ve followed Bitcoin for any time.
The whitepaper is quite technical and describes a way to build “pegged sidechains”. Sidechains as an idea have existed and had been floating around for quite some time now. The key breakthrough was outlined earlier in the year (http://letstalkbitcoin.com/e99-sidechain-innovation/). But this paper offers a simple but deep explanation of just what sidechains are, what they can be used for and why they are so awesome, and it has attracted a lot of comments. Ever since the concept was first publicly discussed in the media back in 2014 (https://letstalkbitcoin.com/e99-sidechain-innovation), the idea of sidechains is something that has garnered a large amount of hype in the Bitcoin community.
But what are sidechains and why should anybody care?
They are a Mental Model for Bitcoin
Knowing how Bitcoin itself works is the key to understanding most innovations in the Bitcoin space. Most people don’t really understand how it works and, as a result, they have a faulty mental model.
I came up with an analogy for Bitcoin earlier in the year (https://gendal.wordpress.com/2014/03/29/welcome-to-bitcoin-island/) to help with this. The analogy is based on thinking of Bitcoin “unspent transaction outputs” as parcels of land. Some people hated the analogy. However, I still think it has value.
But I’ll skip the analogy in this piece and net it down to the basics.
First, you need to clear your head of anything related to payments, currency, or money. Also, the mind-bending secret of Bitcoin is that there actually isn’t a ledger, so clear your head of the word ledger, too. The transactions and blocks of transactions are the only data structures that matter. And if sidechains are going to make sense, it’s important to get this clear in your head.
You are saying this when you “move” Bitcoins:
- Hi everyone! I would like to move these specificBitcoins, please.
- I am entitledto move Bitcoins and here is the
- Here is how the recipients will prove that theyare entitled to move Bitcoins.
The critical three parts of a Bitcoin transaction
It is important to note that there are a few important points here:
- Bitcoins are not perfectly fungible. When you move (or spend) them, you’re spending some specific
- In order to spend Bitcoins, you have to prove you’re entitled to do so – you do that by providing the solution to a challenge that was laid down when Bitcoins were sent to you in the first place. This is the challenge: “You need to prove to the world that you know the public key that corresponds to a particular Bitcoin address. You also need to prove that you are in possession of the corresponding private key”. However, it can also be much more sophisticated than that.
- You lay down the challenge for the nextowner when you send Bitcoins somewhere – you’ll simply specify that they need to know the public and private keypair that correspond to the Bitcoin address the coins were sent to. However, it can also be much more complicated than that. You don’t even know who the next owner is. It’s just whoever can satisfy the condition.
Keep repeating these steps to yourself until they sink into your mind!
Great. The “grammar” of a Bitcoin transaction is clear now: “Here are the Bitcoins I want to move. Here’s the proof I’m entitled to. Here’s what the recipient has to do, in turn, if they want to spend them”.
This transaction is published into the network and it will eventually find its way into a block. Everybody can be pretty sure it won’t be reversed after other blocks have been built on top. So what more do you need?
The Core Bitcoin “Grammar” Works Pretty Well, Mostly…
This three-part structure to a Bitcoin transaction works pretty well. It turns out that you can do some really interesting things with it. For instance, the “not-entirely fungible” feature can be used to “tag” coins, which is the basis of the “Smart Property” (https://en.bitcoin.it/wiki/Smart_Property) and “Colored Coins” (http://coloredcoins.org/) worlds.
However, there are some issues, such as:
Transaction Transfer Conditions
As I already mentioned, sophisticated rules can be built into Bitcoin transactions to specify how ownership is proved. However, the Bitcoin scripting language is deliberately limited. Also, many ideas in the Smart Contracts (http://en.wikipedia.org/wiki/Smart_contract) space are difficult or impossible to implement. So, to explore these ideas, projects like Ethereum (https://www.ethereum.org/) are building a completely new infrastructure.
The “three-part” transaction structure is very general. However, it only allows you to transfer ownership of Bitcoins and some people would like to transmit richer forms of information across these types of systems. For instance, a decentralized exchange needs a way for users to place orders, and projects such as NXT, Counterparty, Mastercoin, and others either build layers on top of Bitcoin or use completely different codebases to accomplish their goals.
Bitcoin’s block interval is ten minutes. This means that it takes around ten minutes on average for a new transaction to find its way into a block, even if it pays a high fee. For some people this is too slow. That’s why they have experimented with alternative cryptocurrencies, based on the Bitcoin code-base, which employ faster block intervals.
One-Size-Fits-All Security Model
You get the same security guarantees, whether you’re moving 0.01c or $1bn across the Bitcoin network, and you pay for this in fees and time. Are you prepared to trade safety for speed? Today, sending the coins to a centralized wallet provider, whom you must trust not to lose or steal your coins is your only real option. You can then do all the transactions you like on their books, with their other customers. Also, you never need touch the Bitcoin blockchain. However, all the benefits of a decentralized value-transfer network are now lost for you.
One-Size-Fits-All Security Model Doesn’t Help If the Size Doesn’t Fit You!
Now, it is very risky to make experimental or rapid changes to Bitcoin. That’s why the change happens slowly. So you have a problem if the one-size-fits-all architecture of Bitcoin doesn’t suit a particular use-case. You either have to use (or build) a centralized service, which brings new risks, or use an entirely different cryptocurrency (or build one!).
This is very inconvenient and it creates risk and fragmentation and slows the build-out of infrastructure, services, and products.
Centralised Wallet Providers as a “Poor-Man’s Sidechain”?
There is a very interesting observation that we can make. What would happen if you send Bitcoins for safekeeping to a centralized wallet such as circle.com?
- You send Bitcoins to a particular Bitcoin address.
- Your coins appear inside your circle wallet. They are out of your control on the blockchain.
- You might send your coins back out of your circle wallet to a Bitcoin address you own at some point in the future.
- Some of the coins are under your control on the Bitcoin blockchain again!
Circle is a black box, from the perspective of the Bitcoin network. You had some coins and you sent them to a specific address. Some things happened that Bitcoin couldn’t see, and at some point later, you had control of some coins again. It’s as if someone had moved those coins from Bitcoin to somewhere else and then back again.
The Sidechains Insight
The key idea behind the sidechains concept is:
What if Bitcoins could be sent not only to centralized services, addresses, and individuals but to other blockchains?
What if there’s a Bitcoin-like system out there that you would love to use. Maybe it is Etereum or Litecoin. Maybe it is something brand new. Maybe it has a richer scripting language and a faster block confirmation interval. It doesn’t matter. The point is that you’d like to use it. However, you would rather not have to go through the effort and risk of purchasing the native tokens for that platform. You already have Bitcoins, so why can’t you use them?
These are the sidechains ideas:
- Send your Bitcoins to a specially formed Bitcoin address, which is specially designed so that the coins will now be out of your control, and also out of the control of anybody else either. Coins are completely immobilized. They can only be unlocked if somebody can prove they’re no longer being used elsewhere. In other words, you’ve used the core bitcoin transaction rules to lay down a specific condition that the future owner needs to fulfil in order to take control.
- You send a message to the other blockchain – the one you wanted to use once this immobilisation transaction is sufficiently confirmed. This message contains a proof that the coins were sent to that special address on the Bitcoin network, that you were the one who did it, and that the coins are therefore now immobilized.
- If the second blockchain has agreed to be a Bitcoin sidechain, it creates the exact same number of tokens on its own network and gives you control of them.
- So it’s as if someone has transferred your Bitcoins to this second chain. They’re immobilized on the Bitcoin network. And remember, we haven’t created or destroyed any, we have just “moved” them.
- You can now transact with those coins on that second chain, under whatever rules that those running that sidechain chooses to implement.
- Maybe transaction scripts are “turing complete” and blocks are created faster on that sidechain. Maybe fees have to be paid to incent those securing that sidechain. Who knows. The rules can be whatever that chain chooses to implement, but the only rule that does matter is that the sidechain agrees to follow the convention that if you can prove you put some Bitcoins out of reach on the Bitcoin network, the same number will pop into existence on the sidechain.
- The logic above is symmetric, so, whoever is holding these coins on the sidechain can create a special transaction on the sidechain that immobilises the bitcoins on the sidechain, which would allow them to send coins backto the Bitcoin network. Coins will disappear from the sidechain. They will become available again on the Bitcoin network, under the control of whoever last owned them on the sidechain.
Sidechains use the standard bitcoin “three-step” transaction to immobilise Bitcoins while they are “on” the sidechain
So, to repeat, to move coins out of reach, we’ve used standard Bitcoin transaction functionality. We then prove to a second, unrelated chain, that we’ve done this, and when we’re done, whoever owns coins on the sidechain can do the same thing and send them back to the bitcoin network.
This means that developers get the opportunity to experiment with different types of cryptocurrency rules. The best thing is that they don’t need to create their own currency.
It is Now Possible to Do Some Extremely Interesting Things in the Bitcoin Space
We now have a way to move coins from Bitcoin onto another platform (a sidechain) and move them back again, and that’s pretty much what we do when we move them to an exchange or a wallet platform. But the difference is that the “platform” they’ve been moved to is also a blockchain. This means that it has the possibility of decentralised visibility, security and to gain from other innovation in this space.
For instance, you could imagine a sidechain that is “mined” only by one company, which would be identical to a single-company wallet, but with full visibility of transactions.
Moreover, you could imagine a sidechain that is mined by 100 different companies in a loose federation, which are not totally decentralized, but more difficult to subvert or censor than if it were just one.
There are many other possibilities as well. The key is that you can build these services, products and experiments without also needing to fall back into the old centralised style or create a new currency.
I look at sidechains as an architecture for building semi-decentralised services and products for Bitcoin that were simply not possible before.
It is important to note that there are some serious problems with the scheme and there are a few big hurdles to jump. Peter Todd has raised doubts about how secure it might be (https://www.reddit.com/r/Bitcoin/comments/2k01du/peter_todd_on_twitter_the_sidechains_paper_is/clgpjpx). He also said that it might require a one-off change to Bitcoin.
But it’s still early days and who knows what the future holds and what other innovations this technology will bring. I am sure that at this moment we can only imagine the visible tip of the iceberg.
Sidechains go a significant way to helping create a connected financial digital ecosystem and I’m looking forward to watching this space develop.