Skip to content

Feature: RBF and UX improvement to fee bumping#6581

Merged
NicolasDorier merged 1 commit into
btcpayserver:masterfrom
NicolasDorier:rbf2
Mar 11, 2025
Merged

Feature: RBF and UX improvement to fee bumping#6581
NicolasDorier merged 1 commit into
btcpayserver:masterfrom
NicolasDorier:rbf2

Conversation

@NicolasDorier

@NicolasDorier NicolasDorier commented Jan 29, 2025

Copy link
Copy Markdown
Member

Feature: RBF and UX improvement to fee bumping

The PR requires users who wants fee bumping (CPFP and RBF) capabilities need to update NBXplorer to 2.5.22 or above.

RBF is available to every transaction which:

  1. The transaction has one of the store's change address
  2. All the inputs of the transactions are from the store's wallet
  3. The transaction is still in the mempool
  4. The transaction doesn't have descendants (none of its output is spent)
  5. Using NBXplorer 2.5.22 or above.

While it is possible to fee bump multiple transaction with CPFP, it is not supported at this moment with RBF.

UX

The wallet transaction list is now showing a RBF link for transaction eligible to fee bumping (either CPFP or RBF).

image

Once clicked, the following UI show up, prompting the user to choose the expected effective fee rate and to select the fee bump method (RBF or CPFP, the default is RBF if available).

image

Click on Signing transaction and then start the same signing process as the Wallet Send screen.

Note that the effective fee rate is not necessarily related to the transaction's fee rate. The effective fee rate takes into account the descendants and ancestors (ie. the package) of unconfirmed transactions of the bumped transaction.

For example, if there is a chain of transactions A with a fee rate of 100 sat/vbyte and B with a fee rate of 10 sat/vbyte, both of the same size, then the current fee rate is 55.0 sat/vbyte. The minimum bump possible is 1 sat/vbyte (in other words, to 56.0 sat/vbyte). To bump the package fee to 56.0, the fee rate of B should increase to 12 sat/vbyte (and not to 56.0 or 11 sat/vbyte, as someone might wrongly expect).

We are showing the total cost of the operation in the PSBT Ready screen, in the case of RBF, we take into consideration the transaction being cancelled.

image

Lastly, fee-bumping transactions are assigned labels as a reminder.
For example, below:

  1. The merchant received payment for an invoice (4dde...).
  2. It took too long, so the merchant decided to use CPFP (3e90...).
  3. Since 3e90... was also delayed, the merchant decided to replace it via RBF with a new transaction, d2bb.....

First, you'll notice that 3e90... is no longer visible because it has been replaced. However, you can see that it was replaced by hovering over the RBF tag for more information.

Second, d2bb... has two tags: RBF and CPFP. This is because when a transaction replaces another, it inherits the tags of the replaced transaction. In this case, 3e90... had the CPFP label but was replaced via RBF by d2bb.... Since d2bb... inherits the CPFP label, it now has both CPFP and RBF labels.

image

Mass actions

The mass action for bumping fees on the invoice list and wallet transaction list has been modified. Previously, it created a CPFP transaction.

Now, it redirects to the bump fee flow explained above.

Supersede #6083
Close #5578

@NicolasDorier NicolasDorier force-pushed the rbf2 branch 2 times, most recently from 0bd8f09 to 6c21699 Compare January 30, 2025 13:52
@NicolasDorier

NicolasDorier commented Jan 31, 2025

Copy link
Copy Markdown
Member Author

@pavlenex made a video explaining an alternative to the current flow for both RBF and CPFP.

Bumping fee can be done in two ways: CPFP or RBF. As such, we should have only a single action item for both.
This can be done by:

  • Removing the mass action for CPFP from the wallet list that is hard to discover.
  • Having the RBF link renamed to Bump Fee
  • If both can be done, ask the user which method is preferred in a wizard.
  • If CPFP is selected, allow the user to select additional transactions.

EDIT:
I decided to keep the mass action as it may be useful for a merchant who wants to bump say 20 transactions at once.
However, if the user select Bump Fee, it allows him to choose the method.

Video reference:
Pavlenex RBF and CPFP

@NicolasDorier

Copy link
Copy Markdown
Member Author

Now, CPFP and multi action CPFP are using the Bump fee screen!

@pavlenex

pavlenex commented Feb 3, 2025

Copy link
Copy Markdown
Contributor

@NicolasDorier Took
another look, and this one looks really solid. I don't have additional suggestions when it comes to UX, this now really accelerates it. I am sure we could potentially explore polishing up some things, but to me this one is good to go and have tests. I think we can do cleanups in #6585 that can help improve the UX for this specific flow, but for now, good to go imo.

@dstrukt The only thing missing now is figuring the consistent approach we're sticking with Bump a fee terminology and if we're keeping the same icon. But that shouldn't block Nicolas for proceeding with the PR.

Screenshot 2025-02-03 at 16 51 34

@NicolasDorier NicolasDorier force-pushed the rbf2 branch 11 times, most recently from b9ce89e to cb9c4d3 Compare February 9, 2025 03:50
@NicolasDorier NicolasDorier changed the title Feature: Can RBF transactions in the wallet Feature: RBF and UX improvement to fee bumping Feb 9, 2025
@NicolasDorier NicolasDorier force-pushed the rbf2 branch 10 times, most recently from 7bbbfd5 to 460a9a5 Compare February 10, 2025 07:24
@NicolasDorier NicolasDorier added this to the 2.1.0 milestone Feb 10, 2025
@NicolasDorier NicolasDorier merged commit 517dd7d into btcpayserver:master Mar 11, 2025
@NicolasDorier NicolasDorier deleted the rbf2 branch March 11, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement RBF in BTCPay Wallet

2 participants