Lightning User Experience: A Day in the Life of Carol

in #bitcoin7 years ago

The goal of this post is to give the Bitcoin community and prospective Lightning users insight into what the end user experience of the Lightning Network will be like once the initial infrastructure components are complete. Here, we’re focusing on the story of Carol, a new Lightning user, and we’ll also be touching on some of the projects that we at Lightning Labs are working on that will make this experience a reality. Over the next few weeks and months, we’ll be following up with additional posts that will provide more details about these projects and topics including routing, watchtowers, neutrino, mobile, backups and more.

Meet Carol

In today’s post, Carol is the hero of our story. Carol was introduced to bitcoin by her good friend and avid bitcoiner Alice, and until now has been a casual investor and hodler. In our story, Carol lives in the not-too-distant future when Lightning is growing beyond the technical community and starting to become ready for everyday users. Carol’s looking to join the fun and experience Lightning for herself.

Onboarding

The first step for Carol is to search for Lightning in her favorite App Store. There, she finds the correct Lightning App1 for her phone. The initial setup process is familiar to anyone who’s set up a Bitcoin wallet. First, the App will generate a 24-word backup seed2, which Carol writes down and stores in a safe place. This seed allows Carol to recover her money in case she loses her phone or her phone stops working.

Second, Carol sends some BTC to her wallet using her favorite cryptocurrency exchange using the QR code displayed in her Lightning App. This initial funding uses a regular on-chain Bitcoin payment, familiar to Carol (and any Bitcoin user).

Autopilot

The rest of the onboarding process is automatic. While Carol waits for the initial deposit from her exchange to be confirmed (about an hour, since it’s a regular on-chain transaction), Carol’s Lightning App is synchronizing the blockchain using the light-client Neutrino4 protocol. Neutrino allows low-power devices (such as smartphones) to use bitcoin with a high degree of security and privacy. Carol’s initial synchronization takes just a few minutes. (When she opens her app in the future, the sync time will be unnoticeable.)

Once Carol’s initial deposit has been confirmed, a system called Autopilot5 takes over and moves Carol’s funds into the Lightning Network. This process takes up to an hour (scaled based on the amount of the deposit), but only needs to run the first time Carol sets up her Lightning App. Now Carol is ready to use Lightning!

At the mall

The mall Now that she’s got Lightning set up, Carol decides it’s time for a little shopping. Carol happens to love alpaca wool and she’s been eyeing some new alpaca socks at her local Bloomingblocks. She decides that this will be a good chance to try out Lightning! Using the Lightning-integrated point-of-sale system from Rectangle™, the Bloomingblocks associate generates a QR code6 for Carol’s purchase. Carol opens her Lightning App and scans. Her app brings up the details of the transaction, she checks to make sure the amount is correct and also notes the transaction fee (less than one cent!7). Carol presses “Confirm” and within seconds, the Bloomingblocks associate sees the confirmation on her Rectangle™ and emails Carol her receipt. Just like that, Carol is on her way with her exceptionally comfortable new socks!

Under the covers

cat As far as Carol can tell, her Lightning purchase experience was fast and simple, but in the background, a few different technologies have made that transaction possible.

Payment channels - the primary building block for Lightning is the concept of payment channels, which allow for fast, low-cost transactions that leverage the security of an underlying blockchain (bitcoin, in the case of Carol and Bloomingblocks).

Smart contracts - within payment channels, Lightning uses a form of “smart contract”, which is a cryptographically secured promise to deliver funds. Lightning’s primary contract is the Hash Time Locked Contract (HTLC), which is enforced by the bitcoin blockchain. HTLCs allow for Lightning payments to be sent across multiple channels (a multi-hop payment). More information about payment channels and HTLCs can be found in this article.

Routing nodes - as mentioned above, Carol connects to the Lightning Network through a set of routing nodes (by default, Autopilot will create channels with five nodes). A routing node is a computer intended to be online at all times, and that facilitates the sending of payments for other users. Bloomingblocks is also connected to the network via its own set of routing nodes. Through a process that’s analogous to finding connections between people in “Six Degrees of Separation,” Carol’s Lightning App automatically determines which nodes link her with Bloomingblocks, and Carol’s transaction is sent across that series of links. The next post in this series will provide more information about routing nodes, channel balance and the routing network.

Watchtowers - Carol’s Lightning App uses a security system called a “watchtower”. Watchtowers provide protection in case something goes wrong with one of Carol’s payment channels while she’s disconnected from the internet for an extended period of time (multiple days). If this kind of network error happens, one of Carol’s watchtowers will automatically handle the recovery process for Carol. More details about watchtowers will be included in an upcoming blog post as well.

Splicing - In the case that Carol would like to pay a merchant that accepts on-chain bitcoin but who isn’t yet Lightning-enabled, she can use “splicing”, which allows for an on-chain payment out of a channel without requiring that the channel itself be closed. Splicing allows for a seamless transition between on-chain and off-chain (Lightning) transactions. A future post on splicing will be forthcoming.

Atomic Multipath Payments (AMP) - AMP will also be the subject of an upcoming blog post. AMP allows large payments to be split into multiple small payments, each of which is sent via a different route through the network. The payment recipient combines all of the payments together, rejecting or accepting them as if they were a single transaction. To the user, AMPs are handled automatically behind the scenes.

Again, as an end user, Carol doesn’t need to know about any of these concepts to use Lightning, any more than an internet user needs to understand HTTP, TCP/IP, TLS, BGP and all of the other technologies that make surfing the web possible.

For the Merchant

For Bloomingblocks, one of the benefits of Lightning integration is that there are no fees for receiving payments. For merchants who are used to paying 2-3% of the value of credit card transactions, this can be a significant savings. In addition, Lightning payments are irrevocable, so merchants don’t have to worry about administrative costs or lost merchandise costs associated with chargebacks and managing credit card fraud. Finally, with Lightning, merchants have access to all funds within seconds and don’t have to wait hours or days for payouts to be processed, as with most credit card processors.

For these reasons, we hope some merchants will prefer Lightning payments to credit card payments. Eventually, some might offer discounts or loyalty rewards for customers who use Lightning.

Back to Carol…

Carol’s now back home from her shopping trip and she’s ready for some rest and relaxation. As an avid Legend of Wowcraft player, she finds out that for her next quest, one of her guild members needs some Devout Shoulders. From the Legend of Wowcraft virtual goods store, she clicks “Pay with Lightning.”

Unbeknownst to Carol, this button is actually a Lightning payment request link (which begins with “lightning:”). This automatically pops up the confirmation page in Carol’s Lightning App with the details of her payment (again, the fees are negligible!). Carol clicks “Confirm,” Legend of Wowcraft receives her payment and within seconds, she and her guild are ready for battle!

Refilling Lightning Funds

Later, after a long night of fighting mobs and listening to the latest Zhou Tonged album on repeat (which she bought on LighTunes), Carol takes a look at her Lightning App and notices that her balance is running a little low. Knowing that her favorite exchange, GenesisTransaction, has recently added Lightning support, Carol decides to give it a try.

Carol presses the “Add Funds” button in her Lightning App, enters the amount of BTC that she’d like to move, selects GenesisTransaction, and enters her account ID. This sends a Lightning payment request to GenesisTransaction, which automatically pops up the confirmation page from Carol’s GenesisTransaction App. Carol confirms the transaction and instantly, the funds are deducted from her BTC balance at GenesisTransaction and added to her Lightning App.8 Unlike the normal bitcoin transfers that Carol was used to, there was no need to wait for the transaction to confirm on the blockchain, and fees were ultra-low.

This funds replenishment process was similar to Carol’s purchase process, but in reverse, with payment channels, smart contracts, routing nodes, watchtowers, etc. Carol doesn’t need to know about those mechanics. She just knows that she’s ready for her next trip to the store and her next online purchase. Just as easily, Carol could have refilled her Lightning funds with salary from an employer, payment for an item she auctioned off online, or a friend splitting a restaurant bill with her.

This process of paying with Lightning and replenishing funds with Lightning can last for months or years without the need for expensive and slow on-chain Bitcoin transactions. Once the initial Lightning setup is complete, on-chain transactions should be only rarely used to recover from network errors or to expand a user’s capacity for Lightning funds.

At the End of the Day

For the early adopters of today, Lightning is still a complex technology. lnd 0.4.1-beta users must understand how the protocol and payment channels work and this involves knowledge from fields like cryptography, security, game theory, economics, and more. This is in addition to Bitcoin itself, which is already a complex topic. However, as Lightning matures, we’ll be working to improve the Lightning user experience to become more simple, intuitive and familiar. Ideally, users like Carol will manage balances, payments and deposits without having to understand the underlying technology, and the experience will be cheaper and more convenient than existing payment technologies (checks, credit cards, physical cash, etc.).

The most important piece of the puzzle, the protocol implementation itself lnd, is now in beta on bitcoin and litecoin mainnet. Desktop and mobile apps, routing node software, watchtowers and other infrastructure are on the way as well. As mentioned, we’ll be following up this post with more specifics about the various components that will make up the Lightning Network. Stay tuned!

Footnotes

1 We’re currently working toward releasing a new version of our Lightning App (for desktop) that will be compatible with lnd 0.4.1-beta. Our previous alpha version of the App has now been deprecated. We’ll be following the desktop App release with mobile versions as well.

2 AEZeed - lnd uses a seed format called AEZeed, which has additional features specifically developed for backup and retrieval of Lightning channels. Another post in this series will provide more detail about how backup and recovery work in Lightning.

3 For Lightning channel recovery, the AEZeed is combined with “static” backups that are made when new channels are created as well as “dynamic” backups that are updated as transactions are processed. Initially at least, we’ll be implementing backups as watchtower features. Additional detail will be coming as well.

4 More information about Neutrino can be found in BIP 157, BIP 158 and the Neutrino Github repo.

5 The Autopilot in Carol’s Lightning App has connected with a series of Lightning routing nodes (specifically selected for uptime and payment reliability) and has opened Lightning payment channels with those nodes. By default, five channels will be opened, so if one routing node goes offline and/or funds need to be recovered via on-chain transaction, 80% of funds will still be available. These are details Carol doesn’t need to be concerned with. As far as she knows, her money is now instantly accessible with Lightning, and she can send money to any Lightning-enabled person or business.

6 Currently, many phones aren’t NFC-enabled, so QR codes are commonly used for Bitcoin purchases. However, we expect that NFC will eventually make this workflow even simpler.

7 Fees in Lightning are much, much lower than they are with a typical on-chain Bitcoin transaction. While an on-chain transaction has tens of thousands or hundreds of thousands of computers involved in transmission, validation and storage, a Lightning transaction has only a few computers involved. Because the resource costs of processing a Lightning transaction are very low, fees should tend to be correspondingly low (much less than one cent according to our calculations).

8 Currently, this process requires copying and pasting a Lightning payment request, but as exchanges build support for Lightning, this will be automated as it is in this example.

Coin Marketplace

STEEM 0.20
TRX 0.19
JST 0.034
BTC 91309.02
ETH 3119.19
USDT 1.00
SBD 2.91