How does first seen replace by fee work?

by Nick ODell   Last Updated May 22, 2020 23:27 PM

This pull request describes first-seen replace-by-fee. How is it different from normal replace-by-fee, and how does it compare to child-pays-for-parent?



Answers 2


Right now, for the most part, Bitcoin miners follow a First-Seen-Safe rule: If 2 conflicting transactions show up in the mempool, the miner sticks with the one it saw first.

Replace-By-Fee would enable miners to remove transactions from the mempool based on which transaction pays the higher fee. This is problematic because it enables fraud. If I pay a merchant and walk out, I can then easily broadcast a conflicting transaction which sends the money back to me with only a slightly higher fee. The merchant doesn't get paid, but I get the goods for a slightly larger transaction fee.

With Child-Pays-For-Parent, an unconfirmed transaction(parent) can be raised in mining priority by spending their output(children). The extra fees that would come from children offer incentive for the miner to include the parent transaction. CPFP relates to RBF as a way for a merchant to fight fraud. If a merchant detects that a payment they were expecting has been rerouted, they can raise the priority of their preferred transaction using CPFP. This is a contentious solution to make RBF acceptable.

First-Seen-Safe Replace-By-Fee follows the RBF rules, but puts some requirements around replacing transactions in the mempool. When replacing a transaction based on higher fee, all the amounts of all the outputs from the original transaction need to be met. You can add and remove inputs, increase past output amounts, and add new outputs. You are allowed to modify transactions as long as you meet or exceed the past outputs.

With FSSRBF you can safely accept transactions that spend confirmed outputs, but not unconfirmed transactions spending outputs of other unconfirmed transactions. CPFP is useful beyond RBF, but is not necessary for FSSRBF usability.

Steve Ellis
Steve Ellis
July 01, 2015 19:04 PM

Good Day. Please i have an Account with BlockChain but i notice my account has a withdrawal of all my BTC which was not done by me. It has Replace-By-Fee

What might have happened?

Sent BTC May 21 2020 @ 2:22 AM Replace-By-Fee To: bc1q52vem2cnzps34reymhw0v07wgzme8gq92dzc5p From: My Bitcoin Wallet $3,461.91 0.38223108 BTC Description Add a description Value When Sent $3,645.37 Sent From 159qFcZvv46Vz861PFxUNLPzjpTZw2oiPj 17BoVBrrkZ13DWNEBdew8QL3CCq6mv3722 1PnBQwZhiMMtb2XptpTBzBFa658iWm4gzd 1ahi6h2WMaGCpbrs2d7cr2o9Fo1m2Mu4J 1LcXKTF7TwNBw9jH4pTMHJRTMWGxo55syD 1CkJkCBVJt11Cj41SY9SQ7hu8318tcc19s Received By bc1q52vem2cnzps34reymhw0v07wgzme8gq92dzc5p Status Transaction Confirmed Transaction Fee 0.00113524 BTC ( $10.28enter image description here

sancoflex
sancoflex
May 22, 2020 22:54 PM

Related Questions




CPFP: Child Pays For Parent Clarification Needed

Updated December 23, 2017 00:27 AM


Bitcoin transaction stuck

Updated July 02, 2019 10:27 AM