Author: ZmnSCPxj 2018-02-25 15:30:53
Published on: 2018-02-25T15:30:53+00:00
A user named Robert Olsson had suggested adding an escrow functionality to a Lightning Network payment. In response, ZmnSCPxj laid out a method involving a direct channel with the pizza provider and routing the pizza price plus 546 satoshi (the minimum for a nondust output) to the pizza provider, with a hop of 546 satoshi back to the user as a "routing fee". The user then informs the pizza provider of the hash of the preimage, which the provider can check with their node. The user then sets up the payment so that it expires in three blocks, meaning the pizza must be delivered within that time frame or it is free. When the pizza is delivered, the user provides the preimage to the provider via standard LN protocol, and when the provider confirms payment, the pizza is released. Laszlo Hanyecz successfully completed a Lightning Network trade using bitcoin to purchase pizza, demonstrating how everyday transactions could work on the network. He improvised by agreeing with his friend in London that he would need to provide the payment hash preimage to the delivery driver to claim his pizza. To do this, he opened a channel and funded it with a sufficient amount for what they estimated the cost would end up being. After verifying that he funded the channel on the blockchain, he received a bolt11 invoice which he decoded with the c-lightning cli. When the pizza delivery arrived, Laszlo paid the invoice and instantly received the preimage in return. He presented the first and last 4 characters of the hex string to the driver, who compared it to his own notepad before handing over the pizza. Laszlo admits that there may not be much point to using the Lightning Network for such a small purchase instead of an on-chain transaction, but he wanted to play around with c-lightning and demonstrate its capabilities.
Updated on: 2023-05-24T21:17:11.461943+00:00