Tutorial: Using The Bitcoin Lightning Network
The Lightning Network is a decentralized system for instant, high-volume micro-payments that removes the risk of delegating custody of funds to trusted third parties.
How does the Bitcoin Lightning Network work?
As we know it, transactions confirmed on the bitcoin block-chain take up to one hour before they are irreversible. Micro-payments, or payments less than a few cents, are inconsistently confirmed, and fees render such transactions unsuccessful on the network today.
The Lightning Network solves these problems. It is one of the first implementations of a multi-party Smart Contract (programmable money) using bitcoin's built-in scripting. The Lightning Network is leading technological development in multiparty financial computations with bitcoin.
Instant Payments - Bitcoin aggregates transactions into blocks spaced ten minutes apart. Payments are widely regarded as secure on bitcoin after confirmation of six blocks, or about one hour. On the Lightning Network, payments don't need block confirmations, and are instant and atomic. Lightning can be used at retail point-of-sale terminals, with user device-to-device transactions, or anywhere instant payments are needed.
Micro-payments - New markets can be opened with the possibility of micropayments. Lightning enables one to send funds down to 0.00000001 bitcoin without custodial risk. The bitcoin blockchain currently enforces a minimum output size many hundreds of times higher, and a fixed per-transaction fee which makes micropayments impractical. Lightning allows minimal payments denominated in bitcoin, using actual bitcoin transactions.
Scalability - The bitcoin network will need to support orders of magnitude higher transaction volume to meet demand from automated payments. The coming increase in internet-connected devices needs a platform for machine-to-machine payments and automated micropayment services. Lightning Network transactions are conducted of the blockchain without delegation of trust and ownership, allowing users to conduct nearly unlimited transactions between other devices.
How it Works - Funds are placed into a two-party, multisignature "channel" bitcoin address. This channel is represented as an entry on the bitcoin public ledger. In order to spend funds from the channel, both parties must agree on the new balance. The current balance is stored as the most recent transaction signed by both parties, spending from the channel address. To make a payment, both parties sign a new exit transaction spending from the channel address. All old exit transactions are invalidated by doing so.
The Lightning Network does not require cooperation from the counterparty to exit the channel. Both parties have the option to unilaterally close the channel, ending their relationship. Since all parties have multiple multi-signature channels with many different users on this network, one can send a payment to any other party across this network.
By embedding the payment conditional upon knowledge of a secure cryptographic hash, payments can be made across a network of channels without the need for any party to have unilateral custodial ownership of funds. The Lightning Network enables what was previously not possible with trusted financial systems vulnerable to monopolies—without the need for custodial trust and ownership, participation on the network can be dynamic and open for all.
Testing the Lightning Network
You can now try a Lightning transaction on the Bitcoin testnet. Here's how it works:
1. Go to this site: https://htlc.me
HTLC.me is a web-based Lightning Network wallet. There are more Lightning Network wallets available already (i.e. Eclair Wallet for Android), but I use HTLC.me in this tutorial, because it is web-based and very easy to use.
After you clicked "Got it, I wrote it down", you receive some free tBTC. This is no real Bitcoin, the "t" is for "testnet".
2. Your first payment
Visit https://yalls.org and click on an article you would like to read. To read the full article you have to pay a few tBTC Satoshis worth about $0.01.
Click 'Continue reading' and copy the payment request to your HTLC.me Lightning wallet as in the images below.
Click "Send Payment".
Now go back to the site to read the full article and you will notice that the transaction has been confirmed instantly. This got done faster than I can switch the tabs in my web browser!
Thirsty? You can now also buy a cup of coffee with a Lightning transaction on https://starblocks.acinq.co. All of this is still under development, but it looks really promising.
Lightning Network Explorer
This explorer displays the topology of the Bitcoin Lightning Network and lists all known nodes.
https://explorer.acinq.co
Ultimately, once the Lightning Network is finalized, this will become a game changer, and further enhance Bitcoin.