0

Is there some way in which User A who could load a transaction onto the block chain and if some other User B who is willing to pay User A, without User A being online could release the loaded transaction. Something like a smart contract ?

Lets say if A and B wants to exchange some bitcoin transactions between each other. But they both dont know each other before. A list his address some where and when B sees it, B will issue a bitcoin transaction to A.

A might not be online when B has issued this transaction. But B should receive back a transaction from A, if B has payed to A's address. How's it possible ?

  • So, B wants to pay A. B is online, but A is not? Or did you mistype and B is the one that is offline? – Murch Jun 14 '16 at 14:55
  • B is online, but A is not, A has already loaded a transaction onto the blockchain. And if some one is willing to pay to A, the pre-loaded transaction should be released. – jgm Jun 14 '16 at 14:58
  • So, B would pay, and then the transaction of A would be released? That doesn't make sense to me. – Murch Jun 14 '16 at 15:01
  • @Murch please find the updated question. – jgm Jun 14 '16 at 15:11
2

The blockchain does not contain yet-to-be-published transactions to publish them based on conditions. The blockchain is the structure that transactions are published to. There is no such thing as a "pre-loaded transaction" that can be "released". Either A (Alice) or B (Bob) has to publish it.

What Alice can do is give Bob a pre-signed transaction that spends an output from a transaction from Bob that has not been published yet. This way, when Bob publishes his transaction, he can now publish the pre-signed transaction from Alice, but can't publish it beforehand. This requires more coordination that I believe you are looking for, but it's possible. It would go like this:

  1. Bob creates a transaction, B1, with an output to Alice, but does not sign nor publish it.
  2. Bob sends Alice B1, still unsigned.
  3. Alice uses the output on B1 as an input on her own transaction, A1. This transaction has an output that pays to Bob.
  4. Alice signs A1, but can't publish it because it spends the still unpublished B1. Instead, she sends the signed A1 to Bob.
  5. Alice can now go offline, as her part is complete.
  6. Bob, now in possession of a signed A1, signs and publishes B1 to the network.
  7. With B1 now published, A1 is now a valid transaction, and Bob publishes it as well.

Again, I don't think this is exactly what you are looking for, but I don't think what you are looking for is possible. Smart contracts generally require sending transactions back and forth before publishing to the blockchain. You really can't have a smart contract with someone with whom you've never communicated. The up-front communication is the contract part, and publishing to the blockchain is more like resolving the contract.

1

I'm not sure whether this was what you meant or not, but at Bitcoin 2014 I saw a prototype for NFC payments.

The payer was offline and using his smartphone to create a transaction, which he then directly sent to the recipient via Near Field Communication. Since it is a valid transaction, it doesn't matter who transmits it to the network, and therefore the recipient could just submit it instead of the payer.

That way, the recipient would get paid, even though the sender was and remained offline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.