Offline dumb wallet design

6 499
Avatar for TomZ
Written by
2 years ago

How people prefer to use Bitcoin Cash is likely reflected by what people do today. When I look around me the vast majority of people that pay electronically do so by using a bank-card and only a small number use a phone.

This raises the question if we can make a secure and useful wallet that follow the form-factor of a bank card. And it turns out that, yes, you can!

The challenge here is that your bank-card doesn't have an Internet connection, doesn't have access to WiFi and generally can only store a small amount of data. What is important is that current smart-cards have enough power to sign your transactions, so that is promising.

The Setup

We need 3 hardware components to make the dumb wallet able to do its thing.

  • A charging station. To top up your card. Can be an app on your phone.

  • The actual card. See the image below.

  • A compatible point-of-sale station.

Smart cards

To tie those 3 together we will need to design a good way to make those 3 components talk to each other, but this is certainly a future endeavor where we would like a larger number of wallet developers and point-of-sale developers to work together.

From these components you can already get a little bit of an idea of the flow of things. Please don't overcomplicate things here, we are just using standard transactions and standard payment (pay-to-pubkey-hash) types.

Charging station

The charging station is really just an application that deposits coins on the address that the card owns. The card is basically a hardware wallet and thus you can send money to its bitcoin-cash addresses. The only thing that is special is that the charging station transfers the actual transaction to the card. The card remembers the transaction too. Since the card has no Internet, the charging station is in charge of broadcasting the transaction to the Bitcoin Cash network.

Smart card paying at a Point of Sale

The smart card at this point has figured out from the transaction it received that it has coins. We will call them UTXOs. The card has UTXOs stored in its memory. Specifically, UTXOs that it has the matching private keys for so it can spent them.

When a point of sale demands payment of a certain amount it becomes simple to build a correct transaction. The PoS provides the outputs, the smart card provides the inputs and it can sign them.

Using a system like BIP70 championed, the smart card sends the entire transaction to the PoS and the PoS is responsible to broadcast it to the network. And your payment is done.

The smart card will store the new change-UTXO to make sure the card doesn't need to be 'topped-up' again until the funds really are too low.

21
$ 63.34
$ 17.94 from @TheRandomRewarder
$ 15.00 from @majamalu
$ 13.37 from @molecular
+ 10
Avatar for TomZ
Written by
2 years ago

Comments

Thank you for your writeup, I love bch.

$ 0.00
2 years ago

This is very interesting! It’s a very similar concept as it was drafted in be.cash. It should be easy and simple to implement.

$ 0.00
2 years ago

Hello everyone, I'm from south Sudan it's my pleasure to be here it's really interested, Wow that's good I'm glad to use this platform all my life, it's really interested and so nice to ear that.

$ 0.00
2 years ago

I prefer to use Bitcoin Cash, as reflected by the reason I use Bitcoin today.

$ 0.00
2 years ago

What if the pos fails to broadcast? Next payment using the change utxo has no parent. So the protocol would allow the pos to ask for parent tx still in memory on the card and bcast both?

$ 0.00
2 years ago

In early drafts of a next payment protocol the PoS would have the opportunity to ask the offline wallet to please provide the previous transaction it is spending from.

The PoS can then broadcast multiple transactions to ensure it gets paid.

$ 0.00
2 years ago