Offline payments with Android wallet


This Android application for Bitcoin wallet, claims offline payment as a feature. It says,

When you're offline, you can still pay via Bluetooth.

A payment is concluded only when the transaction is broadcast to the network and confirmations are made for the transaction in a certain block as mined. So, how does one "pay" via Bluetooth?


Posted 2017-01-27T16:26:35.620

Reputation: 317



You can simply send the signed transaction to the other entity (e.g. via Bluetooth) who then can send it to the Bitcoin network. The transaction doesn't need to be sent to the Bitcoin network by you, it just needs to somehow get to a miner to be included in a block. Even if you print it out, send someone a letter via snail mail, they type it in, and send it to the Bitcoin network, it'll still work.


Posted 2017-01-27T16:26:35.620

Reputation: 3 046

So, the transaction can be broadcast either by sender or receiver of a transaction? Is this because receiver can't spoof the transaction as the private keys are secure with the sender? – cogitoergosum – 2017-01-28T01:59:34.080

It can be broadcast by anyone who by any means got hold of it. Some people seem to have the notion that a transaction is something that's secretly transmitted through the network. It's not. Everyone can read it once it's broadcast. A transaction doesn't say: "Here is my password, please send those funds I have access to with this password to those addresses and be so kind to not send them to yourself." That wouldn't work. People would steel your money. Instead – through the magic of cryptography – a transaction only allows with your funds to happen, exactly what you specified in it. – UTF-8 – 2017-01-28T02:22:16.423

I know that, the transaction is not transmitted securely. I was referring to fact that, a transaction can be created by the owner of the private keys only; it is a different matter how the ownership was gained (genuine, malevolent, etc.). – cogitoergosum – 2017-01-28T02:36:03.213

Consider this scenario. Suppose the transaction is persisted on both the sender's and receiver's devices. Once the transaction is sent to the receiver device via Bluetooth, then it is possible that both the sender and receiver come online at different times without the other party's knowledge. I would think that, the later transaction would be rejected because that would mean double spending of UTXO. Correct? – cogitoergosum – 2017-01-28T02:40:21.833

Yes, that's correct. Well, kind of. It would be rejected but 2 times the same transaction doesn't mean double spending. – UTF-8 – 2017-01-28T02:59:37.877

Thanks! One last thing. Could you please elaborate this, "2 times the same transaction doesn't mean double spending"? – cogitoergosum – 2017-01-28T03:55:33.900

1Every full node typically has several peers. Transactions go around the network and after validating one, a node sends the transaction to its peers it didn't receive the transaction from, except if it already sent this transaction to them in the past. This is necessary because otherwise, a single transaction would clog the entire network as it would multiply until it existed trillions of times. Therefore, if you send one a second time, it's just ignored. – UTF-8 – 2017-01-28T14:46:47.720