Skip to content

Instantly share code, notes, and snippets.

@RobertBarrow
Last active March 12, 2018 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertBarrow/a7501c12c482b06b68d41b92b703e7f9 to your computer and use it in GitHub Desktop.
Save RobertBarrow/a7501c12c482b06b68d41b92b703e7f9 to your computer and use it in GitHub Desktop.
Bitcoin Pizza, Bitcoin Pizza Index, Bitcoin Pizza Day and Bitcoin Lightning Pizza

Bitcoin Pizza

On 22nd May 2010, programmer Laszlo Hanyecz made the first documented purchase of goods using bitcoin when he exchanged 10,000BTC for two pizzas supplied by Jeremy Sturdivant (which he had bought from Papa John's). Back then - when the technology was just over a year old - that equated to roughly $25 per pizza.

Here is a link to the original "Pizza for bitcoins?" post on bitcointalk.org.

Here is a link to the transaction on the Bitcoin blockchain.

Bitcoin Pizza Index

The "Bitcoin Pizza Index" tracks the value of 10,000BTC in USD. In December 2017, the peak value was over $195M.

Here is a link to the current value (using Google search).

Bitcoin Pizza Day

Now widely recognised as the first real-world transaction with bitcoin, May 22nd has come to celebrate 'Bitcoin Pizza Day', with cryptocurrency enthusiasts raising a slice to Hanyecz's infamous hunger pangs that paved the way for early merchant adoption.

See the #BitcoinPizzaDay hashtag on Twitter.

Bitcoin Lightning Pizza

Laszlo Hanyecz continues to be a pioneer in the purchasing of Pizza using cryptocurrency.

The following extract describes a similar transaction from February 2018, in which he successfully used the Bitcoin "Lightning Network" to purchase pizza:

I wanted two pizzas and to try to do it as close to atomically as possible. I didn't want to prepay and end up with no pizza. As far as I know we don't yet have pizza/bitcoin atomic swap software but we improvised and decided that I would need to provide the payment hash preimage to the delivery driver in order to claim my pizza. If I can't produce the preimage, proving that I paid, then the pizza would not be handed over and it would be destroyed. This works because I can't get the preimage without paying the invoice.

I agreed to open a channel and fund it with a sufficient amount for what we estimated the cost would end up being. After we agreed to these terms my friend was able to verify that I funded a channel on the blockchain, which shows that I at least have the money (bitcoin). He is taking on some entrepreneurial risk and prepaying his sub contractor to prepare and deliver the pizza to me, but at this point I have not risked my bitcoins, they're just committed to a channel. I was given a bolt11 invoice which I decoded with the c-lightning cli to verify everything was as agreed

When the pizza delivery arrived, I was asked "What is the preimage?" by the driver. At this point I paid the invoice and instantly received the preimage in return. In the interest of keeping it simple we agreed that the preimage would just be the first and last 4 characters of the hex string. So my answer was 7241-a8c1. I wrote this on a notepad and presented it to the driver who compared it to his own notepad, at which point I was given the pizza. It's probably not a good practice to share the preimage. The delivery driver didn't have the full string, only enough to verify that I had it.

So is there any point to doing this instead of an on chain transaction? For what I described here, probably not. The goal was just to play around with c-lightning and do something more than shuffling a few satoshi back and forth. Maybe eventually pizza shops will have their own lightning nodes and I can open channels to them directly.

Some pics of my family enjoying the pizza here

Source: The Linux Foundation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment