First-Seen-Safe Replace-by-Fee



Summary:

First-seen-safe replace-by-fee (FSS RBF) is a compromise between two mempool behaviors. The current Bitcoin Core implementation has "first-seen" mempool behavior, which means that once accepted, a transaction is never removed from the mempool until mined or double-spent by a transaction in a block. The author's previously proposed replace-by-fee replaced this behavior with simply accepting the transaction paying the highest fee. FSS RBF, on the other hand, allows transactions to be replaced by higher-fee paying transactions, provided all outputs in the previous transaction are still paid by the replacement, keeping the "first-seen" behavior intact. FSS RBF adds additional criteria to replace-by-fee before allowing a transaction t1 to be replaced with t2. These include:- All outputs of t1 exist in t2 and pay >= the value in t1.- All outputs of t1 are unspent.- The order of outputs in t2 is the same as in t1 with additional new outputs at the end of the output list.- t2 only conflicts with a single transaction, t1.- t2 does not spend any outputs of t1.The benefits of FSS RBF include giving users effective ways of getting "stuck" transactions unstuck and using blockchain space efficiently. It also has no effect on the ability of attackers to double-spend. FSS RBF should be submitted to bitcoin/bitcoin because inconsistently deployed FSS RBF invites attacks. Usage scenarios for FSS RBF include increasing the fee on a single transaction, paying multiple recipients in succession, and paying the same recipient multiple times. Wallets must treat conflicting incoming transactions as equivalent so long as the transaction outputs owned by them do not change. A fixed TXID is not guaranteed by the Bitcoin protocol.


Updated on: 2023-06-09T21:25:02.623960+00:00