Liquid sidechains and Bitcoin development

The Blockstream guys – the ones working on a commercial application of the Lightning Network I told you about the other day – have announced the upcoming launch of Liquid, the first commercial application of the sidechain concept. This is exciting, as sidechains have been talked about for a while now, but have yet to be put to practical use. And the use of Liquid is indeed practical: it will help bitcoin exchanges improve their service and reduce their risk, with faster settlement and lower costs. Before we go into why this is important, let’s take a look at the background.

by Andrew Welsh for Unsplash
by Andrew Welsh for Unsplash

First, what are sidechains?

Sidechains are effectively private blockchains, linked to the public Bitcoin system. They use the transmission and custodian power of Bitcoin – information stored in a tamper-proof block – while enjoying greater speed and lower cost. The idea is that an amount of bitcoin could enter a sidechain, the participants can trade that bitcoin amongst themselves as many times as necessary before sending the new distribution back to the Bitcoin blockchain for settlement. The transactions on the sidechain are governed by the sidechain’s rules, which can be anything the administrators want them to be. The only stipulation is that the same amount of bitcoin that goes in needs to come out, although obviously the ownership of those bitcoins will be different.

Second, what are bitcoin exchanges?

A bitcoin exchange will sell you bitcoin in exchange for a fiat currency, such as dollars or euros or whatever you use on a day-to-day basis. They will also buy your bitcoins in exchange for a fiat currency. One of the main frustrations of the exchanges has been the latency of bitcoin transactions, that is, the time they take to settle. It’s much faster than traditional transactions, but it is still not instantaneous, and an exchange’s business needs to be instantaneous.

A brief review of the technology: once a bitcoin transaction is validated by the network, it is included in a block of other transactions, processed by the miners, and added to the blockchain. A block is processed and added to the chain every 10 minutes or so. This is actually an artificial amount of time, chosen to limit the amount of new bitcoin entering the system. Every time a block is processed and added to the chain, the miner who does so gets rewarded with new bitcoins. Processing each block involves computing a cryptographic hash, which is set at a level of difficulty that takes about 10 minutes to calculate. That was deemed enough time to keep the system efficient while restricting the entry of new bitcoins to a trickle instead of a flood.

Each block contains a coded reference to the previous block. If the previous block is tampered with, that coded reference is no longer valid, which makes the whole block invalid. So, to tamper with a block, you would also have to change the coded reference in the block that comes next. That is very difficult to do. And if there are not just one but six blocks that come after, it’s virtually impossible, as you would have to re-configure and validate all the posterior blocks, which would take an unimaginable amount of computing power. So, the standard is that, to be absolutely sure of a transaction’s validity, you should wait until it has 6 blocks on top of it. Given that each block takes about 10 minutes to process, that is a settlement time of about 1 hour.

Because exchange customers don’t want to wait an hour for confirmation of their trade, the exchanges need to keep on hand a pretty big balance of bitcoin and fiat currencies to cover the trade until it is technically secure. Part of the cost of the necessary capital requirement, as well as the risk the exchanges incur in trusting that the trade will settle correctly, can be seen in the exchanges’ commissions and/or spreads. If the capital requirement is reduced, trades can become cheaper.


image via Blockstream

How will Liquid help?

Each participant of Liquid will maintain a node, that is, it will be responsible for verifying the cryptography on the trades on its exchange. Because no new bitcoins will be entering the system, the artificial 10 minute lag time is unnecessary. Transactions will still be grouped into blocks, which will still be added onto previous blocks, but it will happen almost instantaneously. This way, bitcoins and other currencies can flow between accounts of the participating exchanges much faster than at present, which will reduce the capital requirements and the operating costs. Several of the big exchanges – Bitfinex, BTCC, Kraken, Unocoin, and Xapo – have already signed up, and it’s likely that more will follow.

Why is this important?

This development looks like it will remove some of the Bitcoin inefficiencies (speed, energy cost) while maintaining the advantages (decentralization, security), and should enhance the attractiveness and liquidity of the digital currency. That will have ripple effects throughout the sector and beyond, as the pool of participants and users grows.

Also important is the innovation that this is likely to encourage. Several of the founders of Blockstream authored, along with other collaborators, a white paper back in October 2014, discussing the sidechain concept and its potential uses. The paper is open-source, and the authors encourage other developers to experiment with the idea. The development of sidechains allows Bitcoin experimentation, such as the inclusion of new features, the use case for new assets, even new cryptography. Previously, this kind of experimenting had to be done with altcoins, which are Bitcoin alternatives, separate currencies using the same or a similar technology. A system that only allows experimentation through competition is weaker than one that encourages it “in house”.

Sidechain implementation will require a soft fork (a change in the Bitcoin protocol which will not affect trades using the old protocol), which takes time. This is probably why the launch of Liquid was announced yesterday, but will not be implemented until the first quarter of 2016. Apparently a white paper is forthcoming which will explain in detail how Liquid works. This is likely to breed a flurry of other use cases, which will further increase Bitcoin’s usefulness and applicability. These are interesting times, with change happening fast. And with Liquid, it could be time to pour another cup.

Go small: Bitcoin and microtransactions

Bitcoin has been hailed as the saviour of microtransactions, small payments of cents or even less that up until now have not been an option due to simple economics. Traditional online payment methods charge fees for transactions that they process, be it mobile payments, credit card transactions, or direct transfers. You’re not going to pay 2 cents cost for a 2 cent transaction, are you? Enter Bitcoin, a frictionless, decentralized system that allows anyone to send any amount of money anywhere in the world for little or no cost. Hello, efficient and cost-effective microtransactions.

Only it doesn’t work like that.

Bitcoin is not useful for microtransactions.

Here’s why: On the Bitcoin blockchain, most payments will eventually need to include a transaction fee to incentivize the miners. Why do miners need to be incentivized? Because running the powerful computers that perform the validation functions is expensive, due to the hardware needed and the electricity consumed. Miners get rewarded with new bitcoins every time they successfully validate a block, but the amount of bitcoins they get halves every four years and will eventually reach 0. Transaction fees, a sort of voluntary “tip” added on to each transaction, will become more important to the miners – if there’s no transaction fee attached, they might choose to leave your transaction out of the block, in favour of a more lucrative operations. And as the block size limit is approached (unless the community can agree on an increase), space will become scarce and allocated to those transactors willing to pay extra. Transaction fees, however small, make micropayments less viable.

image via IMAX
image via IMAX

Yet nature, sorry, programming abhors a vacuum. Brilliant minds are working at coming up with a way to make micropayments easy and cheap or even free.

One of the most-talked-about micropayment solutions is the Lightning Network. This proposal is an efficient way to process transactions, even micro-transactions, faster and cheaper than one can on the blockchain. It’s a clearing network that sits on top of the blockchain, and eventually settles on it. But until then, it can pass around payment information in a secure and trust-less fashion (trust-less means that you don’t need to know or even trust your payment counterparty). And because there are no miners that need incentivizing, transaction fees are low or even non-existent.

To understand this better (because it’s darn complicated), visualize a Bitcoin earth with lots of payment channel spikes leading up to little moons. Each Lightning user can have one or several spikes. If he or she has several, each leads to a different moon. It’s a bit like having several bank accounts, or several bitcoin wallets. Your choice. And the moons have thin tunnels leading to some of the other moons. In my case, say I have only one spike (I’m a simple soul, really). I upload some bitcoin to my spike. Say I want to send a payment to you via these payment channels. The transaction goes up to my moon, which then figures out the quickest route through the thin tunnels to your moon. It then trickles down your spike to you.

This may sound inefficient, but it’s not, and it’s how the Internet works today. This packet of information that you’re reading found its way to your screen via a convoluted yet efficient route of hubs, it didn’t get to you directly. But it got to you quickly.

So, since the transaction is just between me and you, and doesn’t have to be broadcast to all the nodes, it’s almost instantaneous. And, since no miners are involved and there are virtually no costs (except perhaps a payment channel creation and/or maintenance fee), it’s almost free. When we’re done transacting, we can bring the transactions back down to the Bitcoin earth for settlement. It is not as secure as Bitcoin, but with microtransactions, that shouldn’t be an issue worth worrying about. And it is much more convenient.

The Lightning Network is in development, with no release date announced yet. But the idea is generating buzz amongst developers and Bitcoin enthusiasts alike, who see it as a way to make Bitcoin more efficient without losing the decentralisation. Stand-alone implementations (that don’t need the blockchain) are being built for testing, and crypto think-tank/developer  Blockstream has started Lightning application development.

Strawpay’s Stroem protocol (a Swedish company, be grateful that they didn’t insist on Ström) is very similar, with a few technical differences that I confess I don’t quite understand yet (working on it). They seem to be a bit further along the development rail, but they are making a lot less noise and receiving a lot less attention. Amiko Pay is another potential contender for a role in Bitcoin micropayments, but it is in early stages still.

So who will be the first to launch? My money is on Lightning. Keeping hefty brainpower focussed takes money, as even programmers need to eat. I mentioned earlier that Blockstream has begun work on the Lightning Network, hiring a specialized developer. Late last year Blockstream secured a $21 million funding round from 40 investors, including top venture capital firms. A few months ago Strawpay received a 500,000K (about $60,000) grant from the Swedish government, which is better than nothing, but probably won’t last very long.

The race is on, and the stakes are high. If we have access to an efficient micropayment platform, imagine what that can do for the media industry. It will be possible to pay per article read. The music industry could find a viable, fair business model. We could pay cents for each song listened to, and artists could receive income directly from listeners. Telephone bandwidth in which you pay by the minute, streaming in which you pay by the episode… With minimal overheads, the costs to the consumer would be low and proportional to consumption. With minimal overheads, the creators or originators receive more for their creation or service. And the economic boost to the intersection of creativity and quality will have ripple effects in culture, business and finance. Exciting.