Totaloutput
SSDE
Published in
3 min readNov 28, 2018

--

Real use case of bitcoin — $12 lunch in Singapore.

So I was in Singapore this week, there is a cafe that I always wanted to visit, it’s called Ducatus Cafe Singapore. Finally got a chance to stop by. Apparently they have been around for a while, as the crypto market cool down, it doesn’t seems to impact them much. They still take all the popular crypto currencies for payment. In my case, I used BTC.

I ordered 1 Americano + 1 Latte with Caramel + 1 Duc Coinwich. The total cost is SGD 18. The waiter pulled out a pad and showed me a barcode, I’m like “OK, how much should I pay in USD? and how much is it to BTC? (I have to do the math quickly)”. Before I can figure out the math part, he said “Just scan the bar code, it will work”. So I did, it worked.

Apparently the bar code contains not only the information to the receiver address, but also the amount of the transaction.

I was worried about that I need to wait for at least 10 minutes to get my food because the blocktime (transactions gets into a new block) is 10 minutes as of today for BTC.

However, the cafe accept 0-confirmation. If you don’t know what is 0-conf, here is a little background:

When the wallet app took your order of sending bitcoin from A to B, it will send a transaction to the bitcoin network. Typically it’s through a full node. Normally that full node is owned by the wallet app service provider. Once the full node receive the transaction, it will broadcast to the network. A miner receive the transaction, it will add the transaction to the block in memory and start mining the block. Once a miner find an answer to the hash that’s lower than the current difficulty (this normally took 10 minutes), it will broadcast the new block to the network, then the block will be add to the blockchain, now we have 1-confirmation.

When a full node receives a transaction and it’s not in any block yet, it will still validate the transaction and broadcast. So if the full node that cafe is running (or their service provider is running) received my transaction, it will validate the transaction, to make sure that I own the input (which means I have the ownership of the money to spend) and there is no double spending in the current transactions(which means the money I own hasn’t been used). It will then accept that transaction. This transaction is NOT yet in blockchain, so it’s called 0-confirmation.

The risk of taking 0-confirmation is, it “may” get double spend or not get to blockchain for other reasons. The fact that full node received and verified the transaction, doesn’t mean miner will pick it up and put it into the next block.

But in my case, the cafe took the risk (of SGD 18) to provider a much smoother customer experience, their server received 0-conf transaction with in 2 seconds, and they deliver the coffee right away.. The sandwich took a while but it was very tasty.

Here is the picture of the transaction:

And most importantly, here is the picture of the food.

I’m highly recommend you to visit this place. Thanks for reading.

--

--