Bitcoin Forum
May 29, 2024, 06:40:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: RBF question  (Read 294 times)
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 09, 2020, 08:54:38 AM
Merited by o_e_l_e_o (2), ABCbits (1), Husna QA (1)
 #1

Hello Bitcoin Expert,

What happens currently if I create Transaction X, without RBF enabled, with UTXO A and then 1 minute later I create another Transaction Y with UTXO A.  Will the nodes receiving Transaction Y flag it as a double spend and reject it?

Thanks

BrewMaster
Legendary
*
Offline Offline

Activity: 2114
Merit: 1292


There is trouble abrewing


View Profile
August 09, 2020, 11:43:20 AM
 #2

yes.

There is a FOMO brewing...
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 10, 2020, 03:40:10 AM
 #3

Thank you for your responses.

Suppose I send Transaction X with RBF enabled.  Must the subsequent Transaction Y have the same Inputs and Outputs as Transaction X?  The only difference between Transaction X and Y allowed is a reduced Change value resulting in a higher transaction fee?

o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18566


View Profile
August 10, 2020, 10:25:21 AM
Merited by ABCbits (1), BrewMaster (1), Heisenberg_Hunter (1)
 #4

Suppose I send Transaction X with RBF enabled.  Must the subsequent Transaction Y have the same Inputs and Outputs as Transaction X?
No. Transaction Y can have any combination of inputs and outputs. All that is required for Transaction Y to replace Transaction X is that it spends at least one of the same inputs as Transaction X does, and it pays a higher fee. When Transaction Y is confirmed, Transaction X will become invalid because it now depends on at least one input which no longer exists.

As an addendum to this, there are a minority of nodes which will only support a form of RBF known as first-seen-safe RBF, or FSS RBF. In FSS RBF, Transaction Y is only accepted if it pays the same outputs as Transaction X.
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 11, 2020, 05:41:11 AM
 #5

Thank you
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 12, 2020, 06:51:04 AM
Last edit: August 12, 2020, 07:07:58 AM by Picard78
 #6

Is this a correct use case of RBF and transaction Locktime?

Delaying BTC payment until customer is satisfied with new Product

Suppose I have an agreement with a merchant to pay them 1 BTC upon the arrival of a new product.  The merchant tells me the product will arrive tomorrow.

I tell the merchant I want to inspect the product upon arrival and will release the 1 BTC to them once I am satisfied with the product.

I setup a RBF transaction with a Locktime that is 3 days from today and tell the merchant that if I am not satisfied with the product I will return the product and I will execute another RBF transaction that outputs the 1 BTC back to me.

Is this one application of RBF?

Thank you.
nc50lc
Legendary
*
Offline Offline

Activity: 2422
Merit: 5658


Self-proclaimed Genius


View Profile
August 12, 2020, 07:11:18 AM
 #7

I setup a RBF transaction with a Locktime that is 3 days from today and tell the merchant that if I am not satisfied with the product I will return the product and I will execute another RBF transaction that returns the 1 BTC to me.
No, you wont be able to broadcast that transaction before the set locktime, using RBF isn't necessary in that case.
You can give him the signed RAW TX so he can broadcast it himself after the locktime;
if you're not satisfied, create a new TX spending the input of that RAW transaction before the locktime to invalidate it.

Plus, delaying the payment and "promising" not to make a replacement transaction involves a lot of risk for the merchant and trust to the buyer (you).

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 12, 2020, 07:50:44 AM
Last edit: August 12, 2020, 08:01:29 AM by Picard78
 #8

Quote
Plus, delaying the payment and "promising" not to make a replacement transaction involves a lot of risk for the merchant and trust to the buyer (you).

Yes I was thinking exactly that.  This would give all the power to the buyer requiring tremendous trust in the buyer.

Quote
You can give him the signed RAW TX so he can broadcast it himself after the locktime; if you're not satisfied, create a new TX spending the input of that RAW transaction before the locktime to invalidate it.

Thank you.  This achieves the Use Case I was trying to create.  Again this would require tremendous Trust in the Buyer.  This is actually like writing a post dated cheque and giving it to the merchant.

 
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18566


View Profile
August 12, 2020, 08:46:36 AM
 #9

This is actually like writing a post dated cheque and giving it to the merchant.
Not quite. Your proposed set up is much riskier from the merchant's point of view.

A post-dated cheque is not necessarily legally binding depending on your jurisdiction, and can often be cashed prior to the date of the cheque. There is disincentive for the payer not to write a bad cheque, in that they will be hit with fees and fines, their credit rating could suffer, and they could suffer criminal charges. The merchant can take legal action against them to cover the lost funds.

If you give a merchant a signed time locked transaction, there is absolutely no disincentive for you to invalidate that transaction prior to it being broadcast. Since you can hand out such a transaction without revealing any personal information, the merchant's options for legal recourse may be very limited.

Your set up is essentially no different to saying "Give me the goods, and if I like them, I'll pay for them later".
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 12, 2020, 09:37:48 AM
 #10

Quote
Your set up is essentially no different to saying "Give me the goods, and if I like them, I'll pay for them later".

I agree.

The use case I see for signed time locked transactions is if I employ 20 people and I pay them in bitcoin at the start of each month.  I prepare my signed transactions ahead of time but add the security of locktime.  On the first of the month I simply run a utility that broadcasts my 20 prepared signed time locked transactions.

Is that the use case of locktime?
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18566


View Profile
August 12, 2020, 09:44:59 AM
 #11

Is that the use case of locktime?
That's certainly a possible use, yes.

Bear in mind that in your scenario, since you are creating the transactions in advance, you would have to craft them from inputs which already exist. So if you are paying 20 people, then you would need at least 20 separate inputs to use at least one for each transaction. You couldn't have a single input of 2 BTC and 20 transactions which all pay out 0.1 BTC from that input, for example. As soon as the first transaction confirmed, all the others would be invalid since that input no longer exists.

Alternatively you would simply create a single transaction with 1 input and 20 outputs, but that raises privacy implications if your employees can all see how much each other are being paid.
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 12, 2020, 11:35:44 AM
 #12


Quote
Bear in mind that in your scenario, since you are creating the transactions in advance, you would have to craft them from inputs which already exist. So if you are paying 20 people, then you would need at least 20 separate inputs to use at least one for each transaction. You couldn't have a single input of 2 BTC and 20 transactions which all pay out 0.1 BTC from that input, for example. As soon as the first transaction confirmed, all the others would be invalid since that input no longer exists.

Good point.  This is the way I envisioned it initially in my mind but I can see from your explanation how only 1 prepared transaction would go through.  So is the best way to implement this via Child Pays For Parent chain of 20 transactions?

Quote
Alternatively you would simply create a single transaction with 1 input and 20 outputs, but that raises privacy implications if your employees can all see how much each other are being paid.

Good point.

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
August 12, 2020, 01:53:54 PM
 #13

Delaying BTC payment until customer is satisfied with new Product
This is what escrow was designed for... customer gives BTC to escrow, merchant sends product to customer, escrow waits until customer is "satisfied" before sending funds to merchant.

If customer attempts to keep without paying, escrow can release the funds to merchant
If merchant doesn't send the item, or customer is not satisfied, escrow can return the funds to customer (after item is returned etc)
Escrow is essentially the mediator in any disputes and their decision will determine who ends up with the funds.

Can be achieved using a 2-of-3 multisig with customer, escrow and merchant... and using this method both the customer and merchant have "equal" risk (assuming the escrow is legit and not colluding with either party)

The problem is finding a "trusted and independent" escrow. Undecided


So is the best way to implement this via Child Pays For Parent chain of 20 transactions?
No, if, for whatever reason, you need to invalidate one of the transactions (ie. one person doesn't do their job as promised)... any transactions in the chain after it will also be invalidated as their inputs won't exist any more.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Picard78 (OP)
Member
**
Offline Offline

Activity: 68
Merit: 23


View Profile
August 13, 2020, 05:13:53 AM
 #14

So is the best way to implement this via Child Pays For Parent chain of 20 transactions?
Quote
No, if, for whatever reason, you need to invalidate one of the transactions (ie. one person doesn't do their job as promised)... any transactions in the chain after it will also be invalidated as their inputs won't exist any more.


True.  Thank you.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!