Taking the strain off the chain: The Lightning network and atomic swaps

Even if all the usability and accessibility issues get fixed and Bitcoin becomes easy for all kinds of users to trade with, the block size creates some fundamental limitations. We all know that at times verification can take hours (days!), and when the network is overloaded, transaction fees skyrocket.

The lighting network, currently being rolled out to sit on top of the bitcoin blockchain, could be the game-changer here though. What the network does is create a new layer of user-generated channels which send payments back and forth via a secure and trustless path, but with most of these payments taking place OFF the main blockchain.

Think of it like when a hotel pre-authorises your credit card for expenses when you check in. They need to protect themselves against you ransacking the mini bar before you unpack, but you like to move around the restaurants etc without having to pay as you go - so you lodge pre-payment details with them, for a certain amount you are expecting to use up. Then at the end of your stay, they add up the chits with your agreement, and bill a single final amount to your card.

On the lightning network the ‘credit card’ is actually a multi signature wallet with a fixed amount of bitcoin, within which a multitude of transactions can take place - even microtransactions - over this secondary channel. The channel is closed using a smart contract at a pre-determined time, or if any party violates terms (such as exceeding a spending limit). The crucial thing is, it is only that initial pre-funding and the final netted-off balance, which gets carefully and expensively written to the main blockchain.

So you can see that this massively “takes the strain off the chain”. And it doesn’t depend on two people wanting to deal directly either, as it is a true network of nodes - you can send payments to someone via channels with people that you are connected with, because the network automatically finds the shortest path.

The lightning network also facilitates atomic swaps - direct cross-chain exchanges between one cryptocurrency and another, using a hash time-locked contract. This has the potential to revolutionise trading and the crypto exchange industry too.

Although its only just rolling out, there were already over 2k active notes on the lightning network by early April 2018, and it’s growing daily. Clearly the bitcoin community needs this functionality, but it wasn’t possible to implement safely until Segwit was adopted.

Even though transaction malleability has been addressed in that way, some people are still concerned that transacting ‘off chain’ in this way is less secure, and also - because of the smaller number of node involved - creates a tendency to centralize network functions, in a way that runs contrary to everything that Bitcoin is all about.

But many others believe that it could be its saviour, and make super-fast and cheap transactions a reality, leading to mass adoption and the crypto revolution we’re all waiting for.

What do you think?

I am sure these secondary networks are the only way forward, to solve the block time problem. If we are ever going to buy pizza with Bitcoin again anyway...

@costatrader said in Taking the strain off the chain: The Lightning network and atomic swaps:

we are ever going to buy pizza with Bitcoin again anyway...

Off-chain atomic swaps of this type are highly anticipated since trading would be automatic, not reliant on the processing times of different blockchains, but the technology needed to implement off-chain atomic swaps - things like the Lightning Network and Raiden Network on ethereum - are still under development.

Eventually the ethereum blockchain will be able to communicate with other blockchains

@blocksparks thanks for translating this fascinating aspect of Bitcoin/ Lightning network and atomic swap into plain English.

@jedida My pleasure, this is the kind of story I love to tell 🙂

The lightning network is an open source protocol that allows anonymous routed channels and is capable of making millions of transaction per second. The lightning network was actually created for the bitcoin but it can be theoretically implemented on the top of any blockchain. The transaction fees will be so low that anyone can send micro transactions. The confirmations will happen instantly and it will be much easier to make and receive payments.

Enjoyed this post? Consider registering for more interesting content!